zint/backend/tests
2020-04-05 22:38:08 +00:00
..
cmake/Modules New files 2019-09-01 21:09:47 +01:00
data emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +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 emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01:00
README libzint.so: suppress exporting INTERNAL functions to the shared library; ZINT_TEST 2019-12-19 00:37:55 +00:00
test_auspost.c #181 OSS-Fuzz TELEPEN fix, allow for 16 char nul encodings in buffer 2020-03-26 14:22:27 +00:00
test_aztec.c #189 AZTEC gs1 FLG(0) missing after FLG(n) fix from Milton Neal; tests 2020-04-05 23:32:08 +01:00
test_channel.c KOREAPOST missing from is_linear; tests update 2019-10-14 09:49:15 +01:00
test_codablock.c CODABLOCKF inter-row bindings too short fix; -Wextra; tests 2020-04-03 19:40:59 +01:00
test_code1.c #181 OSS-Fuzz CODEONE fix, double indexing typo 2020-03-28 10:13:06 +00:00
test_code128.c emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01:00
test_common.c emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01:00
test_composite.c #181 OSS-Fuzz UPC/EAN fix, allow max 6 chars add-on in ean_leading_zeroes() 2020-03-26 09:35:04 +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_dotcode.c emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01: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 Full multibyte option_3 for QR, HANXIN, GRIDMATRIX 2020-04-02 14:41:13 +01: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 Full multibyte option_3 for QR, HANXIN, GRIDMATRIX 2020-04-02 14:41:13 +01:00
test_gridmtx.c Full multibyte option_3 for QR, HANXIN, GRIDMATRIX 2020-04-02 14:41:13 +01: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 Full multibyte option_3 for QR, HANXIN, GRIDMATRIX 2020-04-02 14:41:13 +01:00
test_imail.c QR optimize encoding modes 2019-12-16 17:31:52 +00:00
test_library.c emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01:00
test_mailmark.c KOREAPOST missing from is_linear; tests update 2019-10-14 09:49:15 +01:00
test_maxicode.c #181 OSS-Fuzz MAXICODE fix, prevent index overrun on numeric compaction 2020-03-28 02:50:15 +00:00
test_pdf417.c #181 OSS-Fuzz PDF417 fix, increase buffers to 2710 (max possible input length) 2020-03-28 15:10:53 +00:00
test_png.c emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01: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_print.c emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01:00
test_qr.c Full multibyte option_3 for QR, HANXIN, GRIDMATRIX 2020-04-02 14:41:13 +01: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 Test for #183 Databar Stacked separator 2020-03-29 20:04:47 +01: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 Full multibyte option_3 for QR, HANXIN, GRIDMATRIX 2020-04-02 14:41:13 +01:00
test_svg.c emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01:00
test_telepen.c #181 OSS-Fuzz TELEPEN fix, allow for 16 char nul encodings in buffer 2020-03-26 14:22:27 +00:00
test_upcean.c #181 OSS-Fuzz UPC/EAN fix, allow max 6 chars add-on in ean_leading_zeroes() 2020-03-26 09:35:04 +00:00
test_vector.c CODABLOCKF inter-row bindings too short fix; -Wextra; tests 2020-04-03 19:40:59 +01:00
testcommon.c emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01:00
testcommon.h emf free malloc bufs; tif don't free alloca bufs (Win); -Wextra; tests 2020-04-04 16:53:29 +01: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.)