summaryrefslogtreecommitdiff
path: root/test/correctness/tester.h
diff options
context:
space:
mode:
authorCNugteren <web@cedricnugteren.nl>2015-06-20 10:58:21 +0200
committerCNugteren <web@cedricnugteren.nl>2015-06-20 10:58:21 +0200
commite26742c62993892deffbd44e68f3769423330cbb (patch)
tree1ee472facfd4c9fe47979a98261973d488c6d939 /test/correctness/tester.h
parentd7097a063ad7eca9aa3982c3c63eba91cd2271c5 (diff)
Added additional absolute error checking when testing
Diffstat (limited to 'test/correctness/tester.h')
-rw-r--r--test/correctness/tester.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/correctness/tester.h b/test/correctness/tester.h
index 934141d2..e6815fce 100644
--- a/test/correctness/tester.h
+++ b/test/correctness/tester.h
@@ -44,7 +44,8 @@ class Tester {
static constexpr auto kStatusError = -1.0f;
// Set the allowed error margin for floating-point comparisons
- static constexpr auto kErrorMargin = 1.0e-2;
+ static constexpr auto kErrorMarginRelative = 1.0e-2;
+ static constexpr auto kErrorMarginAbsolute = 1.0e-10;
// Constants holding start and end strings for terminal-output in colour
const std::string kPrintError{"\x1b[31m"};
@@ -84,7 +85,7 @@ class Tester {
void TestEnd();
// Compares two floating point values for similarity. Allows for a certain relative error margin.
- static bool TestSimilarity(const T val1, const T val2, const double margin);
+ static bool TestSimilarity(const T val1, const T val2);
// Tests either an error count (should be zero) or two error codes (must match)
void TestErrorCount(const size_t errors, const size_t size, const Arguments<T> &args);