mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
CODEONE/DATAMATRIX/MAILMARK/PLESSEY: fix some 32-bit/portability bugs
PLESSEY: add options NCR weighted mod-10, hide check digit(s) in HRT test suite: now runnable under MSVC 2019, 2017, 2015, MinGW/MSYS win32/README: update with MSVC 2019 and CMake instructions
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
Zint backend test suite
|
||||
-----------------------
|
||||
|
||||
In order to build the zint testsuite, zint has to be compiled with the
|
||||
In order to build the zint test suite, zint has to be compiled with the
|
||||
ZINT_TEST option enabled:
|
||||
|
||||
cd <project-dir>
|
||||
@ -12,50 +12,53 @@ ZINT_TEST option enabled:
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
In order to run the testsuite, the path of the zint library needs to be
|
||||
communicated to the runtime linker. On UNIX like systems, this is done
|
||||
by exporting LD_LIBRARY_PATH to the path containing the zint library,
|
||||
which is <build-dir>/backend:
|
||||
In order to run the test suite, the path of the zint library may need to be
|
||||
communicated to the runtime linker. On UNIX-like systems, this is done by
|
||||
exporting LD_LIBRARY_PATH to the path containing the zint library, which is
|
||||
<build-dir>/backend:
|
||||
|
||||
cd <project-dir>
|
||||
cd build
|
||||
export LD_LIBRARY_PATH=$(pwd)/backend
|
||||
|
||||
|
||||
Setting LD_LIBRARY_PATH is not required if the zint library to be tested is
|
||||
installed into a system library path ( /usr/lib for example ) prior to running
|
||||
the tests.
|
||||
|
||||
To run all tests (within <build-dir>/backend/tests):
|
||||
|
||||
To run all tests (within <build-dir>):
|
||||
|
||||
ctest
|
||||
|
||||
To run individual tests, eg:
|
||||
For various useful options, e.g. matching (-R) and excluding (-E) tests, see
|
||||
https://cmake.org/cmake/help/latest/manual/ctest.1.html#options
|
||||
|
||||
./test_common
|
||||
./test_vector
|
||||
Tests can also be run individually, eg:
|
||||
|
||||
backend/tests/test_common
|
||||
backend/tests/test_vector
|
||||
|
||||
To run a single test function within an individual test, use '-f <func-name>':
|
||||
|
||||
./test_common -f utf8_to_unicode
|
||||
./test_dotcode -f input
|
||||
backend/tests/test_common -f utf8_to_unicode
|
||||
backend/tests/test_dotcode -f input
|
||||
|
||||
To run a single dataset item in a single test function, use '-i <index>':
|
||||
|
||||
./test_dotcode -f input -i 2
|
||||
backend/tests/test_dotcode -f input -i 2
|
||||
|
||||
To show debug info (if any), use '-d <flag>':
|
||||
|
||||
./test_dotcode -f input -i 2 -d 1
|
||||
backend/tests/test_dotcode -f input -i 2 -d 1
|
||||
|
||||
(for other flags see <project-dir>/backend/tests/testcommon.h)
|
||||
|
||||
To generate test data, use '-g':
|
||||
|
||||
./test_dotcode -f encode -g
|
||||
backend/tests/test_dotcode -f encode -g
|
||||
|
||||
To run a test against BWIPP (if any), use '-d 128':
|
||||
|
||||
./test_composite -d 128
|
||||
backend/tests/test_composite -d 128
|
||||
|
||||
(see also <project-dir>/backend/tests/tools/run_bwipp_tests.sh)
|
||||
|
||||
@ -64,13 +67,13 @@ To run a test against BWIPP (if any), use '-d 128':
|
||||
If the zint library was built with static linkage support, i.e. ZINT_STATIC
|
||||
is ON, an additional test executable, which uses the zint-static library, will
|
||||
be built. The static variant of each test shares the test name, but has a
|
||||
"-static" suffix. For example,
|
||||
"-static" suffix. For example,
|
||||
|
||||
./test_dotcode
|
||||
backend/tests/test_dotcode
|
||||
|
||||
would run the dotcode test that uses the shared zint library, while
|
||||
|
||||
./test_dotcode-static
|
||||
backend/tests/test_dotcode-static
|
||||
|
||||
runs the same test built against the zint-static library.
|
||||
|
||||
|
Reference in New Issue
Block a user