diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-05 14:15:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-05 14:17:18 -0400 |
commit | c0b9f594b65f410cf219673d53226ed4eeeedc19 (patch) | |
tree | 3e75ff789384effdd3a96723bfc317e9fa011268 /src/test/test_buffers.c | |
parent | 4bac93ba5d2ba054d935f1f58fa52c820ebb5b20 (diff) | |
download | tor-c0b9f594b65f410cf219673d53226ed4eeeedc19.tar.gz tor-c0b9f594b65f410cf219673d53226ed4eeeedc19.zip |
Make preferred_chunk_size nonstatic, and add a prefix to it
Diffstat (limited to 'src/test/test_buffers.c')
-rw-r--r-- | src/test/test_buffers.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/test_buffers.c b/src/test/test_buffers.c index 1fd2cd71d8..dfc1fcb24f 100644 --- a/src/test/test_buffers.c +++ b/src/test/test_buffers.c @@ -783,17 +783,17 @@ test_buffers_chunk_size(void *arg) (void)arg; const int min = 256; const int max = 65536; - tt_uint_op(preferred_chunk_size(3), OP_EQ, min); - tt_uint_op(preferred_chunk_size(25), OP_EQ, min); - tt_uint_op(preferred_chunk_size(0), OP_EQ, min); - tt_uint_op(preferred_chunk_size(256), OP_EQ, 512); - tt_uint_op(preferred_chunk_size(65400), OP_EQ, max); + tt_uint_op(buf_preferred_chunk_size(3), OP_EQ, min); + tt_uint_op(buf_preferred_chunk_size(25), OP_EQ, min); + tt_uint_op(buf_preferred_chunk_size(0), OP_EQ, min); + tt_uint_op(buf_preferred_chunk_size(256), OP_EQ, 512); + tt_uint_op(buf_preferred_chunk_size(65400), OP_EQ, max); /* Here, we're implicitly saying that the chunk header overhead is * between 1 and 100 bytes. 24..48 would probably be more accurate. */ - tt_uint_op(preferred_chunk_size(65536), OP_GT, 65536); - tt_uint_op(preferred_chunk_size(65536), OP_LT, 65536+100); - tt_uint_op(preferred_chunk_size(165536), OP_GT, 165536); - tt_uint_op(preferred_chunk_size(165536), OP_LT, 165536+100); + tt_uint_op(buf_preferred_chunk_size(65536), OP_GT, 65536); + tt_uint_op(buf_preferred_chunk_size(65536), OP_LT, 65536+100); + tt_uint_op(buf_preferred_chunk_size(165536), OP_GT, 165536); + tt_uint_op(buf_preferred_chunk_size(165536), OP_LT, 165536+100); done: ; } |