CppUnit project page CppUnit home page

testfunction.h File Reference

#include "forwards.h"
#include "extendeddata.h"
#include "testcase.h"
#include "registry.h"

Include dependency graph for testfunction.h:

Go to the source code of this file.

Namespaces

namespace  CppUT

Classes

class  CppUT::TestFunctionFactory

Defines

#define CPPUT_REGISTER_TEST_FUNCTION(testFunction)
 Make the specified C function a test case and register it in the default Registry suite.
#define CPPUT_REGISTER_TEST_FUNCTION_IN(testFunction, parentSuiteName)
 Make the specified C function a test case and register it in the specified Registry suite.
#define CPPUT_TEST_FUNCTION(testFunctionName)
 Declare and register a simple test case in the default Registry suite. The function is declared as a static void testFunction().
#define CPPUT_TEST_FUNCTION_IN(testFunctionName, parentSuiteName)
 Declare and register a simple test case in the specified Registry suite. The function is declared as a static void testFunction().


Define Documentation

#define CPPUT_REGISTER_TEST_FUNCTION ( testFunction   ) 

Value:

Make the specified C function a test case and register it in the default Registry suite.

 static void myTest1() {
   CPPUT_ASSERT_TRUE( false );
 }
 CPPUT_REGISTER_TEST_FUNCTION( myTest1 );

#define CPPUT_REGISTER_TEST_FUNCTION_IN ( testFunction,
parentSuiteName   ) 

Value:

CPPUT_REGISTER_TESTFACTORY_IN(                                                   \
   ::CppTL::fn0r( ::CppUT::TestFunctionFactory( &testFunction, #testFunction )),    \
      parentSuiteName )
Make the specified C function a test case and register it in the specified Registry suite.

 static void myTest1() {
   CPPUT_ASSERT_TRUE( false );
 }
 CPPUT_REGISTER_TEST_FUNCTION_IN( myTest1, "BoolTest" );

#define CPPUT_TEST_FUNCTION ( testFunctionName   ) 

Value:

static void testFunctionName();                    \
   CPPUT_REGISTER_TEST_FUNCTION( testFunctionName );  \
   static void testFunctionName()
Declare and register a simple test case in the default Registry suite. The function is declared as a static void testFunction().

 CPPUT_TEST_FUNCTION( myTest1 ) {
   CPPUT_ASSERT_TRUE( false );
 }

#define CPPUT_TEST_FUNCTION_IN ( testFunctionName,
parentSuiteName   ) 

Value:

static void testFunctionName();                                        \
   CPPUT_REGISTER_TEST_FUNCTION_IN( testFunctionName, parentSuiteName );  \
   static void testFunctionName()
Declare and register a simple test case in the specified Registry suite. The function is declared as a static void testFunction().

 CPPUT_TEST_FUNCTION_IN( myTest1, "BoolTests" ) {
   CPPUT_ASSERT_TRUE( false );
 }


SourceForge Logo hosts this site. Send comments to:
CppUnit Developers