mirror of
https://github.com/GerbilSoft/zlib-ng.git
synced 2025-06-18 19:45:37 -04:00

This patch adds the ability to run zlib-ng test suite against the original zlib as follows: cmake -DZLIB_COMPAT=ON -DZLIBNG_ENABLE_TESTS=OFF . make LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu make test The benefit of this is that modifications to the original zlib can be tested with a more extensive zlib-ng's testsuite, and the assumptions that the zlib-ng tests make can be validated against the original zlib. In addition to a number of tests that exercise purely zlib-ng specific API, there are a few that expect zlib-ng specific behavior from the original zlib API: - deflate() (obviously) emits different streams - zlib-ng's deflatePrime() can take more than 16 bits - zVersion() returns a different string Adjust or disable the respective tests for ZLIBNG_ENABLE_TESTS=OFF.
13 lines
343 B
C
13 lines
343 B
C
#ifndef TEST_SHARED_H
|
|
#define TEST_SHARED_H
|
|
|
|
/* Test definitions that can be used in the original zlib build environment. */
|
|
|
|
/* "hello world" would be more standard, but the repeated "hello"
|
|
* stresses the compression code better, sorry...
|
|
*/
|
|
static const char hello[] = "hello, hello!";
|
|
static const int hello_len = sizeof(hello);
|
|
|
|
#endif
|