At any time, the tests can be executed by loading the program and
Run all individual tests of all test-units.
Run only the specified tests. The following options are available:
Suppresses informational messages.
Prints informational messages, e.g. messages for each successful test. This is the default.
Binds Count to the number of non-blocked tests that were successful, failed or skipped, respectively. A test is skipped if one of its conditions fails.
The following will quetly run all tests, but print messages and fail if any of the tests were unsuccessful.
| ?- run_tests(all, [failed(0), quiet]).
Spec should be one of:
all, to run all tests. This is the default i.e. what
Running single tests is particularly useful for tracing a test, e.g.:
| ?- trace, run_tests(lists:reverse).
run_tests/[0,1,2] prints a report during execution. The
quiet options suppresses informational messages; in its absence,
messages are printed in full as follows.
First, each test-unit report begins with a header:
% PL-Unit: Unit
Then comes a message (success or failure) for all specified tests not
fixme. Success messages are
informational; others are error or warning messages. Any errors
encountered while executing options are also reported. To close the
test-unit, a footer is printed:
After all test-units, a summary report is printed, stating: