zint/backend/tests
2020-04-28 22:19:32 +01:00
..
cmake/Modules New files 2019-09-01 21:09:47 +01:00
data ULTRA: C43 latch, shift; double digit; ECI; tests, refresh EMFs 2020-04-20 19:17: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 ULTRA: enable compression for GS1_MODE; compression changes; fixes; tests 2020-04-09 22:08:54 +01:00
README Tests: fix README (Robin); refresh print GIFs after palette optimize 2020-04-08 21:19:30 +01: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 AZTEC #190 count only B-1 bits; #191 suppress valgrind, clang-tidy warnings 2020-04-28 13:45:36 +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 ULTRA: enable compression for GS1_MODE; compression changes; fixes; tests 2020-04-09 22:08:54 +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 Fix PCX issue with odd bitmap width; tests; comment GRIDMATRIX byte count 2020-04-06 21:26: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 Fix PCX issue with odd bitmap width; tests; comment GRIDMATRIX byte count 2020-04-06 21:26: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 Fix PCX issue with odd bitmap width; tests; comment GRIDMATRIX byte count 2020-04-06 21:26: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_pcx.c Fix PCX issue with odd bitmap width; tests; comment GRIDMATRIX byte count 2020-04-06 21:26:13 +01: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 ULTRA: enable compression for GS1_MODE; compression changes; fixes; tests 2020-04-09 22:08:54 +01:00
test_qr.c QRCODE: #191 suppress clang-tidy warnings 2020-04-28 21:10:54 +01:00
test_raster.c raster.c: #191 suppress clang-tidy warnings 2020-04-28 22:19:32 +01: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 Fix PCX issue with odd bitmap width; tests; comment GRIDMATRIX byte count 2020-04-06 21:26: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_ultra.c ULTRA: C43 latch, shift; double digit; ECI; tests, refresh EMFs 2020-04-20 19:17:15 +01: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 ULTRA: enable compression for GS1_MODE; compression changes; fixes; tests 2020-04-09 22:08:54 +01:00
testcommon.h ULTRA: enable compression for GS1_MODE; compression changes; fixes; tests 2020-04-09 22:08:54 +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.)