summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 4840ecce72..891e4f6dbf 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -2259,6 +2259,11 @@ test_util_compress_impl(compress_method_t method)
tt_assert(tor_compress_supports_method(method));
+ if (method != NO_METHOD) {
+ tt_assert(tor_compress_version_str(method) != NULL);
+ tt_assert(tor_compress_header_version_str(method) != NULL);
+ }
+
buf1 = tor_strdup("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZAAAAAAAAAAAAAAAAAAAZ");
tt_assert(detect_compression_method(buf1, strlen(buf1)) == UNKNOWN_METHOD);
@@ -2362,6 +2367,8 @@ test_util_compress_stream_impl(compress_method_t method,
tt_assert(cp1 > cp2); /* Make sure we really added something. */
}
+ tt_int_op(tor_compress_state_size(state), OP_GT, 0);
+
tt_assert(!tor_uncompress(&buf3, &len2, buf1, 1024-len1,
method, 1, LOG_WARN));
/* Make sure it compressed right. */