diff options
author | dan miller | 2007-10-19 05:20:07 +0000 |
---|---|---|
committer | dan miller | 2007-10-19 05:20:07 +0000 |
commit | fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd (patch) | |
tree | 51bcae7a1b8381a6bf6fd8025a7de1e30fe0045d /libraries/ode-0.9/tests/CppTestHarness/Test.cpp | |
parent | resubmitting ode (diff) | |
download | opensim-SC_OLD-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.zip opensim-SC_OLD-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.tar.gz opensim-SC_OLD-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.tar.bz2 opensim-SC_OLD-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.tar.xz |
dont ask
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 | |||