diff options
author | dan miller | 2007-10-19 05:22:23 +0000 |
---|---|---|
committer | dan miller | 2007-10-19 05:22:23 +0000 |
commit | 1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43 (patch) | |
tree | 51bcae7a1b8381a6bf6fd8025a7de1e30fe0045d /libraries/ode-0.9/tests/CppTestHarness/Test.cpp | |
parent | one more for the gipper (diff) | |
download | opensim-SC_OLD-1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43.zip opensim-SC_OLD-1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43.tar.gz opensim-SC_OLD-1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43.tar.bz2 opensim-SC_OLD-1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43.tar.xz |
trying to fix my screwup, please hold on
Diffstat (limited to 'libraries/ode-0.9/tests/CppTestHarness/Test.cpp')
-rw-r--r-- | libraries/ode-0.9/tests/CppTestHarness/Test.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/libraries/ode-0.9/tests/CppTestHarness/Test.cpp b/libraries/ode-0.9/tests/CppTestHarness/Test.cpp deleted file mode 100644 index 44b2dd8..0000000 --- a/libraries/ode-0.9/tests/CppTestHarness/Test.cpp +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #include "Test.h" | ||
2 | #include "TestResults.h" | ||
3 | |||
4 | #ifdef TRANSLATE_POSIX_SIGNALS | ||
5 | #include "SignalTranslator.h" | ||
6 | #endif | ||
7 | |||
8 | namespace CppTestHarness | ||
9 | { | ||
10 | |||
11 | Test::Test(std::string const testName, std::string const filename, int const lineNumber) | ||
12 | : m_testName(testName) | ||
13 | , m_filename(filename) | ||
14 | , m_lineNumber(lineNumber) | ||
15 | { | ||
16 | } | ||
17 | |||
18 | Test::~Test() | ||
19 | { | ||
20 | } | ||
21 | |||
22 | void Test::Run(TestResults& testResults) | ||
23 | { | ||
24 | try | ||
25 | { | ||
26 | #ifdef TRANSLATE_POSIX_SIGNALS | ||
27 | //add any signals you want translated into system exceptions here | ||
28 | SignalTranslator<SIGSEGV> sigSEGV; | ||
29 | SignalTranslator<SIGFPE> sigFPE; | ||
30 | SignalTranslator<SIGBUS> sigBUS; | ||
31 | #endif | ||
32 | RunImpl(testResults); | ||
33 | } | ||
34 | catch (std::exception const& e) | ||
35 | { | ||
36 | std::string msg = "Unhandled exception: "; | ||
37 | msg += e.what(); | ||
38 | testResults.ReportFailure(m_filename.c_str(), m_lineNumber, msg); | ||
39 | } | ||
40 | catch (...) | ||
41 | { | ||
42 | testResults.ReportFailure(m_filename.c_str(), m_lineNumber, "Unhandled exception: crash!"); | ||
43 | } | ||
44 | |||
45 | |||
46 | testResults.ReportDone(m_testName); | ||
47 | } | ||
48 | } | ||
49 | |||