Frobby  0.9.5
Macros | Functions
macroes.h File Reference

Go to the source code of this file.

Macros

#define GET_TEST_SUITE(SUITE)    getTestSuite_##SUITE##_()
 
#define TEST_SUITE(SUITE)   TEST_SUITE2(root, SUITE)
 
#define TEST_SUITE2(PARENT, SUITE)
 
#define TEST(SUITE, TEST_NAME)
 
#define FRIEND_TEST(SUITE, TEST_NAME)    friend class _testCase_##SUITE##_##TEST_NAME
 

Functions

TestSuiteGET_TEST_SUITE (root)
 

Macro Definition Documentation

◆ FRIEND_TEST

#define FRIEND_TEST (   SUITE,
  TEST_NAME 
)     friend class _testCase_##SUITE##_##TEST_NAME

Definition at line 59 of file macroes.h.

◆ GET_TEST_SUITE

#define GET_TEST_SUITE (   SUITE)     getTestSuite_##SUITE##_()

Definition at line 20 of file macroes.h.

◆ TEST

#define TEST (   SUITE,
  TEST_NAME 
)
Value:
class _testCase_##SUITE##_##TEST_NAME : public TestCase { \
public: \
void run(const char* __nameOfTest, bool _printDots); \
_testCase_##SUITE##_##TEST_NAME(): \
TestCase(#TEST_NAME) {} \
}; \
class _Helper_testCase_##SUITE##_##TEST_NAME { \
public: \
_Helper_testCase_##SUITE##_##TEST_NAME() { \
static _testCase_##SUITE##_##TEST_NAME test; \
GET_TEST_SUITE(SUITE).add(&test); \
} \
} static _helper_testCase_##SUITE##_##TEST_NAME; \
void _testCase_##SUITE##_##TEST_NAME::run \
(const char* __nameOfTest, bool __printDots)
Represents a test case, which is usually created through a macro that defines a subclass.
Definition: TestCase.h:29
Represents a collection of tests, be they individual tests or yet other collections of tests.
Definition: TestSuite.h:28
#define GET_TEST_SUITE(SUITE)
Definition: macroes.h:20

Definition at line 41 of file macroes.h.

◆ TEST_SUITE

#define TEST_SUITE (   SUITE)    TEST_SUITE2(root, SUITE)

Definition at line 26 of file macroes.h.

◆ TEST_SUITE2

#define TEST_SUITE2 (   PARENT,
  SUITE 
)
Value:
TestSuite& GET_TEST_SUITE(SUITE) { \
static TestSuite suite(#SUITE); \
return suite; \
} \
class _Helper_Suite_##SUITE { \
public: \
_Helper_Suite_##SUITE() { \
GET_TEST_SUITE(PARENT).add(&GET_TEST_SUITE(SUITE)); \
} \
} _Helper_Suite_##SUITE;

Definition at line 28 of file macroes.h.

Function Documentation

◆ GET_TEST_SUITE()

TestSuite& GET_TEST_SUITE ( root  )

Definition at line 22 of file macroes.cpp.