![]() |
Home | Libraries | People | FAQ | More |
A lightweight, minimal version of the testing framework can be obtained
by including <boost/test/minimal.hpp>
. This header
provides only the following macros:
Macro |
Meaning |
---|---|
|
If expression is false, the test fails and test execution continues. |
|
If expression is false, the test fails and test execution terminates. |
|
Report message, fail the test and continue test execution. |
|
Report message, fail the test and terminate test execution. |
The header supplies an implementation of main
that executes
a single test case by calling a free function named test_main
with the following signature:
int test_main(int argc, char *argv[]);
The arguments argc
and argv
are passed
to test_main
from the implementation of main
supplied by the test framework. No command-line argument processing is
performed by main
. A summary report of errors recorded
by the test case is printed out after executing the test case. If any exception
is thrown by the test case, it is caught by main
and
treated as an error from the test case.
#include <boost/test/minimal.hpp> int test_main(int argc, char *argv[]) { // test case }