Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

unit_test.h File Reference


Detailed Description

Public header for the ALP Unit Tests.

#include <dlfcn.h>
#include <stdarg.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/Exception.h>
#include <cppunit/TestCase.h>
#include <pthread.h>
#include <signal.h>
#include <sys/errno.h>
#include <sys/shm.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <unistd.h>

Go to the source code of this file.

Data Structures

class  ExceptionData
class  TimeOutTestCaller< Fixture >
class  BundleLoader

Defines

#define CPPUNIT_REGISTRY_TYPE_AUTO   "Auto"
#define CPPUNIT_REGISTRY_TYPE_MANUAL   "Manual"
#define CPPUNIT_REGISTRY_TYPE_STRESS   "Stress"
#define CPPUNIT_MAKE_UNIQUE_NAME(prefix)   CPPUNIT_JOIN( autoRegisterRegistry__, __LINE__ )
#define ALP_ROOT_TEST_SUITE_REGISTRATION(registryName, registryType)
#define CPPUNIT_NOFORK_TEST(testMethod)
#define MAX_TEST_TIME_IN_SECONDS   15
#define CPPUNIT_TIMED_TEST(testMethod, timeLimit)
#define CPPUNIT_TIMED_EXCEPTION_TEST(testMethod, timeLimit, ExceptionType)
#define CPPUNIT_TEST(testMethod)   CPPUNIT_TIMED_TEST( testMethod, MAX_TEST_TIME_IN_SECONDS )
#define CPPUNIT_TEST_FAIL(testMethod)   CPPUNIT_TIMED_EXCEPTION_TEST( testMethod, MAX_TEST_TIME_IN_SECONDS, CPPUNIT_NS::Exception )
#define CPPUNIT_TEST_EXCEPTION(testMethod, ExceptionType)   CPPUNIT_TIMED_EXCEPTION_TEST( testMethod, MAX_TEST_TIME_IN_SECONDS, ExceptionType )

Functions

 CPPUNIT_REGISTRY_ADD_TO_DEFAULT (CPPUNIT_REGISTRY_TYPE_AUTO)
 CPPUNIT_REGISTRY_ADD_TO_DEFAULT (CPPUNIT_REGISTRY_TYPE_MANUAL)
 CPPUNIT_REGISTRY_ADD_TO_DEFAULT (CPPUNIT_REGISTRY_TYPE_STRESS)


Define Documentation

#define ALP_ROOT_TEST_SUITE_REGISTRATION registryName,
registryType   ) 
 

Value:

extern "C" int AddSuite( void ) \
        {\
                CPPUNIT_NS::TestFactoryRegistry::getRegistry( registryName );\
                return 0;\
        }\
        CPPUNIT_REGISTRY_ADD( registryName, registryType );

#define CPPUNIT_MAKE_UNIQUE_NAME prefix   )     CPPUNIT_JOIN( autoRegisterRegistry__, __LINE__ )
 

#define CPPUNIT_NOFORK_TEST testMethod   ) 
 

Value:

CPPUNIT_TEST_SUITE_ADD_TEST(    \
        ( new CPPUNIT_NS::TestCaller<TestFixtureType>(  \
                                context.getTestNameFor( #testMethod),   \
                                &TestFixtureType::testMethod,   \
                                context.makeFixture() ) ) )

#define CPPUNIT_REGISTRY_TYPE_AUTO   "Auto"
 

#define CPPUNIT_REGISTRY_TYPE_MANUAL   "Manual"
 

#define CPPUNIT_REGISTRY_TYPE_STRESS   "Stress"
 

#define CPPUNIT_TEST testMethod   )     CPPUNIT_TIMED_TEST( testMethod, MAX_TEST_TIME_IN_SECONDS )
 

#define CPPUNIT_TEST_EXCEPTION testMethod,
ExceptionType   )     CPPUNIT_TIMED_EXCEPTION_TEST( testMethod, MAX_TEST_TIME_IN_SECONDS, ExceptionType )
 

#define CPPUNIT_TEST_FAIL testMethod   )     CPPUNIT_TIMED_EXCEPTION_TEST( testMethod, MAX_TEST_TIME_IN_SECONDS, CPPUNIT_NS::Exception )
 

#define CPPUNIT_TIMED_EXCEPTION_TEST testMethod,
timeLimit,
ExceptionType   ) 
 

Value:

CPPUNIT_TEST_SUITE_ADD_TEST(    \
                (new CPPUNIT_NS::ExceptionTestCaseDecorator< ExceptionType >(   \
                        new CPPUNIT_NS::TimeOutTestCaller< TestFixtureType >(   \
                                context.getTestNameFor( #testMethod ),  \
                                &TestFixtureType::testMethod,   \
                                context.makeFixture(),  \
                                timeLimit ) ) ) )

#define CPPUNIT_TIMED_TEST testMethod,
timeLimit   ) 
 

Value:

CPPUNIT_TEST_SUITE_ADD_TEST(    \
                ( new CPPUNIT_NS::TimeOutTestCaller<TestFixtureType>(   \
                                context.getTestNameFor( #testMethod ),  \
                                &TestFixtureType::testMethod,   \
                                context.makeFixture(),  \
                                timeLimit ) ) )

#define MAX_TEST_TIME_IN_SECONDS   15
 


Function Documentation

CPPUNIT_REGISTRY_ADD_TO_DEFAULT CPPUNIT_REGISTRY_TYPE_STRESS   ) 
 

CPPUNIT_REGISTRY_ADD_TO_DEFAULT CPPUNIT_REGISTRY_TYPE_MANUAL   ) 
 

CPPUNIT_REGISTRY_ADD_TO_DEFAULT CPPUNIT_REGISTRY_TYPE_AUTO   ) 
 


Generated on Sat Dec 16 20:29:48 2006 for hiker-0.9 by  doxygen 1.4.4