1
0
mirror of https://github.com/woo-j/zint.git synced 2024-12-25 09:33:56 +03:00
zint/backend/tests
2020-02-01 19:36:50 +01:00
..
cmake/Modules New files 2019-09-01 21:09:47 +01:00
data KOREAPOST missing from is_linear; tests update 2019-10-14 09:49:15 +01:00
tools HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
CMakeLists.txt Set version to 2.7.1 2020-02-01 19:36:50 +01:00
README libzint.so: suppress exporting INTERNAL functions to the shared library; ZINT_TEST 2019-12-19 00:37:55 +00:00
test_channel.c KOREAPOST missing from is_linear; tests update 2019-10-14 09:49:15 +01:00
test_common.c HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
test_composite.c EAN128_CC ecc, cc_width, rows and alignment adjustments 2019-11-05 14:16:48 +00:00
test_dmatrix.c #147 Datamatrix buffer test from Opaki; encode examples from ISO 16022 2020-01-07 18:23:26 +00:00
test_eci.c Handle UNICODE_MODE ECI conversion for reduced charset barcodes and QRCODE/MICROQR 2019-11-27 16:16:14 +00:00
test_gb2312_tab.h HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
test_gb2312.c HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
test_gb18030_tab.h HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
test_gb18030.c HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
test_gridmtx.c QR optimize encoding modes 2019-12-16 17:31:52 +00:00
test_gs1.c Handle UNICODE_MODE ECI conversion for reduced charset barcodes and QRCODE/MICROQR 2019-11-27 16:16:14 +00:00
test_hanxin.c PDF417 no longer uses option_3 for no. codewords so set default 0 & remove from Studio 2019-12-19 20:29:11 +00:00
test_imail.c QR optimize encoding modes 2019-12-16 17:31:52 +00:00
test_library.c Handle UNICODE_MODE ECI conversion for reduced charset barcodes and QRCODE/MICROQR 2019-11-27 16:16:14 +00:00
test_mailmark.c KOREAPOST missing from is_linear; tests update 2019-10-14 09:49:15 +01:00
test_maxicode.c HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
test_pdf417.c PDF417 no longer uses option_3 for no. codewords so set default 0 & remove from Studio 2019-12-19 20:29:11 +00:00
test_postal.c Handle UNICODE_MODE ECI conversion for reduced charset barcodes and QRCODE/MICROQR 2019-11-27 16:16:14 +00:00
test_qr.c QR optimize encoding modes 2019-12-16 17:31:52 +00:00
test_raster.c EANX/UPCA/UPCE_CHK handling + various raster/vector fixes; ISBNX add-ons 2019-11-11 21:38:21 +00:00
test_rss.c EAN128_CC ecc, cc_width, rows and alignment adjustments 2019-11-05 14:16:48 +00:00
test_sjis_tab.h HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
test_sjis.c HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
test_upcean.c raster.c: check bounds on calculating block width for UPCA 2019-12-19 00:59:51 +00:00
test_vector.c EANX/UPCA/UPCE_CHK handling + various raster/vector fixes; ISBNX add-ons 2019-11-11 21:38:21 +00:00
testcommon.c HANXIN ECI conversion, GB 18030 LIBICONV port; some codeword fixes; optimized encoding modes 2019-12-08 16:15:34 +00:00
testcommon.h libzint.so: suppress exporting INTERNAL functions to the shared library; ZINT_TEST 2019-12-19 00:37:55 +00:00

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

To make, first make libzint with ZINT_TEST defined:

  cd <project-dir>
  mkdir build
  cd build
  cmake -DZINT_TEST:BOOL:1 ..
  make

Then make the tests:

  cd <project-dir>
  cd backend/tests
  mkdir build
  cd build
  cmake -DZINT_TEST:BOOL:1 ..
  make

(ZINT_TEST is needed to export INTERNAL functions for use and testing.)

To run all tests:

  make test

To run individual tests, eg:

  ./test_common
  ./test_vector

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

  cd <project-dir>
  cd build
  cmake -DZINT_SANITIZE:BOOL=1 ..
  make && sudo make install

Then set for tests and make:

  cd <project-dir>
  cd backend/tests/build
  cmake -DZINT_SANITIZE:BOOL=1 ..
  make

Similarly to make with gcc debug:

  cd <project-dir>
  cd build
  cmake -DZINT_DEBUG:BOOL=1 ..
  make && sudo make install

  cd <project-dir>
  cd backend/tests/build
  cmake -DZINT_DEBUG:BOOL=1 ..
  make

To undo sanitize/debug, remake each after setting:

  cmake -DZINT_SANITIZE:BOOL=0 ..
  cmake -DZINT_DEBUG:BOOL=0 ..

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

  cmake -DZINT_TEST:BOOL=0 ..

(The tests will now fail to link.)