the Compartmented Robust Posix C++ Unit Test system |
|
---|
The main function of crpcut which runs all selected tests
Used in: Typically the main function of the test program.
The prototype is:
int crpcut::run
(int argc
,
char *argv
[],
std::ostream& out
=
std::cerr)
and
int crpcut::run
(int argc
,
const char *argv
[],
std::ostream& out
=
std::cerr)
The return value is -1
if anything was printed
to out
, i.e. if the command line parameters in
argv
were in error, or a listing of tests
were requested (see -l
/ --list
.)
Otherwise the return value is the number of failed tests.
Tip | |
---|---|
A typical main () function is :
int main(int argc, char *argv[]) { return crpcut::run(argc, argv); }It is easy to write, and makes for good integration with tools for automation, since it is easy to capture test programs with failed tests. |