diff options
author | Max Kellermann <max@musicpd.org> | 2018-09-22 19:24:34 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-09-22 19:37:02 +0200 |
commit | 224400074c61f667fb6d0d89d7170a4d04ba39b4 (patch) | |
tree | b02aae9496bf02c1596d7eb0275ea6ee3134173a /test/test_mixramp.cxx | |
parent | 863722545f1d892ce4d30b91f6bf25bb08b48a19 (diff) |
player/CrossFade: use std::chrono::duration
Diffstat (limited to 'test/test_mixramp.cxx')
-rw-r--r-- | test/test_mixramp.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/test_mixramp.cxx b/test/test_mixramp.cxx index ea245f72f..898452c89 100644 --- a/test/test_mixramp.cxx +++ b/test/test_mixramp.cxx @@ -23,53 +23,53 @@ public: char *foo = strdup(input); CPPUNIT_ASSERT_DOUBLES_EQUAL(double(0), - mixramp_interpolate(foo, 0), + mixramp_interpolate(foo, 0).count(), 0.05); free(foo); foo = strdup(input); CPPUNIT_ASSERT_DOUBLES_EQUAL(float(0), - mixramp_interpolate(foo, 1), + mixramp_interpolate(foo, 1).count(), 0.005); free(foo); foo = strdup(input); CPPUNIT_ASSERT_DOUBLES_EQUAL(float(0.1), - mixramp_interpolate(foo, 3), + mixramp_interpolate(foo, 3).count(), 0.005); free(foo); foo = strdup(input); CPPUNIT_ASSERT_DOUBLES_EQUAL(float(2.5), - mixramp_interpolate(foo, 6), + mixramp_interpolate(foo, 6).count(), 0.01); free(foo); foo = strdup(input); - CPPUNIT_ASSERT(mixramp_interpolate(foo, 6.1) < 0); + CPPUNIT_ASSERT(mixramp_interpolate(foo, 6.1) < FloatDuration::zero()); free(foo); foo = strdup(input); CPPUNIT_ASSERT_DOUBLES_EQUAL(float(0.05), - mixramp_interpolate(foo, 2), + mixramp_interpolate(foo, 2).count(), 0.05); free(foo); foo = strdup(input); CPPUNIT_ASSERT_DOUBLES_EQUAL(float(1.3), - mixramp_interpolate(foo, 4.5), + mixramp_interpolate(foo, 4.5).count(), 0.05); free(foo); foo = strdup(input); CPPUNIT_ASSERT_DOUBLES_EQUAL(float(0.9), - mixramp_interpolate(foo, 4), + mixramp_interpolate(foo, 4).count(), 0.05); free(foo); foo = strdup(input); CPPUNIT_ASSERT_DOUBLES_EQUAL(float(1.7), - mixramp_interpolate(foo, 5), + mixramp_interpolate(foo, 5).count(), 0.05); free(foo); } |