diff options
Diffstat (limited to 'libraries/ode-0.9\/tests/CppTestHarness/TestMacros.h')
-rwxr-xr-x | libraries/ode-0.9\/tests/CppTestHarness/TestMacros.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libraries/ode-0.9\/tests/CppTestHarness/TestMacros.h b/libraries/ode-0.9\/tests/CppTestHarness/TestMacros.h new file mode 100755 index 0000000..12a91cd --- /dev/null +++ b/libraries/ode-0.9\/tests/CppTestHarness/TestMacros.h | |||
@@ -0,0 +1,48 @@ | |||
1 | #ifndef TEST_MACROS_H | ||
2 | #define TEST_MACROS_H | ||
3 | |||
4 | //---------------------------- | ||
5 | #define TEST(Name) \ | ||
6 | class Test##Name : public CppTestHarness::Test \ | ||
7 | { \ | ||
8 | public: \ | ||
9 | Test##Name() : Test(#Name, __FILE__, __LINE__) {} \ | ||
10 | private: \ | ||
11 | virtual void RunImpl(CppTestHarness::TestResults& testResults_); \ | ||
12 | }; \ | ||
13 | CppTestHarness::TypedTestLauncher< Test##Name > \ | ||
14 | staticInitTest##Name##Creator(CppTestHarness::TestLauncher::GetHeadAddr()); \ | ||
15 | \ | ||
16 | void Test##Name::RunImpl(CppTestHarness::TestResults& testResults_) | ||
17 | |||
18 | //---------------------------- | ||
19 | #define TEST_FIXTURE(Fixture, Name) \ | ||
20 | class Test##Name : public CppTestHarness::Test, public Fixture \ | ||
21 | { \ | ||
22 | public: \ | ||
23 | Test##Name() : Test(#Name, __FILE__, __LINE__) {} \ | ||
24 | private: \ | ||
25 | virtual void RunImpl(CppTestHarness::TestResults& testResults_); \ | ||
26 | }; \ | ||
27 | CppTestHarness::TypedTestLauncher< Test##Name > \ | ||
28 | staticInitTest##Name##Creator(CppTestHarness::TestLauncher::GetHeadAddr()); \ | ||
29 | \ | ||
30 | void Test##Name::RunImpl(CppTestHarness::TestResults& testResults_) | ||
31 | |||
32 | //---------------------------- | ||
33 | #define TEST_FIXTURE_CTOR(Fixture, CtorParams, Name) \ | ||
34 | class Test##Name : public CppTestHarness::Test, public Fixture \ | ||
35 | { \ | ||
36 | public: \ | ||
37 | Test##Name() : Test(#Name, __FILE__, __LINE__), Fixture CtorParams {} \ | ||
38 | private: \ | ||
39 | virtual void RunImpl(CppTestHarness::TestResults& testResults_); \ | ||
40 | }; \ | ||
41 | CppTestHarness::TypedTestLauncher< Test##Name > \ | ||
42 | staticInitTest##Name##Creator(CppTestHarness::TestLauncher::GetHeadAddr()); \ | ||
43 | \ | ||
44 | void Test##Name::RunImpl(CppTestHarness::TestResults& testResults_) | ||
45 | |||
46 | |||
47 | #endif | ||
48 | |||