[or-cvs] Fix dumb bug in unittests.

Nick Mathewson nickm at seul.org
Sat Jan 22 00:42:42 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv15459/src/or

Modified Files:
	test.c 
Log Message:
Fix dumb bug in unittests.

Index: test.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/test.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -d -r1.166 -r1.167
--- test.c	20 Jan 2005 20:18:32 -0000	1.166
+++ test.c	22 Jan 2005 00:42:40 -0000	1.167
@@ -808,7 +808,7 @@
                                    GZIP_METHOD));
     test_assert(buf2);
     test_assert(!memcmp(buf2, "\037\213", 2)); /* Gzip magic. */
-    test_eq(detect_compression_method(buf2, strlen(buf1)), GZIP_METHOD);
+    test_eq(detect_compression_method(buf2, len1), GZIP_METHOD);
 
     test_assert(!tor_gzip_uncompress(&buf3, &len2, buf2, len1, GZIP_METHOD));
     test_assert(buf3);
@@ -822,7 +822,7 @@
                                  ZLIB_METHOD));
   test_assert(buf2);
   test_assert(!memcmp(buf2, "\x78\xDA", 2)); /* deflate magic. */
-  test_eq(detect_compression_method(buf2, strlen(buf1)), ZLIB_METHOD);
+  test_eq(detect_compression_method(buf2, len1), ZLIB_METHOD);
 
   test_assert(!tor_gzip_uncompress(&buf3, &len2, buf2, len1, ZLIB_METHOD));
   test_assert(buf3);



More information about the tor-commits mailing list