Commit c0c0526f authored by Max Kellermann's avatar Max Kellermann

test/test_mixramp: improved test for mixramp_interpolate(0)

parent 375c88b1
...@@ -22,7 +22,9 @@ public: ...@@ -22,7 +22,9 @@ public:
const char *input = "1.0 0.00;3.0 0.10;6.0 2.50;"; const char *input = "1.0 0.00;3.0 0.10;6.0 2.50;";
char *foo = strdup(input); 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); free(foo);
foo = strdup(input); foo = strdup(input);
...@@ -41,10 +43,6 @@ public: ...@@ -41,10 +43,6 @@ public:
free(foo); free(foo);
foo = strdup(input); 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))); CPPUNIT_ASSERT(std::isnan(mixramp_interpolate(foo, 6.1)));
free(foo); free(foo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment