object
A simple unit test framework.
Runs the unit tests, writing the results to the specified file. Mode can be either "write" (to create a new file) or "append" (to add results to an existing file).
static
run(File,Mode)
run(+atom,+atom) – one
Runs the unit tests, writing the results to the current output stream.
static
run – one
run – one
Compares two float values for approximate equality using 100*epsilon for the absolute error and, if that fails, 99.999% accuracy for the relative error. Altough handy when writing certain unit tests, the default precision values may not be adequate for all cases.
static
Float1=~=Float2
+float=~= +float – zero_or_one
static
Runs a list of defined tests.
static
run_tests(Tests)
run_tests(+list(callable)) – one
Setup environment before running the test set. Defaults to the goal true.
static
setup – zero_or_one
Cleanup environment after running the test set. Defaults to the goal true.
static
cleanup – zero_or_one
Specifies a unit test.
static
test(Identifier,Outcome)
test(?atom,?nonvar) – zero_or_more
Table of defined tests.
dynamic
test_(?compound) – zero_or_more
Counter for passed tests.
dynamic
passed_(?integer) – zero_or_one
Counter for failed tests.
dynamic
failed_(?callable) – zero_or_one