diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-04-18 01:23:39 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2017-04-18 01:23:39 +0200 |
commit | b8c9f229d747d4edc739198113dfb7e3818e23bc (patch) | |
tree | 80a8e8e05118d18b989548fd182a67ae8653c6fa /src/test/test_buffers.c | |
parent | 40ed68290e69d32d95bc0d0c259d8c76ae3e80ef (diff) | |
download | tor-b8c9f229d747d4edc739198113dfb7e3818e23bc.tar.gz tor-b8c9f229d747d4edc739198113dfb7e3818e23bc.zip |
Rename `write_to_buf_zlib()` to `write_to_buf_compress()`.
See https://bugs.torproject.org/21663
Diffstat (limited to 'src/test/test_buffers.c')
-rw-r--r-- | src/test/test_buffers.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/test/test_buffers.c b/src/test/test_buffers.c index be757ae628..43582d1b7a 100644 --- a/src/test/test_buffers.c +++ b/src/test/test_buffers.c @@ -593,14 +593,17 @@ test_buffers_zlib_impl(int finalize_with_nil) msg = tor_malloc(512); crypto_rand(msg, 512); - tt_int_op(write_to_buf_zlib(buf, compress_state, msg, 128, 0), OP_EQ, 0); - tt_int_op(write_to_buf_zlib(buf, compress_state, msg+128, 128, 0), OP_EQ, 0); - tt_int_op(write_to_buf_zlib(buf, compress_state, msg+256, 256, 0), OP_EQ, 0); + tt_int_op(write_to_buf_compress(buf, compress_state, + msg, 128, 0), OP_EQ, 0); + tt_int_op(write_to_buf_compress(buf, compress_state, + msg+128, 128, 0), OP_EQ, 0); + tt_int_op(write_to_buf_compress(buf, compress_state, + msg+256, 256, 0), OP_EQ, 0); done = !finalize_with_nil; - tt_int_op(write_to_buf_zlib(buf, compress_state, - "all done", 9, done), OP_EQ, 0); + tt_int_op(write_to_buf_compress(buf, compress_state, + "all done", 9, done), OP_EQ, 0); if (finalize_with_nil) { - tt_int_op(write_to_buf_zlib(buf, compress_state, "", 0, 1), OP_EQ, 0); + tt_int_op(write_to_buf_compress(buf, compress_state, "", 0, 1), OP_EQ, 0); } in_len = buf_datalen(buf); @@ -668,7 +671,7 @@ test_buffers_zlib_fin_at_chunk_end(void *arg) tt_uint_op(buf_datalen(buf), OP_EQ, headerjunk); /* Write an empty string, with finalization on. */ compress_state = tor_compress_new(1, ZLIB_METHOD, HIGH_COMPRESSION); - tt_int_op(write_to_buf_zlib(buf, compress_state, "", 0, 1), OP_EQ, 0); + tt_int_op(write_to_buf_compress(buf, compress_state, "", 0, 1), OP_EQ, 0); in_len = buf_datalen(buf); contents = tor_malloc(in_len); |