diff options
author | dan miller | 2007-10-19 05:20:48 +0000 |
---|---|---|
committer | dan miller | 2007-10-19 05:20:48 +0000 |
commit | d48ea5bb797037069d641da41da0f195f0124491 (patch) | |
tree | 40ff433d94859d629aac933d5ec73b382f62ba1a /libraries/ode-0.9/tests/CppTestHarness/TestMacros.h | |
parent | dont ask (diff) | |
download | opensim-SC-d48ea5bb797037069d641da41da0f195f0124491.zip opensim-SC-d48ea5bb797037069d641da41da0f195f0124491.tar.gz opensim-SC-d48ea5bb797037069d641da41da0f195f0124491.tar.bz2 opensim-SC-d48ea5bb797037069d641da41da0f195f0124491.tar.xz |
one more for the gipper
Diffstat (limited to 'libraries/ode-0.9/tests/CppTestHarness/TestMacros.h')
-rw-r--r-- | 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 100644 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 | |||