From c0c0526fc8076cff6e6dfd13b3e950898b405286 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Oct 2013 17:18:54 +0100 Subject: test/test_mixramp: improved test for mixramp_interpolate(0) --- test/test_mixramp.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'test') 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); @@ -40,10 +42,6 @@ public: mixramp_interpolate(foo, 6)); 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); -- cgit v1.2.3