diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-09 03:39:06 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-09 03:39:06 +0000 |
commit | e618c15aff328b1332edd22db6a949a61d5c0b3b (patch) | |
tree | 34616c4031fc5246b5bd35fbc97b50d71118cc3e /src/or/test.c | |
parent | c6f2d725d005f912830b523aa1d1a419f4e22ecd (diff) | |
download | tor-e618c15aff328b1332edd22db6a949a61d5c0b3b.tar.gz tor-e618c15aff328b1332edd22db6a949a61d5c0b3b.zip |
r8967@totoro: nickm | 2006-10-08 23:38:50 -0400
Fix some test and warn failures in last commit
svn:r8665
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 8 |
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)); |