static void
test_buffers_zlib_fin_at_chunk_end(void *arg)
{
- (void) arg;
-
char *msg = NULL;
char *contents = NULL;
char *expanded = NULL;
tor_zlib_state_t *zlib_state = NULL;
size_t out_len, in_len;
size_t sz, headerjunk;
+ (void) arg;
buf = buf_new_with_capacity(128); /* will round up */
sz = buf_get_default_chunk_size(buf);
test_eq(round_to_power_of_2(120), 128);
test_eq(round_to_power_of_2(128), 128);
test_eq(round_to_power_of_2(130), 128);
- test_eq(round_to_power_of_2(U64_LITERAL(40000000000000000)),
- U64_LITERAL(1)<<55);
- test_eq(round_to_power_of_2(U64_LITERAL(0xffffffffffffffff)),
- U64_LITERAL(1)<<63);
+ test_assert(round_to_power_of_2(U64_LITERAL(40000000000000000)) ==
+ U64_LITERAL(1)<<55);
+ test_assert(round_to_power_of_2(U64_LITERAL(0xffffffffffffffff)) ==
+ U64_LITERAL(1)<<63);
test_eq(round_to_power_of_2(0), 1);
test_eq(round_to_power_of_2(1), 1);
test_eq(round_to_power_of_2(2), 2);