Macros for registering the tests with the driver. More...
#include <vcl_string.h>Go to the source code of this file.
| Defines | |
| #define | DECLARE(testname) int testname ## _main ( int argc, char* argv[] ) | 
| Declare the existence of the test. | |
| #define | REGISTER(testname) testlib_register_test(#testname, & testname ## _main ); | 
| Register the test with the driver. | |
| #define | DEFINE_MAIN | 
| Define the main() routine for this test driver. | |
| Typedefs | |
| typedef int(* | TestMainFunction )(int, char *[]) | 
| Functions | |
| void | testlib_register_test (const vcl_string &, TestMainFunction) | 
Macros for registering the tests with the driver.
Definition in file testlib_register.h.
| #define DECLARE | ( | testname | ) | int 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 39 of file testlib_register.h.
| #define DEFINE_MAIN | 
int testlib_main(int,char*[]); \ void testlib_cleanup(); \ int main( int argc, char* argv[] ) { \ register_tests(); \ int retval = testlib_main( argc, argv ); \ testlib_cleanup(); \ return retval; \ }
Define the main() routine for this test driver.
This allows the main function to be defined in the driver code itself--instead of in the testlib library--thus avoiding "awf-weirdness". This also means that functionality from the test library, such as testlib_root_dir, can be used even if it is not used to create a test driver.
Definition at line 55 of file testlib_register.h.
| #define REGISTER | ( | testname | ) | testlib_register_test(#testname, & testname ## _main ); | 
Register the test with the driver.
| testname | should be the same as one of the tests declared with DECLARE. | 
Definition at line 46 of file testlib_register.h.
| typedef int(* TestMainFunction)(int, char *[]) | 
Definition at line 30 of file testlib_register.h.
| void testlib_register_test | ( | const vcl_string & | , | 
| TestMainFunction | |||
| ) | 
Definition at line 191 of file testlib_main.cxx.
 1.7.5.1
 1.7.5.1