aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/tests/CppTestHarness/Test.cpp
diff options
context:
space:
mode:
authordan miller2007-10-21 08:36:32 +0000
committerdan miller2007-10-21 08:36:32 +0000
commit2f8d7092bc2c9609fa98d6888106b96f38b22828 (patch)
treeda6c37579258cc965b52a75aee6135fe44237698 /libraries/ode-0.9/tests/CppTestHarness/Test.cpp
parent* Committing new PolicyManager based on an ACL system. (diff)
downloadopensim-SC-2f8d7092bc2c9609fa98d6888106b96f38b22828.zip
opensim-SC-2f8d7092bc2c9609fa98d6888106b96f38b22828.tar.gz
opensim-SC-2f8d7092bc2c9609fa98d6888106b96f38b22828.tar.bz2
opensim-SC-2f8d7092bc2c9609fa98d6888106b96f38b22828.tar.xz
libraries moved to opensim-libs, a new repository
Diffstat (limited to 'libraries/ode-0.9/tests/CppTestHarness/Test.cpp')
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/Test.cpp49
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
8namespace CppTestHarness
9{
10
11Test::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
18Test::~Test()
19{
20}
21
22void 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