mikemirzayanov 748bcf3c48 - macos-11; + test-008_format hace 3 meses
..
docker f5b8c283a6 More in Docker tests hace 1 año
lib 8884fb83d3 Disable ubuntu1804 tests hace 1 año
scripts 5c1ee388f4 fix hace 3 meses
src 6a52d7ded3 WIP: tests hace 2 años
test-000_compile-all-cpp 83754eac80 gitignore, shell scripts reformat and small changes hace 2 años
test-001_run-sval-case-nval 7b15e65aba revert 10000->10'000, fix macos-12-gpp, macos-13-gpp hace 3 meses
test-002_run-fcmp-wcmp 139afc4c51 skipBom only in checker-mode for output, more tests hace 2 años
test-003_run-rnd 7cf5a1e493 Merge branch 'master' into HeRaNO-fix-171-wany hace 1 año
test-004_use-test.h 4c57080f68 better stringToLongLong/stringToUnsignedLongLong hace 1 año
test-005_no-register 925cb4e212 Check on testlib exit that register-function has been actually called hace 2 años
test-005_opts 14bf287607 Extract test-005_opts, supress->suppress hace 2 años
test-006_interactors b3fad97bf2 wip hace 1 año
test-007_validators 36041fcbf8 Added ConstantBoundsLog, VariablesLog to validator testOverviewLogFile hace 11 meses
test-008_format 748bcf3c48 - macos-11; + test-008_format hace 3 meses
README.md fbaddab134 tests/README.md hace 2 años
file-runner.py b3fad97bf2 wip hace 1 año
run.sh a591441e36 wip hace 1 año
t.bat 47fbf578bf Set executable flags for test scripts hace 2 años
t.sh 47fbf578bf Set executable flags for test scripts hace 2 años

README.md

Tests

Some features of the library are covered by tests. If you understand well how this or that functionality of the library works, then you can add a test for it.

First of all, consider adding a test to test-004_use-test.h (carefully study the design of this test).

Note the use of test-ref script in the tests, which checks that a process has exited with the expected exit code, standard output, and standard error.

It is highly desirable to cover all new functionality with tests. If the functionality is such that it is not very difficult to write tests, then the presence of tests is required.

CI

On each push and pull requests tests will run. Please make sure that your changes didn't break them.

How run tests locally

Use tests\run.sh. Also you can use t.sh (or t.bat) to run shortcut of run.sh g++ 11 v0 $*.

Parameters (use can use all combinations):

  • g++, clang++, msvc - to specify compiler(s)
  • 11, 14, 17, 20, 23 - to specify standard(s)
  • vxx (example v10) - to try -10 suffix to run compilers, like g++-10, use v0 to run without any suffixes
  • test- - to specify test(s)

Examples:

  • bash run.sh - to run all tests on all compilers on multiple standards
  • bash run.sh g++ - to run all tests on g++ on multiple standards
  • bash run.sh g++ 11 - to run all tests on g++ with --std=c++11
  • bash run.sh g++ 11 test-001_run-sval - to run test-001_run-sval on g++ with --std=c++11
  • bash run.sh test-001_run-sval - to run test-001_run-sval on all compilers on multiple standards
  • bash run.sh g++ 11 17 - to run all tests on g++ with --std=c++11 and with --std=c++17