core/testlib/testlib_register.h File Reference


Detailed Description

Author:
Amitha Perera Macros for registering the tests with the driver.

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;
The DEFINE_MAIN macro will define the main() function for the driver. You will also have to link in a file defining a function
   int some_test_name_main(int,char*[])
See the vxl tests for further examples (such as vil/tests).

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 Documentation

#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 Documentation

typedef int(*) TestMainFunction(int, char *[])

Definition at line 30 of file testlib_register.h.


Function Documentation

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.


Generated on Sat Nov 22 05:10:24 2008 for core/testlib by  doxygen 1.5.1