Test suite: add testRun allowing args; testSkip; haveIdentify/etc; general tidy-up

This commit is contained in:
gitlost
2020-05-05 22:28:25 +01:00
parent 3fea67890b
commit 5eafa2e094
38 changed files with 2211 additions and 1518 deletions

View File

@ -20,15 +20,36 @@ Then make the tests:
(ZINT_TEST is needed to export INTERNAL functions for use and testing.)
To run all tests:
------------------------------------------------------------------------------
make test
To run all tests (within <project-dir>/backend/tests/build):
ctest
To run individual tests, eg:
./test_common
./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
To run a single dataset item in a single test function, use '-i <index>':
./test_dotcode -f input -i 2
To show debug info (if any), use '-d <flag>':
./test_dotcode -f input -i 2 -d 1
To generate test data, use '-g':
./test_dotcode -f encode -g
------------------------------------------------------------------------------
To make with gcc sanitize, first set for libzint and make:
cd <project-dir>