0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-27 01:48:09 +03:00
LimeReport/3rdparty/zint-2.10.0/backend/tests
Rodrigo Torres 6822ade01b Update Zint
2022-01-26 09:16:57 -03:00
..
cmake/Modules Update Zint 2022-01-26 09:16:57 -03:00
data Update Zint 2022-01-26 09:16:57 -03:00
tools Update Zint 2022-01-26 09:16:57 -03:00
CMakeLists.txt Update Zint 2022-01-26 09:16:57 -03:00
README Update Zint 2022-01-26 09:16:57 -03:00
test_2of5.c Update Zint 2022-01-26 09:16:57 -03:00
test_auspost.c Update Zint 2022-01-26 09:16:57 -03:00
test_aztec.c Update Zint 2022-01-26 09:16:57 -03:00
test_big5_tab.h Update Zint 2022-01-26 09:16:57 -03:00
test_big5.c Update Zint 2022-01-26 09:16:57 -03:00
test_bmp.c Update Zint 2022-01-26 09:16:57 -03:00
test_channel.c Update Zint 2022-01-26 09:16:57 -03:00
test_codablock.c Update Zint 2022-01-26 09:16:57 -03:00
test_code1.c Update Zint 2022-01-26 09:16:57 -03:00
test_code16k.c Update Zint 2022-01-26 09:16:57 -03:00
test_code49.c Update Zint 2022-01-26 09:16:57 -03:00
test_code128.c Update Zint 2022-01-26 09:16:57 -03:00
test_code.c Update Zint 2022-01-26 09:16:57 -03:00
test_common.c Update Zint 2022-01-26 09:16:57 -03:00
test_composite.c Update Zint 2022-01-26 09:16:57 -03:00
test_dmatrix.c Update Zint 2022-01-26 09:16:57 -03:00
test_dotcode.c Update Zint 2022-01-26 09:16:57 -03:00
test_eci.c Update Zint 2022-01-26 09:16:57 -03:00
test_emf.c Update Zint 2022-01-26 09:16:57 -03:00
test_gb2312_tab.h Update Zint 2022-01-26 09:16:57 -03:00
test_gb2312.c Update Zint 2022-01-26 09:16:57 -03:00
test_gb18030_tab.h Update Zint 2022-01-26 09:16:57 -03:00
test_gb18030.c Update Zint 2022-01-26 09:16:57 -03:00
test_gif.c Update Zint 2022-01-26 09:16:57 -03:00
test_gridmtx.c Update Zint 2022-01-26 09:16:57 -03:00
test_gs1.c Update Zint 2022-01-26 09:16:57 -03:00
test_hanxin.c Update Zint 2022-01-26 09:16:57 -03:00
test_imail.c Update Zint 2022-01-26 09:16:57 -03:00
test_iso3166.c Update Zint 2022-01-26 09:16:57 -03:00
test_iso4217.c Update Zint 2022-01-26 09:16:57 -03:00
test_ksx1001_tab.h Update Zint 2022-01-26 09:16:57 -03:00
test_ksx1001.c Update Zint 2022-01-26 09:16:57 -03:00
test_large.c Update Zint 2022-01-26 09:16:57 -03:00
test_library.c Update Zint 2022-01-26 09:16:57 -03:00
test_mailmark.c Update Zint 2022-01-26 09:16:57 -03:00
test_maxicode.c Update Zint 2022-01-26 09:16:57 -03:00
test_medical.c Update Zint 2022-01-26 09:16:57 -03:00
test_pcx.c Update Zint 2022-01-26 09:16:57 -03:00
test_pdf417.c Update Zint 2022-01-26 09:16:57 -03:00
test_plessey.c Update Zint 2022-01-26 09:16:57 -03:00
test_png.c Update Zint 2022-01-26 09:16:57 -03:00
test_postal.c Update Zint 2022-01-26 09:16:57 -03:00
test_print.c Update Zint 2022-01-26 09:16:57 -03:00
test_ps.c Update Zint 2022-01-26 09:16:57 -03:00
test_qr.c Update Zint 2022-01-26 09:16:57 -03:00
test_raster.c Update Zint 2022-01-26 09:16:57 -03:00
test_reedsol.c Update Zint 2022-01-26 09:16:57 -03:00
test_rss.c Update Zint 2022-01-26 09:16:57 -03:00
test_sjis_tab.h Update Zint 2022-01-26 09:16:57 -03:00
test_sjis.c Update Zint 2022-01-26 09:16:57 -03:00
test_svg.c Update Zint 2022-01-26 09:16:57 -03:00
test_telepen.c Update Zint 2022-01-26 09:16:57 -03:00
test_tif.c Update Zint 2022-01-26 09:16:57 -03:00
test_ultra.c Update Zint 2022-01-26 09:16:57 -03:00
test_upcean.c Update Zint 2022-01-26 09:16:57 -03:00
test_vector.c Update Zint 2022-01-26 09:16:57 -03:00
testcommon.c Update Zint 2022-01-26 09:16:57 -03:00
testcommon.h Update Zint 2022-01-26 09:16:57 -03:00

Zint backend test suite
-----------------------

In order to build the zint test suite, zint has to be compiled with the
ZINT_TEST option enabled:

  cd <project-dir>
  mkdir build
  cd build
  cmake -DZINT_TEST=ON ..
  make

------------------------------------------------------------------------------

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>):

  ctest

For various useful options, e.g. matching (-R) and excluding (-E) tests, see
https://cmake.org/cmake/help/latest/manual/ctest.1.html#options

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>':

  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>':

  backend/tests/test_dotcode -f input -i 2

To show debug info (if any), use '-d <flag>':

  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':

  backend/tests/test_dotcode -f encode -g

To run a test against BWIPP (if any), use '-d 128':

  backend/tests/test_composite -d 128

(see also <project-dir>/backend/tests/tools/run_bwipp_tests.sh)

------------------------------------------------------------------------------

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,

  backend/tests/test_dotcode

would run the dotcode test that uses the shared zint library, while

  backend/tests/test_dotcode-static

runs the same test built against the zint-static library.

------------------------------------------------------------------------------

To make with gcc sanitize, first set for libzint and make:

  cd <project-dir>
  cd build
  cmake -DZINT_SANITIZE=ON ..
  make && sudo make install

Similarly to make with gcc debug:

  cd <project-dir>
  cd build
  cmake -DZINT_DEBUG=ON ..
  make && sudo make install

To undo sanitize/debug, remake each after setting:

  cmake -DZINT_SANITIZE=OFF ..
  cmake -DZINT_DEBUG=OFF ..

To get a clean libzint, set the above and also:

  cmake -DZINT_TEST=OFF ..

(The tests will now fail to link.)