diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 19:56:09 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 19:56:09 +0300 |
| commit | 7fb132859fda54aa96bc9dd46d302b343eeb5a02 (patch) | |
| tree | b43ae77d7451fb470a260c03349a1caf2846c5e5 /neozip/test/test_inflate_copy.cc | |
| parent | b1e34e861b5d732afe828d58aad2c638135061fd (diff) | |
| parent | c2712b8a345191f6ed79558c089777df94590087 (diff) | |
| download | Project-Tick-7fb132859fda54aa96bc9dd46d302b343eeb5a02.tar.gz Project-Tick-7fb132859fda54aa96bc9dd46d302b343eeb5a02.zip | |
Add 'neozip/' from commit 'c2712b8a345191f6ed79558c089777df94590087'
git-subtree-dir: neozip
git-subtree-mainline: b1e34e861b5d732afe828d58aad2c638135061fd
git-subtree-split: c2712b8a345191f6ed79558c089777df94590087
Diffstat (limited to 'neozip/test/test_inflate_copy.cc')
| -rw-r--r-- | neozip/test/test_inflate_copy.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/neozip/test/test_inflate_copy.cc b/neozip/test/test_inflate_copy.cc new file mode 100644 index 0000000000..02eea2648a --- /dev/null +++ b/neozip/test/test_inflate_copy.cc @@ -0,0 +1,31 @@ +/* test_inflate_copy.cc - Test copying inflate stream */ + +#include "zbuild.h" +#ifdef ZLIB_COMPAT +# include "zlib.h" +#else +# include "zlib-ng.h" +#endif + +#include "test_shared.h" + +#include <gtest/gtest.h> + +TEST(inflate, copy_back_and_forth) { + PREFIX3(stream) d1_stream, d2_stream; + int err; + + memset(&d1_stream, 0, sizeof(d1_stream)); + err = PREFIX(inflateInit2)(&d1_stream, MAX_WBITS + 14); + ASSERT_EQ(err, Z_OK); + err = PREFIX(inflateCopy)(&d2_stream, &d1_stream); + ASSERT_EQ(err, Z_OK); + err = PREFIX(inflateEnd)(&d1_stream); + ASSERT_EQ(err, Z_OK); + err = PREFIX(inflateCopy)(&d1_stream, &d2_stream); + ASSERT_EQ(err, Z_OK); + err = PREFIX(inflateEnd)(&d1_stream); + ASSERT_EQ(err, Z_OK); + err = PREFIX(inflateEnd)(&d2_stream); + ASSERT_EQ(err, Z_OK); +} |
