20 #define GET_TEST_SUITE(SUITE) \
21 getTestSuite_##SUITE##_()
26 #define TEST_SUITE(SUITE) TEST_SUITE2(root, SUITE)
28 #define TEST_SUITE2(PARENT, SUITE) \
29 TestSuite& GET_TEST_SUITE(PARENT); \
30 TestSuite& GET_TEST_SUITE(SUITE) { \
31 static TestSuite suite(#SUITE); \
34 class _Helper_Suite_##SUITE { \
36 _Helper_Suite_##SUITE() { \
37 GET_TEST_SUITE(PARENT).add(&GET_TEST_SUITE(SUITE)); \
39 } _Helper_Suite_##SUITE;
41 #define TEST(SUITE, TEST_NAME) \
42 TestSuite& GET_TEST_SUITE(SUITE); \
43 class _testCase_##SUITE##_##TEST_NAME : public TestCase { \
45 void run(const char* __nameOfTest, bool _printDots); \
46 _testCase_##SUITE##_##TEST_NAME(): \
47 TestCase(#TEST_NAME) {} \
49 class _Helper_testCase_##SUITE##_##TEST_NAME { \
51 _Helper_testCase_##SUITE##_##TEST_NAME() { \
52 static _testCase_##SUITE##_##TEST_NAME test; \
53 GET_TEST_SUITE(SUITE).add(&test); \
55 } static _helper_testCase_##SUITE##_##TEST_NAME; \
56 void _testCase_##SUITE##_##TEST_NAME::run \
57 (const char* __nameOfTest, bool __printDots)
59 #define FRIEND_TEST(SUITE, TEST_NAME) \
60 friend class _testCase_##SUITE##_##TEST_NAME
Represents a collection of tests, be they individual tests or yet other collections of tests.
#define GET_TEST_SUITE(SUITE)