summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2022-02-11 11:11:04 +0100
committerHans Kristian Rosbach <hk-github@circlestorm.org>2022-06-03 10:21:01 +0200
commit2f4e2372a207bf9f56e62351455dacfb84c6d8d3 (patch)
treece960427bd055f92f567eeeb0fbe5074bf470c96 /test
parentc62b35ffac42940ba97af241140839cbc84f6f04 (diff)
downloadProject-Tick-2f4e2372a207bf9f56e62351455dacfb84c6d8d3.tar.gz
Project-Tick-2f4e2372a207bf9f56e62351455dacfb84c6d8d3.zip
Simplify zlib-ng native API by removing version and struct size checks.
This should be backwards compatible with applications compiled for 2.0.x.
Diffstat (limited to 'test')
-rw-r--r--test/infcover.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/infcover.c b/test/infcover.c
index 974185d0a3..63f5b3a29a 100644
--- a/test/infcover.c
+++ b/test/infcover.c
@@ -368,12 +368,14 @@ static void cover_support(void) {
inf("3 0", "use fixed blocks", 0, -15, 1, Z_STREAM_END);
inf("", "bad window size", 0, 1, 0, Z_STREAM_ERROR);
+#ifdef ZLIB_COMPAT
mem_setup(&strm);
strm.avail_in = 0;
strm.next_in = NULL;
ret = PREFIX(inflateInit_)(&strm, &PREFIX2(VERSION)[1], (int)sizeof(PREFIX3(stream)));
assert(ret == Z_VERSION_ERROR);
mem_done(&strm, "wrong version");
+#endif
strm.avail_in = 0;
strm.next_in = NULL;
@@ -474,8 +476,11 @@ static void cover_back(void) {
PREFIX3(stream) strm;
unsigned char win[32768];
+#ifdef ZLIB_COMPAT
ret = PREFIX(inflateBackInit_)(NULL, 0, win, 0, 0);
assert(ret == Z_VERSION_ERROR);
+#endif
+
ret = PREFIX(inflateBackInit)(NULL, 0, win);
assert(ret == Z_STREAM_ERROR);
ret = PREFIX(inflateBack)(NULL, NULL, NULL, NULL, NULL);