summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-30 17:18:54 +0100
committerMax Kellermann <max@duempel.org>2013-10-30 17:18:54 +0100
commitc0c0526fc8076cff6e6dfd13b3e950898b405286 (patch)
treedc54d7a1cccd312144e6f1034cd7b35383808e5f /test
parent375c88b110d45b11a0635c896e6016ddad39bcee (diff)
test/test_mixramp: improved test for mixramp_interpolate(0)
Diffstat (limited to 'test')
-rw-r--r--test/test_mixramp.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/test_mixramp.cxx b/test/test_mixramp.cxx
index 7ed250717..74d49dd87 100644
--- a/test/test_mixramp.cxx
+++ b/test/test_mixramp.cxx
@@ -22,7 +22,9 @@ public:
const char *input = "1.0 0.00;3.0 0.10;6.0 2.50;";
char *foo = strdup(input);
- CPPUNIT_ASSERT(!std::isnan(mixramp_interpolate(foo, 0)));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(double(0),
+ mixramp_interpolate(foo, 0),
+ 0.05);
free(foo);
foo = strdup(input);
@@ -41,10 +43,6 @@ public:
free(foo);
foo = strdup(input);
- CPPUNIT_ASSERT(!std::isnan(mixramp_interpolate(foo, 3)));
- free(foo);
-
- foo = strdup(input);
CPPUNIT_ASSERT(std::isnan(mixramp_interpolate(foo, 6.1)));
free(foo);