aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/tests/CppTestHarness/CheckMacros.h
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/CheckMacros.h
parentadding ode source to /libraries (diff)
downloadopensim-SC_OLD-79eca25c945a535a7a0325999034bae17da92412.zip
opensim-SC_OLD-79eca25c945a535a7a0325999034bae17da92412.tar.gz
opensim-SC_OLD-79eca25c945a535a7a0325999034bae17da92412.tar.bz2
opensim-SC_OLD-79eca25c945a535a7a0325999034bae17da92412.tar.xz
resubmitting ode
Diffstat (limited to 'libraries/ode-0.9/tests/CppTestHarness/CheckMacros.h')
-rw-r--r--libraries/ode-0.9/tests/CppTestHarness/CheckMacros.h27
1 files changed, 27 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