test/baseTest.h File Reference

#include <iostream>
#include <vector>
#include <algorithm>
#include <stdexcept>
#include "testThread.h"
#include "threadRunner.h"
#include "randArrayGenerator.h"

Go to the source code of this file.

Classes

class  BaseTest< DataType >

Defines

#define STR(X)   #X
#define DEFINITION(DS, TYPE)   extern const char DS##TYPE[] = STR(DS##_##TYPE)
#define NAME(DS, TYPE)   DS##TYPE
#define TYPEDEF(TESTCASE, DS, TYPE, NAME)   typedef TESTCASE<DS<TYPE >,TYPE, NAME > DS##_##TYPE
#define TYPEDEF_2_PARA(TESTCASE, DS, TYPE1, TYPE2, NAME)   typedef TESTCASE<DS<TYPE1,TYPE2 >, TYPE2, NAME > DS##_##TYPE2
#define REGISTRATION_TEST(TESTCASE, DS, TYPE)
#define REGISTRATION_TEST_2_PARA(TESTCASE, DS, TYPE1, TYPE2)


Define Documentation

#define DEFINITION ( DS,
TYPE   )     extern const char DS##TYPE[] = STR(DS##_##TYPE)

#define NAME ( DS,
TYPE   )     DS##TYPE

#define REGISTRATION_TEST ( TESTCASE,
DS,
TYPE   ) 

Value:

DEFINITION(DS,TYPE);\
                                                                                        TYPEDEF(TESTCASE,DS,TYPE,NAME(DS,TYPE));\
                                            DS<TYPE > DS##_##TYPE##var;\
                                            DS##_##TYPE DS##_##TYPE##temp;\
                                                                                        CPPUNIT_TEST_SUITE_REGISTRATION( DS##_##TYPE );

#define REGISTRATION_TEST_2_PARA ( TESTCASE,
DS,
TYPE1,
TYPE2   ) 

Value:

DEFINITION(DS,TYPE2);\
                                                                                        TYPEDEF_2_PARA(TESTCASE,DS,TYPE1,TYPE2,NAME(DS,TYPE2));\
                                                                                        CPPUNIT_TEST_SUITE_REGISTRATION( DS##_##TYPE2 );

#define STR (  )     #X

These macros are used to register a cppunit test more conveniently.

Author:
Hui Rui

#define TYPEDEF ( TESTCASE,
DS,
TYPE,
NAME   )     typedef TESTCASE<DS<TYPE >,TYPE, NAME > DS##_##TYPE

#define TYPEDEF_2_PARA ( TESTCASE,
DS,
TYPE1,
TYPE2,
NAME   )     typedef TESTCASE<DS<TYPE1,TYPE2 >, TYPE2, NAME > DS##_##TYPE2


Generated on Tue Dec 9 13:39:39 2008 for Amino by  doxygen 1.5.6