A test driver program would simply look like
#include <testlib/testlib_register.h> DECLARE( some_test_name ); void register_tests() { REGISTER( some_test_name ); } DEFINE_MAIN;
int some_test_name_main(int,char*[])
Definition in file testlib_register.h.
#include <vcl_string.h>
Go to the source code of this file.
Defines | |
| #define | DECLARE(testname) int _cdecl testname ## _main ( int argc, char* argv[] ) |
| Declare the existence of the test. | |
Typedefs | |
| typedef int(*) | TestMainFunction (int, char *[]) |
Functions | |
| void | testlib_register_test (const vcl_string &, TestMainFunction) |
| void | testlib_cleanup () |
| int | main (int argc, char *argv[]) |
| #define DECLARE | ( | testname | ) | int _cdecl testname ## _main ( int argc, char* argv[] ) |
Declare the existence of the test.
If you DECLARE( x ), then you will need to define a function int x_main(int,char*[]).
Definition at line 37 of file testlib_register.h.
| typedef int(*) TestMainFunction(int, char *[]) |
Definition at line 30 of file testlib_register.h.
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 58 of file testlib_register.h.
| void testlib_cleanup | ( | ) |
Definition at line 198 of file testlib_main.cxx.
| void testlib_register_test | ( | const vcl_string & | , | |
| TestMainFunction | ||||
| ) |
Definition at line 191 of file testlib_main.cxx.
1.5.1