aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/tests/CppTestHarness
diff options
context:
space:
mode:
authordan miller2007-10-19 05:15:33 +0000
committerdan miller2007-10-19 05:15:33 +0000
commit79eca25c945a535a7a0325999034bae17da92412 (patch)
tree40ff433d94859d629aac933d5ec73b382f62ba1a /libraries/ode-0.9/tests/CppTestHarness
parentadding ode source to /libraries (diff)
downloadopensim-SC-79eca25c945a535a7a0325999034bae17da92412.zip
opensim-SC-79eca25c945a535a7a0325999034bae17da92412.tar.gz
opensim-SC-79eca25c945a535a7a0325999034bae17da92412.tar.bz2
opensim-SC-79eca25c945a535a7a0325999034bae17da92412.tar.xz
resubmitting ode
Diffstat (limited to 'libraries/ode-0.9/tests/CppTestHarness')
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/CheckMacros.h27
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/Checks.h97
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.h14
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.sln28
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.vcproj227
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.cpp87
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.h36
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/Makefile.am28
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/Makefile.in562
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/PrintfTestReporter.cpp25
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/PrintfTestReporter.h20
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/ReadMe.txt34
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/SignalTranslator.h53
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/Test.cpp49
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/Test.h40
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TestLauncher.cpp39
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TestLauncher.h32
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TestMacros.h48
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TestReporter.cpp15
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TestReporter.h24
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TestResults.cpp30
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TestResults.h33
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TestRunner.cpp56
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TestRunner.h33
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/TypedTestLauncher.h27
25 files changed, 1664 insertions, 0 deletions
diff --git a/libraries/ode-0.9/tests/CppTestHarness/CheckMacros.h b/libraries/ode-0.9/tests/CppTestHarness/CheckMacros.h
new file mode 100644
index 0000000..85040b1
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/CheckMacros.h
@@ -0,0 +1,27 @@
1#ifndef CHECK_MACROS_H
2#define CHECK_MACROS_H
3
4#include "Checks.h"
5
6#define CHECK(value) \
7 if (!CppTestHarness::Check(value)) \
8 testResults_.ReportFailure(__FILE__, __LINE__, #value);
9
10#define CHECK_EQUAL(actual, expected) \
11 if (!CppTestHarness::CheckEqual(actual, expected)) \
12 testResults_.ReportFailure(__FILE__, __LINE__, CppTestHarness::BuildFailureString(expected, actual));
13
14#define CHECK_CLOSE(actual, expected, tolerance) \
15 if (!CppTestHarness::CheckClose(actual, expected, tolerance)) \
16 testResults_.ReportFailure(__FILE__, __LINE__, CppTestHarness::BuildFailureString(expected, actual));
17
18#define CHECK_ARRAY_EQUAL(actual, expected, count) \
19 if (!CppTestHarness::CheckArrayEqual(actual, expected, count)) \
20 testResults_.ReportFailure(__FILE__, __LINE__, CppTestHarness::BuildFailureString(expected, actual, count));
21
22#define CHECK_ARRAY_CLOSE(actual, expected, count, tolerance) \
23 if (!CppTestHarness::CheckArrayClose(actual, expected, count, tolerance)) \
24 testResults_.ReportFailure(__FILE__, __LINE__, CppTestHarness::BuildFailureString(expected, actual, count));
25
26#endif
27
diff --git a/libraries/ode-0.9/tests/CppTestHarness/Checks.h b/libraries/ode-0.9/tests/CppTestHarness/Checks.h
new file mode 100644
index 0000000..7b4c2ca
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/Checks.h
@@ -0,0 +1,97 @@
1#ifndef CHECKS_H
2#define CHECKS_H
3
4#include <sstream>
5#include <cmath>
6
7namespace CppTestHarness
8{
9 template< typename Value >
10 bool Check(Value const value)
11 {
12#ifdef _MSC_VER
13# pragma warning(push)
14# pragma warning(disable:4127) // conditional expression is constant
15# pragma warning(disable:4800) // forcing value to bool true/false, performance warning
16#endif
17 return value;
18#ifdef _MSC_VER
19# pragma warning(pop)
20#endif
21 }
22
23 template< typename Actual, typename Expected >
24 bool CheckEqual(Actual const actual, Expected const expected)
25 {
26#ifdef _MSC_VER
27# pragma warning(push)
28# pragma warning(disable:4127) // conditional expression is constant
29#endif
30 return (actual == expected);
31#ifdef _MSC_VER
32# pragma warning(pop)
33#endif
34 }
35
36 template< typename Actual, typename Expected >
37 bool CheckArrayEqual(Actual const actual, Expected const expected, int const count)
38 {
39 for (int i = 0; i < count; ++i)
40 {
41 if (!(actual[i] == expected[i]))
42 return false;
43 }
44
45 return true;
46 }
47
48 template< typename Actual, typename Expected, typename Tolerance >
49 bool CheckClose(Actual const actual, Expected const expected, Tolerance const tolerance)
50 {
51 return (std::abs(double(actual) - double(expected)) <= double(tolerance));
52 }
53
54 template< typename Actual, typename Expected, typename Tolerance >
55 bool CheckArrayClose(Actual const actual, Expected const expected, int const count, Tolerance const tolerance)
56 {
57 for (int i = 0; i < count; ++i)
58 {
59 if (!CheckClose(actual[i], expected[i], tolerance))
60 return false;
61 }
62
63 return true;
64 }
65
66 template< typename Actual, typename Expected >
67 std::string BuildFailureString(Actual const actual, Expected const expected)
68 {
69 std::stringstream failureStr;
70 failureStr << "Expected " << actual << " but got " << expected << std::endl;
71 return failureStr.str();
72 }
73
74 template< typename Actual, typename Expected >
75 std::string BuildFailureString(Actual const* actual, Expected const* expected, int const count)
76 {
77 std::stringstream failureStr;
78 int i;
79
80 failureStr << "Expected [ ";
81
82 for (i = 0; i < count; ++i)
83 failureStr << expected[i] << ' ';
84
85 failureStr << "] but got [ ";
86
87 for (i = 0; i < count; ++i)
88 failureStr << expected[i] << ' ';
89
90 failureStr << ']' << std::endl;
91
92 return failureStr.str();
93 }
94}
95
96#endif
97
diff --git a/libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.h b/libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.h
new file mode 100644
index 0000000..aa3b8ae
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.h
@@ -0,0 +1,14 @@
1#ifndef TEST_HARNESS_H
2#define TEST_HARNESS_H
3
4#include "Test.h"
5#include "TypedTestLauncher.h"
6#include "TestResults.h"
7
8#include "TestMacros.h"
9#include "CheckMacros.h"
10
11#include "TestRunner.h"
12
13#endif
14
diff --git a/libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.sln b/libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.sln
new file mode 100644
index 0000000..20f1959
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.sln
@@ -0,0 +1,28 @@
1Microsoft Visual Studio Solution File, Format Version 9.00
2# Visual Studio 2005
3Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppTestHarness", "CppTestHarness.vcproj", "{BFA21FB6-8FF9-4B44-ACB3-FC57CEA663D0}"
4EndProject
5Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCppTestHarness", "TestCppTestHarness\TestCppTestHarness.vcproj", "{639DCE9E-BB6F-4A3E-9DC1-43A4EA9BAA61}"
6 ProjectSection(ProjectDependencies) = postProject
7 {BFA21FB6-8FF9-4B44-ACB3-FC57CEA663D0} = {BFA21FB6-8FF9-4B44-ACB3-FC57CEA663D0}
8 EndProjectSection
9EndProject
10Global
11 GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 Debug|Win32 = Debug|Win32
13 Release|Win32 = Release|Win32
14 EndGlobalSection
15 GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 {BFA21FB6-8FF9-4B44-ACB3-FC57CEA663D0}.Debug|Win32.ActiveCfg = Debug|Win32
17 {BFA21FB6-8FF9-4B44-ACB3-FC57CEA663D0}.Debug|Win32.Build.0 = Debug|Win32
18 {BFA21FB6-8FF9-4B44-ACB3-FC57CEA663D0}.Release|Win32.ActiveCfg = Release|Win32
19 {BFA21FB6-8FF9-4B44-ACB3-FC57CEA663D0}.Release|Win32.Build.0 = Release|Win32
20 {639DCE9E-BB6F-4A3E-9DC1-43A4EA9BAA61}.Debug|Win32.ActiveCfg = Debug|Win32
21 {639DCE9E-BB6F-4A3E-9DC1-43A4EA9BAA61}.Debug|Win32.Build.0 = Debug|Win32
22 {639DCE9E-BB6F-4A3E-9DC1-43A4EA9BAA61}.Release|Win32.ActiveCfg = Release|Win32
23 {639DCE9E-BB6F-4A3E-9DC1-43A4EA9BAA61}.Release|Win32.Build.0 = Release|Win32
24 EndGlobalSection
25 GlobalSection(SolutionProperties) = preSolution
26 HideSolutionNode = FALSE
27 EndGlobalSection
28EndGlobal
diff --git a/libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.vcproj b/libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.vcproj
new file mode 100644
index 0000000..8a50a98
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/CppTestHarness.vcproj
@@ -0,0 +1,227 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="8.00"
5 Name="CppTestHarness"
6 ProjectGUID="{BFA21FB6-8FF9-4B44-ACB3-FC57CEA663D0}"
7 Keyword="Win32Proj"
8 >
9 <Platforms>
10 <Platform
11 Name="Win32"
12 />
13 </Platforms>
14 <ToolFiles>
15 </ToolFiles>
16 <Configurations>
17 <Configuration
18 Name="Debug|Win32"
19 OutputDirectory="Debug"
20 IntermediateDirectory="Debug"
21 ConfigurationType="4"
22 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
23 CharacterSet="2"
24 >
25 <Tool
26 Name="VCPreBuildEventTool"
27 />
28 <Tool
29 Name="VCCustomBuildTool"
30 />
31 <Tool
32 Name="VCXMLDataGeneratorTool"
33 />
34 <Tool
35 Name="VCWebServiceProxyGeneratorTool"
36 />
37 <Tool
38 Name="VCMIDLTool"
39 />
40 <Tool
41 Name="VCCLCompilerTool"
42 Optimization="0"
43 PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
44 MinimalRebuild="true"
45 ExceptionHandling="2"
46 BasicRuntimeChecks="3"
47 RuntimeLibrary="1"
48 UsePrecompiledHeader="0"
49 WarningLevel="4"
50 Detect64BitPortabilityProblems="true"
51 DebugInformationFormat="4"
52 />
53 <Tool
54 Name="VCManagedResourceCompilerTool"
55 />
56 <Tool
57 Name="VCResourceCompilerTool"
58 />
59 <Tool
60 Name="VCPreLinkEventTool"
61 />
62 <Tool
63 Name="VCLibrarianTool"
64 OutputFile="$(OutDir)/CppTestHarness.lib"
65 />
66 <Tool
67 Name="VCALinkTool"
68 />
69 <Tool
70 Name="VCXDCMakeTool"
71 />
72 <Tool
73 Name="VCBscMakeTool"
74 />
75 <Tool
76 Name="VCFxCopTool"
77 />
78 <Tool
79 Name="VCPostBuildEventTool"
80 />
81 </Configuration>
82 <Configuration
83 Name="Release|Win32"
84 OutputDirectory="Release"
85 IntermediateDirectory="Release"
86 ConfigurationType="4"
87 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
88 CharacterSet="2"
89 >
90 <Tool
91 Name="VCPreBuildEventTool"
92 />
93 <Tool
94 Name="VCCustomBuildTool"
95 />
96 <Tool
97 Name="VCXMLDataGeneratorTool"
98 />
99 <Tool
100 Name="VCWebServiceProxyGeneratorTool"
101 />
102 <Tool
103 Name="VCMIDLTool"
104 />
105 <Tool
106 Name="VCCLCompilerTool"
107 PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
108 ExceptionHandling="2"
109 RuntimeLibrary="0"
110 UsePrecompiledHeader="0"
111 WarningLevel="4"
112 Detect64BitPortabilityProblems="true"
113 DebugInformationFormat="3"
114 />
115 <Tool
116 Name="VCManagedResourceCompilerTool"
117 />
118 <Tool
119 Name="VCResourceCompilerTool"
120 />
121 <Tool
122 Name="VCPreLinkEventTool"
123 />
124 <Tool
125 Name="VCLibrarianTool"
126 OutputFile="$(OutDir)/CppTestHarness.lib"
127 />
128 <Tool
129 Name="VCALinkTool"
130 />
131 <Tool
132 Name="VCXDCMakeTool"
133 />
134 <Tool
135 Name="VCBscMakeTool"
136 />
137 <Tool
138 Name="VCFxCopTool"
139 />
140 <Tool
141 Name="VCPostBuildEventTool"
142 />
143 </Configuration>
144 </Configurations>
145 <References>
146 </References>
147 <Files>
148 <File
149 RelativePath=".\CheckMacros.h"
150 >
151 </File>
152 <File
153 RelativePath=".\Checks.h"
154 >
155 </File>
156 <File
157 RelativePath=".\CppTestHarness.h"
158 >
159 </File>
160 <File
161 RelativePath=".\HTMLTestReporter.cpp"
162 >
163 </File>
164 <File
165 RelativePath=".\HTMLTestReporter.h"
166 >
167 </File>
168 <File
169 RelativePath=".\PrintfTestReporter.cpp"
170 >
171 </File>
172 <File
173 RelativePath=".\PrintfTestReporter.h"
174 >
175 </File>
176 <File
177 RelativePath=".\Test.cpp"
178 >
179 </File>
180 <File
181 RelativePath=".\Test.h"
182 >
183 </File>
184 <File
185 RelativePath=".\TestLauncher.cpp"
186 >
187 </File>
188 <File
189 RelativePath=".\TestLauncher.h"
190 >
191 </File>
192 <File
193 RelativePath=".\TestMacros.h"
194 >
195 </File>
196 <File
197 RelativePath=".\TestReporter.cpp"
198 >
199 </File>
200 <File
201 RelativePath=".\TestReporter.h"
202 >
203 </File>
204 <File
205 RelativePath=".\TestResults.cpp"
206 >
207 </File>
208 <File
209 RelativePath=".\TestResults.h"
210 >
211 </File>
212 <File
213 RelativePath=".\TestRunner.cpp"
214 >
215 </File>
216 <File
217 RelativePath=".\TestRunner.h"
218 >
219 </File>
220 <File
221 RelativePath=".\TypedTestLauncher.h"
222 >
223 </File>
224 </Files>
225 <Globals>
226 </Globals>
227</VisualStudioProject>
diff --git a/libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.cpp b/libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.cpp
new file mode 100644
index 0000000..fd4acb1
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.cpp
@@ -0,0 +1,87 @@
1#include "HTMLTestReporter.h"
2
3#ifdef _MSC_VER
4# pragma warning(disable:4996) // shut the secure crt stuff up, ctime is used correctly here.
5#endif
6
7#include <iostream>
8#include <ctime>
9#include <sstream>
10
11namespace CppTestHarness
12{
13
14void HTMLTestReporter::ReportFailure(char const* file, int const line, std::string const failure)
15{
16 std::stringstream msg;
17 msg << file << "(" << line << ") : " << failure;
18
19 m_failureMessages.push_back(msg.str());
20}
21
22void HTMLTestReporter::ReportSingleResult(const std::string& testName, bool failed)
23{
24 ResultRecord r;
25 r.testName = testName;
26 r.failed = failed;
27
28 //get reported failures and clear temp list
29 r.failureMessages = m_failureMessages;
30 m_failureMessages.clear();
31
32 m_results.push_back(r);
33}
34
35void HTMLTestReporter::ReportSummary(int const testCount, int const failureCount)
36{
37 std::ostream& os = std::cout;
38
39 //TODO: make all strings html safe
40 os << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
41 os << "<html>\n";
42 os << "<head>\n";
43 os << " <title>Test Report</title>\n";
44 os << "</head>\n";
45 os << "<body text=\"black\" bgcolor=\"white\">\n";
46
47 std::time_t currtime;
48 std::time(&currtime);
49
50 os << "<h1>Test Report: " << std::ctime(&currtime) << "</h1>\n";
51 os << "<p><em>";
52 os << testCount << " tests run.<br />\n";
53 os << failureCount << " failed.<br />\n";
54 os << "</em></p>";
55
56 os << "<table border=1 bgcolor=\"#dddddd\">";
57
58 //for each single test
59 for (ResultList::iterator i = m_results.begin(); i != m_results.end(); ++i)
60 {
61 os << "<tr>";
62 os << "<td><strong>" << i->testName << "</strong></td>";
63
64 if (i->failed)
65 os << "<td bgcolor=\"#ff0000\"><strong>FAILED</strong></td>";
66 else
67 os << "<td bgcolor=\"#00ee00\"><strong>PASSED</strong></td>";
68
69 os << "</tr><tr><td>";
70 if (i->failed) os << "<ul>";
71
72 for (MessageList::iterator j = i->failureMessages.begin(); j != i->failureMessages.end(); ++j)
73 {
74 os << "<li><code>"<< *j << "</code></li>\n";
75 }
76
77 if (i->failed) os << "</ul>";
78 os << "</td></tr>";
79 }
80
81 os << "</table>";
82 os << "</body>";
83 os << "</html>";
84}
85
86}
87
diff --git a/libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.h b/libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.h
new file mode 100644
index 0000000..3a23039
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.h
@@ -0,0 +1,36 @@
1#ifndef HTML_TEST_REPORTER
2#define HTML_TEST_REPORTER
3
4#include "TestReporter.h"
5#include <vector>
6
7namespace CppTestHarness
8{
9
10class HTMLTestReporter : public TestReporter
11{
12public:
13 virtual void ReportFailure(char const* file, int line, std::string failure);
14 virtual void ReportSingleResult(const std::string& testName, bool failed);
15 virtual void ReportSummary(int testCount, int failureCount);
16
17private:
18 typedef std::vector<std::string> MessageList;
19
20 struct ResultRecord
21 {
22 std::string testName;
23 bool failed;
24 MessageList failureMessages;
25 };
26
27 MessageList m_failureMessages;
28
29 typedef std::vector<ResultRecord> ResultList;
30 ResultList m_results;
31};
32
33}
34
35#endif //HTML_TEST_REPORTER
36
diff --git a/libraries/ode-0.9/tests/CppTestHarness/Makefile.am b/libraries/ode-0.9/tests/CppTestHarness/Makefile.am
new file mode 100644
index 0000000..1fcb0be
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/Makefile.am
@@ -0,0 +1,28 @@
1
2noinst_LIBRARIES = libodetest.a
3
4libodetest_a_SOURCES = \
5 CheckMacros.h \
6 Checks.h \
7 CppTestHarness.h \
8 HTMLTestReporter.cpp \
9 HTMLTestReporter.h \
10 PrintfTestReporter.cpp \
11 PrintfTestReporter.h \
12 SignalTranslator.h \
13 Test.cpp \
14 Test.h \
15 TestLauncher.cpp \
16 TestLauncher.h \
17 TestMacros.h \
18 TestReporter.cpp \
19 TestReporter.h \
20 TestResults.cpp \
21 TestResults.h \
22 TestRunner.cpp \
23 TestRunner.h \
24 TypedTestLauncher.h
25
26libodetest_a_CXXFLAGS = @ARCHFLAGS@ -I$(top_srcdir)/include -I$(top_builddir)/include
27
28
diff --git a/libraries/ode-0.9/tests/CppTestHarness/Makefile.in b/libraries/ode-0.9/tests/CppTestHarness/Makefile.in
new file mode 100644
index 0000000..88d0e1f
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/Makefile.in
@@ -0,0 +1,562 @@
1# Makefile.in generated by automake 1.10 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15@SET_MAKE@
16
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkglibdir = $(libdir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22install_sh_DATA = $(install_sh) -c -m 644
23install_sh_PROGRAM = $(install_sh) -c
24install_sh_SCRIPT = $(install_sh) -c
25INSTALL_HEADER = $(INSTALL_DATA)
26transform = $(program_transform_name)
27NORMAL_INSTALL = :
28PRE_INSTALL = :
29POST_INSTALL = :
30NORMAL_UNINSTALL = :
31PRE_UNINSTALL = :
32POST_UNINSTALL = :
33build_triplet = @build@
34host_triplet = @host@
35target_triplet = @target@
36subdir = tests/CppTestHarness
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/configure.in
40am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
41 $(ACLOCAL_M4)
42mkinstalldirs = $(install_sh) -d
43CONFIG_HEADER = $(top_builddir)/include/ode/config.h
44CONFIG_CLEAN_FILES =
45LIBRARIES = $(noinst_LIBRARIES)
46AR = ar
47ARFLAGS = cru
48libodetest_a_AR = $(AR) $(ARFLAGS)
49libodetest_a_LIBADD =
50am_libodetest_a_OBJECTS = libodetest_a-HTMLTestReporter.$(OBJEXT) \
51 libodetest_a-PrintfTestReporter.$(OBJEXT) \
52 libodetest_a-Test.$(OBJEXT) \
53 libodetest_a-TestLauncher.$(OBJEXT) \
54 libodetest_a-TestReporter.$(OBJEXT) \
55 libodetest_a-TestResults.$(OBJEXT) \
56 libodetest_a-TestRunner.$(OBJEXT)
57libodetest_a_OBJECTS = $(am_libodetest_a_OBJECTS)
58DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/ode@am__isrc@
59depcomp = $(SHELL) $(top_srcdir)/depcomp
60am__depfiles_maybe = depfiles
61CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
62 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
63CXXLD = $(CXX)
64CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
65 -o $@
66COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
67 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
68CCLD = $(CC)
69LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
70SOURCES = $(libodetest_a_SOURCES)
71DIST_SOURCES = $(libodetest_a_SOURCES)
72ETAGS = etags
73CTAGS = ctags
74DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
75ACLOCAL = @ACLOCAL@
76ALLOCA = @ALLOCA@
77AMTAR = @AMTAR@
78ARCHFLAGS = @ARCHFLAGS@
79AUTOCONF = @AUTOCONF@
80AUTOHEADER = @AUTOHEADER@
81AUTOMAKE = @AUTOMAKE@
82AWK = @AWK@
83CC = @CC@
84CCDEPMODE = @CCDEPMODE@
85CFLAGS = @CFLAGS@
86CPP = @CPP@
87CPPFLAGS = @CPPFLAGS@
88CXX = @CXX@
89CXXDEPMODE = @CXXDEPMODE@
90CXXFLAGS = @CXXFLAGS@
91CYGPATH_W = @CYGPATH_W@
92DEFS = @DEFS@
93DEPDIR = @DEPDIR@
94DRAWSTUFF = @DRAWSTUFF@
95ECHO_C = @ECHO_C@
96ECHO_N = @ECHO_N@
97ECHO_T = @ECHO_T@
98EGREP = @EGREP@
99EXEEXT = @EXEEXT@
100GL_LIBS = @GL_LIBS@
101GREP = @GREP@
102INSTALL = @INSTALL@
103INSTALL_DATA = @INSTALL_DATA@
104INSTALL_PROGRAM = @INSTALL_PROGRAM@
105INSTALL_SCRIPT = @INSTALL_SCRIPT@
106INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
107LDFLAGS = @LDFLAGS@
108LIBOBJS = @LIBOBJS@
109LIBS = @LIBS@
110LTLIBOBJS = @LTLIBOBJS@
111MAKEINFO = @MAKEINFO@
112MKDIR_P = @MKDIR_P@
113OBJEXT = @OBJEXT@
114ODE_AGE = @ODE_AGE@
115ODE_CURRENT = @ODE_CURRENT@
116ODE_RELEASE = @ODE_RELEASE@
117ODE_REVISION = @ODE_REVISION@
118ODE_SONAME = @ODE_SONAME@
119PACKAGE = @PACKAGE@
120PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
121PACKAGE_NAME = @PACKAGE_NAME@
122PACKAGE_STRING = @PACKAGE_STRING@
123PACKAGE_TARNAME = @PACKAGE_TARNAME@
124PACKAGE_VERSION = @PACKAGE_VERSION@
125PATH_SEPARATOR = @PATH_SEPARATOR@
126RANLIB = @RANLIB@
127SET_MAKE = @SET_MAKE@
128SHARED_LDFLAGS = @SHARED_LDFLAGS@
129SHELL = @SHELL@
130STRIP = @STRIP@
131TOPDIR = @TOPDIR@
132VERSION = @VERSION@
133WINDRES = @WINDRES@
134XMKMF = @XMKMF@
135X_CFLAGS = @X_CFLAGS@
136X_EXTRA_LIBS = @X_EXTRA_LIBS@
137X_LIBS = @X_LIBS@
138X_PRE_LIBS = @X_PRE_LIBS@
139abs_builddir = @abs_builddir@
140abs_srcdir = @abs_srcdir@
141abs_top_builddir = @abs_top_builddir@
142abs_top_srcdir = @abs_top_srcdir@
143ac_ct_CC = @ac_ct_CC@
144ac_ct_CXX = @ac_ct_CXX@
145ac_ct_WINDRES = @ac_ct_WINDRES@
146am__include = @am__include@
147am__leading_dot = @am__leading_dot@
148am__quote = @am__quote@
149am__tar = @am__tar@
150am__untar = @am__untar@
151bindir = @bindir@
152build = @build@
153build_alias = @build_alias@
154build_cpu = @build_cpu@
155build_os = @build_os@
156build_vendor = @build_vendor@
157builddir = @builddir@
158datadir = @datadir@
159datarootdir = @datarootdir@
160docdir = @docdir@
161dvidir = @dvidir@
162exec_prefix = @exec_prefix@
163host = @host@
164host_alias = @host_alias@
165host_cpu = @host_cpu@
166host_os = @host_os@
167host_vendor = @host_vendor@
168htmldir = @htmldir@
169includedir = @includedir@
170infodir = @infodir@
171install_sh = @install_sh@
172libdir = @libdir@
173libexecdir = @libexecdir@
174localedir = @localedir@
175localstatedir = @localstatedir@
176mandir = @mandir@
177mkdir_p = @mkdir_p@
178oldincludedir = @oldincludedir@
179pdfdir = @pdfdir@
180prefix = @prefix@
181program_transform_name = @program_transform_name@
182psdir = @psdir@
183sbindir = @sbindir@
184sharedstatedir = @sharedstatedir@
185so_ext = @so_ext@
186srcdir = @srcdir@
187sysconfdir = @sysconfdir@
188target = @target@
189target_alias = @target_alias@
190target_cpu = @target_cpu@
191target_os = @target_os@
192target_vendor = @target_vendor@
193top_builddir = @top_builddir@
194top_srcdir = @top_srcdir@
195noinst_LIBRARIES = libodetest.a
196libodetest_a_SOURCES = \
197 CheckMacros.h \
198 Checks.h \
199 CppTestHarness.h \
200 HTMLTestReporter.cpp \
201 HTMLTestReporter.h \
202 PrintfTestReporter.cpp \
203 PrintfTestReporter.h \
204 SignalTranslator.h \
205 Test.cpp \
206 Test.h \
207 TestLauncher.cpp \
208 TestLauncher.h \
209 TestMacros.h \
210 TestReporter.cpp \
211 TestReporter.h \
212 TestResults.cpp \
213 TestResults.h \
214 TestRunner.cpp \
215 TestRunner.h \
216 TypedTestLauncher.h
217
218libodetest_a_CXXFLAGS = @ARCHFLAGS@ -I$(top_srcdir)/include -I$(top_builddir)/include
219all: all-am
220
221.SUFFIXES:
222.SUFFIXES: .cpp .o .obj
223$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
224 @for dep in $?; do \
225 case '$(am__configure_deps)' in \
226 *$$dep*) \
227 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
228 && exit 0; \
229 exit 1;; \
230 esac; \
231 done; \
232 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/CppTestHarness/Makefile'; \
233 cd $(top_srcdir) && \
234 $(AUTOMAKE) --foreign tests/CppTestHarness/Makefile
235.PRECIOUS: Makefile
236Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
237 @case '$?' in \
238 *config.status*) \
239 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
240 *) \
241 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
242 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
243 esac;
244
245$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
246 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
247
248$(top_srcdir)/configure: $(am__configure_deps)
249 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
250$(ACLOCAL_M4): $(am__aclocal_m4_deps)
251 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
252
253clean-noinstLIBRARIES:
254 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
255libodetest.a: $(libodetest_a_OBJECTS) $(libodetest_a_DEPENDENCIES)
256 -rm -f libodetest.a
257 $(libodetest_a_AR) libodetest.a $(libodetest_a_OBJECTS) $(libodetest_a_LIBADD)
258 $(RANLIB) libodetest.a
259
260mostlyclean-compile:
261 -rm -f *.$(OBJEXT)
262
263distclean-compile:
264 -rm -f *.tab.c
265
266@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libodetest_a-HTMLTestReporter.Po@am__quote@
267@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libodetest_a-PrintfTestReporter.Po@am__quote@
268@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libodetest_a-Test.Po@am__quote@
269@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libodetest_a-TestLauncher.Po@am__quote@
270@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libodetest_a-TestReporter.Po@am__quote@
271@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libodetest_a-TestResults.Po@am__quote@
272@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libodetest_a-TestRunner.Po@am__quote@
273
274.cpp.o:
275@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
276@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
277@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
278@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
279@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
280
281.cpp.obj:
282@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
283@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
284@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
285@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
286@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
287
288libodetest_a-HTMLTestReporter.o: HTMLTestReporter.cpp
289@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-HTMLTestReporter.o -MD -MP -MF $(DEPDIR)/libodetest_a-HTMLTestReporter.Tpo -c -o libodetest_a-HTMLTestReporter.o `test -f 'HTMLTestReporter.cpp' || echo '$(srcdir)/'`HTMLTestReporter.cpp
290@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-HTMLTestReporter.Tpo $(DEPDIR)/libodetest_a-HTMLTestReporter.Po
291@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HTMLTestReporter.cpp' object='libodetest_a-HTMLTestReporter.o' libtool=no @AMDEPBACKSLASH@
292@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
293@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-HTMLTestReporter.o `test -f 'HTMLTestReporter.cpp' || echo '$(srcdir)/'`HTMLTestReporter.cpp
294
295libodetest_a-HTMLTestReporter.obj: HTMLTestReporter.cpp
296@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-HTMLTestReporter.obj -MD -MP -MF $(DEPDIR)/libodetest_a-HTMLTestReporter.Tpo -c -o libodetest_a-HTMLTestReporter.obj `if test -f 'HTMLTestReporter.cpp'; then $(CYGPATH_W) 'HTMLTestReporter.cpp'; else $(CYGPATH_W) '$(srcdir)/HTMLTestReporter.cpp'; fi`
297@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-HTMLTestReporter.Tpo $(DEPDIR)/libodetest_a-HTMLTestReporter.Po
298@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HTMLTestReporter.cpp' object='libodetest_a-HTMLTestReporter.obj' libtool=no @AMDEPBACKSLASH@
299@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
300@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-HTMLTestReporter.obj `if test -f 'HTMLTestReporter.cpp'; then $(CYGPATH_W) 'HTMLTestReporter.cpp'; else $(CYGPATH_W) '$(srcdir)/HTMLTestReporter.cpp'; fi`
301
302libodetest_a-PrintfTestReporter.o: PrintfTestReporter.cpp
303@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-PrintfTestReporter.o -MD -MP -MF $(DEPDIR)/libodetest_a-PrintfTestReporter.Tpo -c -o libodetest_a-PrintfTestReporter.o `test -f 'PrintfTestReporter.cpp' || echo '$(srcdir)/'`PrintfTestReporter.cpp
304@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-PrintfTestReporter.Tpo $(DEPDIR)/libodetest_a-PrintfTestReporter.Po
305@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PrintfTestReporter.cpp' object='libodetest_a-PrintfTestReporter.o' libtool=no @AMDEPBACKSLASH@
306@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
307@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-PrintfTestReporter.o `test -f 'PrintfTestReporter.cpp' || echo '$(srcdir)/'`PrintfTestReporter.cpp
308
309libodetest_a-PrintfTestReporter.obj: PrintfTestReporter.cpp
310@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-PrintfTestReporter.obj -MD -MP -MF $(DEPDIR)/libodetest_a-PrintfTestReporter.Tpo -c -o libodetest_a-PrintfTestReporter.obj `if test -f 'PrintfTestReporter.cpp'; then $(CYGPATH_W) 'PrintfTestReporter.cpp'; else $(CYGPATH_W) '$(srcdir)/PrintfTestReporter.cpp'; fi`
311@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-PrintfTestReporter.Tpo $(DEPDIR)/libodetest_a-PrintfTestReporter.Po
312@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PrintfTestReporter.cpp' object='libodetest_a-PrintfTestReporter.obj' libtool=no @AMDEPBACKSLASH@
313@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
314@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-PrintfTestReporter.obj `if test -f 'PrintfTestReporter.cpp'; then $(CYGPATH_W) 'PrintfTestReporter.cpp'; else $(CYGPATH_W) '$(srcdir)/PrintfTestReporter.cpp'; fi`
315
316libodetest_a-Test.o: Test.cpp
317@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-Test.o -MD -MP -MF $(DEPDIR)/libodetest_a-Test.Tpo -c -o libodetest_a-Test.o `test -f 'Test.cpp' || echo '$(srcdir)/'`Test.cpp
318@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-Test.Tpo $(DEPDIR)/libodetest_a-Test.Po
319@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Test.cpp' object='libodetest_a-Test.o' libtool=no @AMDEPBACKSLASH@
320@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
321@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-Test.o `test -f 'Test.cpp' || echo '$(srcdir)/'`Test.cpp
322
323libodetest_a-Test.obj: Test.cpp
324@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-Test.obj -MD -MP -MF $(DEPDIR)/libodetest_a-Test.Tpo -c -o libodetest_a-Test.obj `if test -f 'Test.cpp'; then $(CYGPATH_W) 'Test.cpp'; else $(CYGPATH_W) '$(srcdir)/Test.cpp'; fi`
325@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-Test.Tpo $(DEPDIR)/libodetest_a-Test.Po
326@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Test.cpp' object='libodetest_a-Test.obj' libtool=no @AMDEPBACKSLASH@
327@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
328@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-Test.obj `if test -f 'Test.cpp'; then $(CYGPATH_W) 'Test.cpp'; else $(CYGPATH_W) '$(srcdir)/Test.cpp'; fi`
329
330libodetest_a-TestLauncher.o: TestLauncher.cpp
331@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-TestLauncher.o -MD -MP -MF $(DEPDIR)/libodetest_a-TestLauncher.Tpo -c -o libodetest_a-TestLauncher.o `test -f 'TestLauncher.cpp' || echo '$(srcdir)/'`TestLauncher.cpp
332@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-TestLauncher.Tpo $(DEPDIR)/libodetest_a-TestLauncher.Po
333@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TestLauncher.cpp' object='libodetest_a-TestLauncher.o' libtool=no @AMDEPBACKSLASH@
334@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
335@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-TestLauncher.o `test -f 'TestLauncher.cpp' || echo '$(srcdir)/'`TestLauncher.cpp
336
337libodetest_a-TestLauncher.obj: TestLauncher.cpp
338@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-TestLauncher.obj -MD -MP -MF $(DEPDIR)/libodetest_a-TestLauncher.Tpo -c -o libodetest_a-TestLauncher.obj `if test -f 'TestLauncher.cpp'; then $(CYGPATH_W) 'TestLauncher.cpp'; else $(CYGPATH_W) '$(srcdir)/TestLauncher.cpp'; fi`
339@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-TestLauncher.Tpo $(DEPDIR)/libodetest_a-TestLauncher.Po
340@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TestLauncher.cpp' object='libodetest_a-TestLauncher.obj' libtool=no @AMDEPBACKSLASH@
341@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
342@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-TestLauncher.obj `if test -f 'TestLauncher.cpp'; then $(CYGPATH_W) 'TestLauncher.cpp'; else $(CYGPATH_W) '$(srcdir)/TestLauncher.cpp'; fi`
343
344libodetest_a-TestReporter.o: TestReporter.cpp
345@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-TestReporter.o -MD -MP -MF $(DEPDIR)/libodetest_a-TestReporter.Tpo -c -o libodetest_a-TestReporter.o `test -f 'TestReporter.cpp' || echo '$(srcdir)/'`TestReporter.cpp
346@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-TestReporter.Tpo $(DEPDIR)/libodetest_a-TestReporter.Po
347@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TestReporter.cpp' object='libodetest_a-TestReporter.o' libtool=no @AMDEPBACKSLASH@
348@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
349@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-TestReporter.o `test -f 'TestReporter.cpp' || echo '$(srcdir)/'`TestReporter.cpp
350
351libodetest_a-TestReporter.obj: TestReporter.cpp
352@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-TestReporter.obj -MD -MP -MF $(DEPDIR)/libodetest_a-TestReporter.Tpo -c -o libodetest_a-TestReporter.obj `if test -f 'TestReporter.cpp'; then $(CYGPATH_W) 'TestReporter.cpp'; else $(CYGPATH_W) '$(srcdir)/TestReporter.cpp'; fi`
353@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-TestReporter.Tpo $(DEPDIR)/libodetest_a-TestReporter.Po
354@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TestReporter.cpp' object='libodetest_a-TestReporter.obj' libtool=no @AMDEPBACKSLASH@
355@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
356@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-TestReporter.obj `if test -f 'TestReporter.cpp'; then $(CYGPATH_W) 'TestReporter.cpp'; else $(CYGPATH_W) '$(srcdir)/TestReporter.cpp'; fi`
357
358libodetest_a-TestResults.o: TestResults.cpp
359@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-TestResults.o -MD -MP -MF $(DEPDIR)/libodetest_a-TestResults.Tpo -c -o libodetest_a-TestResults.o `test -f 'TestResults.cpp' || echo '$(srcdir)/'`TestResults.cpp
360@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-TestResults.Tpo $(DEPDIR)/libodetest_a-TestResults.Po
361@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TestResults.cpp' object='libodetest_a-TestResults.o' libtool=no @AMDEPBACKSLASH@
362@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
363@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-TestResults.o `test -f 'TestResults.cpp' || echo '$(srcdir)/'`TestResults.cpp
364
365libodetest_a-TestResults.obj: TestResults.cpp
366@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-TestResults.obj -MD -MP -MF $(DEPDIR)/libodetest_a-TestResults.Tpo -c -o libodetest_a-TestResults.obj `if test -f 'TestResults.cpp'; then $(CYGPATH_W) 'TestResults.cpp'; else $(CYGPATH_W) '$(srcdir)/TestResults.cpp'; fi`
367@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-TestResults.Tpo $(DEPDIR)/libodetest_a-TestResults.Po
368@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TestResults.cpp' object='libodetest_a-TestResults.obj' libtool=no @AMDEPBACKSLASH@
369@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
370@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-TestResults.obj `if test -f 'TestResults.cpp'; then $(CYGPATH_W) 'TestResults.cpp'; else $(CYGPATH_W) '$(srcdir)/TestResults.cpp'; fi`
371
372libodetest_a-TestRunner.o: TestRunner.cpp
373@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-TestRunner.o -MD -MP -MF $(DEPDIR)/libodetest_a-TestRunner.Tpo -c -o libodetest_a-TestRunner.o `test -f 'TestRunner.cpp' || echo '$(srcdir)/'`TestRunner.cpp
374@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-TestRunner.Tpo $(DEPDIR)/libodetest_a-TestRunner.Po
375@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TestRunner.cpp' object='libodetest_a-TestRunner.o' libtool=no @AMDEPBACKSLASH@
376@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
377@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-TestRunner.o `test -f 'TestRunner.cpp' || echo '$(srcdir)/'`TestRunner.cpp
378
379libodetest_a-TestRunner.obj: TestRunner.cpp
380@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -MT libodetest_a-TestRunner.obj -MD -MP -MF $(DEPDIR)/libodetest_a-TestRunner.Tpo -c -o libodetest_a-TestRunner.obj `if test -f 'TestRunner.cpp'; then $(CYGPATH_W) 'TestRunner.cpp'; else $(CYGPATH_W) '$(srcdir)/TestRunner.cpp'; fi`
381@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libodetest_a-TestRunner.Tpo $(DEPDIR)/libodetest_a-TestRunner.Po
382@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TestRunner.cpp' object='libodetest_a-TestRunner.obj' libtool=no @AMDEPBACKSLASH@
383@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
384@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libodetest_a_CXXFLAGS) $(CXXFLAGS) -c -o libodetest_a-TestRunner.obj `if test -f 'TestRunner.cpp'; then $(CYGPATH_W) 'TestRunner.cpp'; else $(CYGPATH_W) '$(srcdir)/TestRunner.cpp'; fi`
385
386ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
387 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
388 unique=`for i in $$list; do \
389 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
390 done | \
391 $(AWK) ' { files[$$0] = 1; } \
392 END { for (i in files) print i; }'`; \
393 mkid -fID $$unique
394tags: TAGS
395
396TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
397 $(TAGS_FILES) $(LISP)
398 tags=; \
399 here=`pwd`; \
400 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
401 unique=`for i in $$list; do \
402 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
403 done | \
404 $(AWK) ' { files[$$0] = 1; } \
405 END { for (i in files) print i; }'`; \
406 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
407 test -n "$$unique" || unique=$$empty_fix; \
408 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
409 $$tags $$unique; \
410 fi
411ctags: CTAGS
412CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
413 $(TAGS_FILES) $(LISP)
414 tags=; \
415 here=`pwd`; \
416 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
417 unique=`for i in $$list; do \
418 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
419 done | \
420 $(AWK) ' { files[$$0] = 1; } \
421 END { for (i in files) print i; }'`; \
422 test -z "$(CTAGS_ARGS)$$tags$$unique" \
423 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
424 $$tags $$unique
425
426GTAGS:
427 here=`$(am__cd) $(top_builddir) && pwd` \
428 && cd $(top_srcdir) \
429 && gtags -i $(GTAGS_ARGS) $$here
430
431distclean-tags:
432 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
433
434distdir: $(DISTFILES)
435 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
436 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
437 list='$(DISTFILES)'; \
438 dist_files=`for file in $$list; do echo $$file; done | \
439 sed -e "s|^$$srcdirstrip/||;t" \
440 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
441 case $$dist_files in \
442 */*) $(MKDIR_P) `echo "$$dist_files" | \
443 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
444 sort -u` ;; \
445 esac; \
446 for file in $$dist_files; do \
447 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
448 if test -d $$d/$$file; then \
449 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
450 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
451 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
452 fi; \
453 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
454 else \
455 test -f $(distdir)/$$file \
456 || cp -p $$d/$$file $(distdir)/$$file \
457 || exit 1; \
458 fi; \
459 done
460check-am: all-am
461check: check-am
462all-am: Makefile $(LIBRARIES)
463installdirs:
464install: install-am
465install-exec: install-exec-am
466install-data: install-data-am
467uninstall: uninstall-am
468
469install-am: all-am
470 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
471
472installcheck: installcheck-am
473install-strip:
474 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
475 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
476 `test -z '$(STRIP)' || \
477 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
478mostlyclean-generic:
479
480clean-generic:
481
482distclean-generic:
483 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
484
485maintainer-clean-generic:
486 @echo "This command is intended for maintainers to use"
487 @echo "it deletes files that may require special tools to rebuild."
488clean: clean-am
489
490clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
491
492distclean: distclean-am
493 -rm -rf ./$(DEPDIR)
494 -rm -f Makefile
495distclean-am: clean-am distclean-compile distclean-generic \
496 distclean-tags
497
498dvi: dvi-am
499
500dvi-am:
501
502html: html-am
503
504info: info-am
505
506info-am:
507
508install-data-am:
509
510install-dvi: install-dvi-am
511
512install-exec-am:
513
514install-html: install-html-am
515
516install-info: install-info-am
517
518install-man:
519
520install-pdf: install-pdf-am
521
522install-ps: install-ps-am
523
524installcheck-am:
525
526maintainer-clean: maintainer-clean-am
527 -rm -rf ./$(DEPDIR)
528 -rm -f Makefile
529maintainer-clean-am: distclean-am maintainer-clean-generic
530
531mostlyclean: mostlyclean-am
532
533mostlyclean-am: mostlyclean-compile mostlyclean-generic
534
535pdf: pdf-am
536
537pdf-am:
538
539ps: ps-am
540
541ps-am:
542
543uninstall-am:
544
545.MAKE: install-am install-strip
546
547.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
548 clean-noinstLIBRARIES ctags distclean distclean-compile \
549 distclean-generic distclean-tags distdir dvi dvi-am html \
550 html-am info info-am install install-am install-data \
551 install-data-am install-dvi install-dvi-am install-exec \
552 install-exec-am install-html install-html-am install-info \
553 install-info-am install-man install-pdf install-pdf-am \
554 install-ps install-ps-am install-strip installcheck \
555 installcheck-am installdirs maintainer-clean \
556 maintainer-clean-generic mostlyclean mostlyclean-compile \
557 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
558 uninstall-am
559
560# Tell versions [3.59,3.63) of GNU make to not export all variables.
561# Otherwise a system limit (for SysV at least) may be exceeded.
562.NOEXPORT:
diff --git a/libraries/ode-0.9/tests/CppTestHarness/PrintfTestReporter.cpp b/libraries/ode-0.9/tests/CppTestHarness/PrintfTestReporter.cpp
new file mode 100644
index 0000000..68f7611
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/PrintfTestReporter.cpp
@@ -0,0 +1,25 @@
1#include "PrintfTestReporter.h"
2
3#include <cstdio>
4
5namespace CppTestHarness
6{
7
8void PrintfTestReporter::ReportFailure(char const* file, int const line, std::string const failure)
9{
10 printf("%s(%d) : failure: %s\n", file, line, failure.c_str());
11}
12
13void PrintfTestReporter::ReportSingleResult(const std::string& /*testName*/, bool /*failed*/)
14{
15 //empty
16}
17
18void PrintfTestReporter::ReportSummary(int const testCount, int const failureCount)
19{
20 printf("%d tests run.\n", testCount);
21 printf("%d failures.\n", failureCount);
22}
23
24}
25
diff --git a/libraries/ode-0.9/tests/CppTestHarness/PrintfTestReporter.h b/libraries/ode-0.9/tests/CppTestHarness/PrintfTestReporter.h
new file mode 100644
index 0000000..8d4372a
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/PrintfTestReporter.h
@@ -0,0 +1,20 @@
1#ifndef PRINTF_TEST_REPORTER
2#define PRINTF_TEST_REPORTER
3
4#include "TestReporter.h"
5
6namespace CppTestHarness
7{
8
9class PrintfTestReporter : public TestReporter
10{
11private:
12 virtual void ReportFailure(char const* file, int line, std::string failure);
13 virtual void ReportSingleResult(const std::string& testName, bool failed);
14 virtual void ReportSummary(int testCount, int failureCount);
15};
16
17}
18
19#endif
20
diff --git a/libraries/ode-0.9/tests/CppTestHarness/ReadMe.txt b/libraries/ode-0.9/tests/CppTestHarness/ReadMe.txt
new file mode 100644
index 0000000..3132d8d
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/ReadMe.txt
@@ -0,0 +1,34 @@
1------------------------------------------------------------------------
2CppTestHarness
3
4written by Charles Nicholson (cn@cnicholson.net).
5linux/gcc port by Dan Lind (podcat@gmail.com).
6
7This work is based on CppUnitLite by Michael Feathers with changes inspired by Noel Llopis.
8
9You the user have free license to do whatever you want with this source code.
10No persons mentioned above accept any responsibility if files in this archive
11set your computer on fire or subject you to any number of woes. Use at your own risk!
12
13
14
15HISTORY:
16------------------------------------------------------------------------
1728 dec 2005, charles nicholson (cn@cnicholson.net)
18- upgraded win32 build to VS.NET 2005
19- silenced all 'conditional expression is constant' warning (CHECK(true), CHECK_EQUAL(1,1), etc...)
20
2120 dec 2005, dan lind (podcat@gmail.com)
22- added signal-to-exception translator for posix systems
23- more methods in TestReporter. We can now optionaly have output on each finished test
24 HTMLTestReporter illustrates a fairly complex reporter doing this.
25
2613 dec 2005, dan lind (podcat@gmail.com)
27- added newlines at the end of all files (this is a warning on gcc)
28- reordered initialization list of TestRunner (init order not same as order in class)
29- added _MSC_VER to TestCppTestHarness.cpp to block pragmas from gcc
30
3111 dec 2005, charles nicholson (cn@cnicholson.net)
32- get rid of TestRegistry and static std::vector.
33- TestRunner holds a PrintfTestReporter by value to avoid dynamic allocation at static-init
34- TestCreator -> TestLauncher are now nodes in a linked list of tests.
diff --git a/libraries/ode-0.9/tests/CppTestHarness/SignalTranslator.h b/libraries/ode-0.9/tests/CppTestHarness/SignalTranslator.h
new file mode 100644
index 0000000..39fc225
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/SignalTranslator.h
@@ -0,0 +1,53 @@
1#ifndef SIGNAL_TRANSLATOR_H
2#define SIGNAL_TRANSLATOR_H
3
4#include <signal.h>
5#include <setjmp.h>
6
7namespace CppTestHarness
8{
9
10template <int SIGNAL>
11class SignalTranslator {
12public:
13 SignalTranslator()
14 {
15 //setup new signal handler
16 struct sigaction act;
17 act.sa_handler = signalHandler;
18 sigemptyset(&act.sa_mask);
19 act.sa_flags = 0;
20
21 sigaction(SIGNAL, &act, &m_oldAction);
22
23 if (sigsetjmp(getJumpPoint(), 1) != 0)
24 {
25 //if signal thrown we will return here from handler
26 throw "Unhandled system exception";
27 }
28 }
29
30 ~SignalTranslator()
31 {
32 sigaction(SIGNAL, &m_oldAction, 0);
33 }
34
35private:
36 static void signalHandler(int signum)
37 {
38 siglongjmp(getJumpPoint(), signum);
39 }
40
41 static sigjmp_buf& getJumpPoint()
42 {
43 static sigjmp_buf jmpPnt;
44 return jmpPnt;
45 }
46
47 struct sigaction m_oldAction;
48};
49
50} //CppTestHarness
51
52#endif //SIGNAL_TRANSLATOR_H
53
diff --git a/libraries/ode-0.9/tests/CppTestHarness/Test.cpp b/libraries/ode-0.9/tests/CppTestHarness/Test.cpp
new file mode 100644
index 0000000..44b2dd8
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/Test.cpp
@@ -0,0 +1,49 @@
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
diff --git a/libraries/ode-0.9/tests/CppTestHarness/Test.h b/libraries/ode-0.9/tests/CppTestHarness/Test.h
new file mode 100644
index 0000000..bd35935
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/Test.h
@@ -0,0 +1,40 @@
1#ifndef TEST_H
2#define TEST_H
3
4#include <string>
5
6namespace CppTestHarness
7{
8class TestResults;
9
10class Test
11{
12public:
13 virtual ~Test();
14 void Run(TestResults& testResults);
15
16 static Test* GetListHead();
17
18protected:
19 Test(std::string testName = std::string(),
20 std::string filename = std::string(),
21 int lineNumber = 0);
22
23private:
24 virtual void RunImpl(TestResults& testResults_) = 0;
25
26 std::string const m_testName;
27 std::string const m_filename;
28 int const m_lineNumber;
29
30 Test* m_listNext;
31
32 // revoked
33 Test(Test const&);
34 Test& operator =(Test const&);
35};
36
37}
38
39#endif
40
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TestLauncher.cpp b/libraries/ode-0.9/tests/CppTestHarness/TestLauncher.cpp
new file mode 100644
index 0000000..4397822
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/TestLauncher.cpp
@@ -0,0 +1,39 @@
1#include "TestLauncher.h"
2
3namespace CppTestHarness
4{
5
6namespace
7{
8 TestLauncher* s_listHead;
9}
10
11TestLauncher** TestLauncher::GetHeadAddr()
12{
13 static bool initialized = false;
14 if (!initialized)
15 {
16 s_listHead = 0;
17 initialized = true;
18 }
19
20 return &s_listHead;
21}
22
23TestLauncher::TestLauncher(TestLauncher** listHead)
24 : m_next(*listHead)
25{
26 *listHead = this;
27}
28
29TestLauncher::~TestLauncher()
30{
31}
32
33TestLauncher const* TestLauncher::GetNext() const
34{
35 return m_next;
36}
37
38}
39
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TestLauncher.h b/libraries/ode-0.9/tests/CppTestHarness/TestLauncher.h
new file mode 100644
index 0000000..fe60363
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/TestLauncher.h
@@ -0,0 +1,32 @@
1#ifndef TEST_LAUNCHER_H
2#define TEST_LAUNCHER_H
3
4namespace CppTestHarness
5{
6class TestResults;
7class TestRegistry;
8
9class TestLauncher
10{
11public:
12 virtual void Launch(TestResults& results_) const = 0;
13
14 static TestLauncher** GetHeadAddr();
15 TestLauncher const* GetNext() const;
16
17protected:
18 TestLauncher(TestLauncher** listHead);
19 virtual ~TestLauncher();
20
21private:
22 TestLauncher const* m_next;
23
24 // revoked
25 TestLauncher();
26 TestLauncher(TestLauncher const&);
27 TestLauncher& operator =(TestLauncher const&);
28};
29}
30
31#endif
32
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
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TestReporter.cpp b/libraries/ode-0.9/tests/CppTestHarness/TestReporter.cpp
new file mode 100644
index 0000000..7b6bd7b
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/TestReporter.cpp
@@ -0,0 +1,15 @@
1#include "TestReporter.h"
2
3namespace CppTestHarness
4{
5
6TestReporter::TestReporter()
7{
8}
9
10TestReporter::~TestReporter()
11{
12}
13
14}
15
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TestReporter.h b/libraries/ode-0.9/tests/CppTestHarness/TestReporter.h
new file mode 100644
index 0000000..352de8c
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/TestReporter.h
@@ -0,0 +1,24 @@
1#ifndef TEST_REPORTER_H
2#define TEST_REPORTER_H
3
4#include <string>
5
6namespace CppTestHarness
7{
8
9class TestReporter
10{
11public:
12 virtual ~TestReporter();
13
14 virtual void ReportFailure(char const* file, int line, std::string failure) = 0;
15 virtual void ReportSingleResult(const std::string& testName, bool failed) = 0;
16 virtual void ReportSummary(int testCount, int failureCount) = 0;
17
18protected:
19 TestReporter();
20};
21
22}
23#endif
24
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TestResults.cpp b/libraries/ode-0.9/tests/CppTestHarness/TestResults.cpp
new file mode 100644
index 0000000..f2d2f81
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/TestResults.cpp
@@ -0,0 +1,30 @@
1#include "TestResults.h"
2#include "TestReporter.h"
3
4namespace CppTestHarness
5{
6
7TestResults::TestResults(TestReporter& testReporter)
8 : m_failure(false)
9 , m_testReporter(testReporter)
10{
11}
12
13void TestResults::ReportFailure(char const* file, int const line, std::string const failure)
14{
15 m_failure = true;
16 m_testReporter.ReportFailure(file, line, failure);
17}
18
19void TestResults::ReportDone(const std::string& testName)
20{
21 m_testReporter.ReportSingleResult(testName, m_failure);
22}
23
24bool TestResults::Failed() const
25{
26 return m_failure;
27}
28
29}
30
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TestResults.h b/libraries/ode-0.9/tests/CppTestHarness/TestResults.h
new file mode 100644
index 0000000..7f8ec2a
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/TestResults.h
@@ -0,0 +1,33 @@
1#ifndef TEST_RESULTS_H
2#define TEST_RESULTS_H
3
4#include <string>
5
6namespace CppTestHarness
7{
8
9class TestReporter;
10
11class TestResults
12{
13public:
14 explicit TestResults(TestReporter& reporter);
15
16 void ReportFailure(char const* file, int line, std::string failure);
17 void ReportDone(const std::string& testName);
18
19 bool Failed() const;
20
21private:
22 bool m_failure;
23 TestReporter& m_testReporter;
24
25 // revoked
26 TestResults(TestResults const&);
27 TestResults& operator =(TestResults const&);
28};
29
30}
31
32#endif
33
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TestRunner.cpp b/libraries/ode-0.9/tests/CppTestHarness/TestRunner.cpp
new file mode 100644
index 0000000..51db141
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/TestRunner.cpp
@@ -0,0 +1,56 @@
1#include "TestRunner.h"
2#include "TestLauncher.h"
3#include "TestResults.h"
4#include "Test.h"
5
6#include "PrintfTestReporter.h"
7
8namespace CppTestHarness
9{
10
11TestRunner::TestRunner()
12 : m_testLauncherListHead(TestLauncher::GetHeadAddr())
13 , m_testReporter(&m_defaultTestReporter)
14{
15}
16
17TestRunner::~TestRunner()
18{
19}
20
21void TestRunner::SetTestLauncherListHead(TestLauncher** listHead)
22{
23 m_testLauncherListHead = listHead;
24}
25
26void TestRunner::SetTestReporter(TestReporter* testReporter)
27{
28 m_testReporter = testReporter;
29}
30
31int TestRunner::RunAllTests()
32{
33 int failureCount = 0;
34
35 int testCount = 0;
36 TestLauncher const* curLauncher = *m_testLauncherListHead;
37 while (curLauncher)
38 {
39 ++testCount;
40
41 TestResults result(*m_testReporter);
42 curLauncher->Launch(result);
43
44 if (result.Failed())
45 ++failureCount;
46
47 curLauncher = curLauncher->GetNext();
48 }
49
50 m_testReporter->ReportSummary(testCount, failureCount);
51
52 return failureCount;
53}
54
55}
56
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TestRunner.h b/libraries/ode-0.9/tests/CppTestHarness/TestRunner.h
new file mode 100644
index 0000000..e5dedb1
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/TestRunner.h
@@ -0,0 +1,33 @@
1#ifndef TEST_RUNNER_H
2#define TEST_RUNNER_H
3
4#include "PrintfTestReporter.h"
5
6namespace CppTestHarness
7{
8class TestLauncher;
9class TestReporter;
10
11class TestRunner
12{
13public:
14 TestRunner();
15 ~TestRunner();
16
17 void SetTestReporter(TestReporter* testReporter);
18 void SetTestLauncherListHead(TestLauncher** listHead);
19
20 int RunAllTests();
21 int FailureCount() const;
22
23private:
24 TestLauncher** m_testLauncherListHead;
25
26 TestReporter* m_testReporter;
27 PrintfTestReporter m_defaultTestReporter;
28};
29
30}
31
32#endif
33
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TypedTestLauncher.h b/libraries/ode-0.9/tests/CppTestHarness/TypedTestLauncher.h
new file mode 100644
index 0000000..62a9133
--- /dev/null
+++ b/libraries/ode-0.9/tests/CppTestHarness/TypedTestLauncher.h
@@ -0,0 +1,27 @@
1#ifndef TYPED_TEST_CREATOR_H
2#define TYPED_TEST_CREATOR_H
3
4#include "TestLauncher.h"
5
6namespace CppTestHarness
7{
8
9template< typename TestClass >
10class TypedTestLauncher : public TestLauncher
11{
12public:
13 TypedTestLauncher(TestLauncher** listHead)
14 : TestLauncher(listHead)
15 {
16 }
17
18 virtual void Launch(TestResults& testResults_) const
19 {
20 TestClass().Run(testResults_);
21 }
22};
23
24}
25
26#endif
27