summaryrefslogtreecommitdiff
path: root/src/or/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/test.c')
-rw-r--r--src/or/test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/test.c b/src/or/test.c
index c25bd189cd..5a7903f09c 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -990,13 +990,13 @@ test_gzip(void)
tor_zlib_state_t *state;
buf1 = tor_strdup("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZAAAAAAAAAAAAAAAAAAAZ");
- test_eq(detect_compression_method(buf1, strlen(buf1)), 0);
+ test_assert(detect_compression_method(buf1, strlen(buf1)) == UNKNOWN_METHOD);
if (is_gzip_supported()) {
test_assert(!tor_gzip_compress(&buf2, &len1, buf1, strlen(buf1)+1,
GZIP_METHOD));
test_assert(buf2);
- test_assert(!memcmp(buf2, "\037\213", 2)); /* Gzip magic. */
- test_eq(detect_compression_method(buf2, len1), GZIP_METHOD);
+ test_assert(!memcmp(buf2, "\037\213", 2)); /* Gztip magic. */
+ test_assert(detect_compression_method(buf2, len1) == GZIP_METHOD);
test_assert(!tor_gzip_uncompress(&buf3, &len2, buf2, len1,
GZIP_METHOD, 1, LOG_INFO));
@@ -1011,7 +1011,7 @@ test_gzip(void)
ZLIB_METHOD));
test_assert(buf2);
test_assert(!memcmp(buf2, "\x78\xDA", 2)); /* deflate magic. */
- test_eq(detect_compression_method(buf2, len1), ZLIB_METHOD);
+ test_assert(detect_compression_method(buf2, len1) == ZLIB_METHOD);
test_assert(!tor_gzip_uncompress(&buf3, &len2, buf2, len1,
ZLIB_METHOD, 1, LOG_INFO));