CoCppUnit.h File Reference

#include "cppunit/extensions/HelperMacros.h"
#include "DataTestSuite.h" [code]
#include "DataTestCaller.h" [code]

Include dependency graph for CoCppUnit.h:

Go to the source code of this file.

Defines

#define CPPUNIT_DATA_TEST(testMethod)
 Add a test data suite for a method as a sub-suite to the suite.
#define CPPUNIT_DATA_FOR(testMethod)
 Starts the declaration of the data tests for a method.
#define CPPUNIT_DATA_FOR_END()   return __returnData; }
 Ends the declaration of the data tests for a method.
#define CPPUNIT_DATA_SET(name)
 Starts the declaration of the data test for a method.
#define CPPUNIT_DATA_SET_END()   }
 Ends the declaration of the data test for a method.
#define CPPUNIT_FETCH_DATA(testMethod)   std::auto_ptr <testMethod##Data> t ((testMethod##Data *) __currentTestData);
 Fetches the current data test from a data suit.


Define Documentation

#define CPPUNIT_DATA_FOR testMethod   ) 
 

Value:

CppUnitVector <std::pair <std::string, void *> >      \
    testMethod##_data()                                   \
    { CppUnitVector <std::pair <std::string, void *> > __returnData; \
      typedef testMethod##Data __testDataTypedef;
Starts the declaration of the data tests for a method.

Parameters:
testMethod Name of the method for which the data tests should be run.
See also:
CPPUNIT_DATA_TEST.

CPPUNIT_DATA_FOR_END.

Definition at line 48 of file CoCppUnit.h.

 
#define CPPUNIT_DATA_FOR_END  )     return __returnData; }
 

Ends the declaration of the data tests for a method.

Parameters:
testMethod Name of the method for which the data tests should be run.
See also:
CPPUNIT_DATA_TEST.

CPPUNIT_DATA_FOR.

Definition at line 59 of file CoCppUnit.h.

#define CPPUNIT_DATA_SET name   ) 
 

Value:

{ __testDataTypedef *t = new __testDataTypedef;       \
      __returnData.push_back(                             \
        std::pair <std::string, void *> ( name, t ) );
Starts the declaration of the data test for a method.

Parameters:
testMethod Name of the method for which this data test should be run.
name Name of this data test.
See also:
CPPUNIT_DATA_TEST.

CPPUNIT_DATA_FOR.

CPPUNIT_DATA_FOR_END.

CPPUNIT_DATA_SET_END.

Definition at line 70 of file CoCppUnit.h.

 
#define CPPUNIT_DATA_SET_END  )     }
 

Ends the declaration of the data test for a method.

See also:
CPPUNIT_DATA_TEST.

CPPUNIT_DATA_FOR.

CPPUNIT_DATA_FOR_END.

CPPUNIT_DATA_SET.

Definition at line 81 of file CoCppUnit.h.

#define CPPUNIT_DATA_TEST testMethod   ) 
 

Value:

CPPUNIT_TEST_SUITE_ADD_TEST(                          \
        ( new CPPUNIT_NS::DataTestSuite<TestFixtureType>( \
                  context.getTestNameFor( #testMethod),   \
                  &TestFixtureType::testMethod,           \
                  &TestFixtureType::testMethod##_data,    \
                  context ) ) )
Add a test data suite for a method as a sub-suite to the suite.

Parameters:
testMethod Name of the method of the test case to add to the suite. The signature of the method must be of type: void testMethod(); You must declare the data for which testMethod should be run using CPPUNIT_DATA_FOR.
See also:
CPPUNIT_TEST_SUITE.

CPPUNIT_DATA_FOR.

Definition at line 35 of file CoCppUnit.h.

#define CPPUNIT_FETCH_DATA testMethod   )     std::auto_ptr <testMethod##Data> t ((testMethod##Data *) __currentTestData);
 

Fetches the current data test from a data suit.

Parameters:
testMethod Name of the method for which a data test should be fetched.
See also:
CPPUNIT_DATA_TEST.

Definition at line 88 of file CoCppUnit.h.