summaryrefslogtreecommitdiff
path: root/libs/ardour/test/framewalk_to_beats_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-09 22:57:45 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-09 22:57:45 +0000
commit8135a0c5ec116607896b2d1aac108f052963b492 (patch)
tree6be4dbc28787f7b009a3bc512aa237a86e832678 /libs/ardour/test/framewalk_to_beats_test.cc
parent6af96fd59d98d95b84f6b1bcd490d84784c67b38 (diff)
Clean up test slightly.
git-svn-id: svn://localhost/ardour2/branches/3.0@10957 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/test/framewalk_to_beats_test.cc')
-rw-r--r--libs/ardour/test/framewalk_to_beats_test.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/libs/ardour/test/framewalk_to_beats_test.cc b/libs/ardour/test/framewalk_to_beats_test.cc
index c5bd47b62a..6aca63c6c1 100644
--- a/libs/ardour/test/framewalk_to_beats_test.cc
+++ b/libs/ardour/test/framewalk_to_beats_test.cc
@@ -25,19 +25,19 @@ FramewalkToBeatsTest::singleTempoTest ()
/* Walk 1 beats-worth of frames from beat 3 */
double r = map.framewalk_to_beats (frames_per_beat * 2, frames_per_beat * 1);
- CPPUNIT_ASSERT (r == 1);
+ CPPUNIT_ASSERT_EQUAL (r, 1.0);
/* Walk 6 beats-worth of frames from beat 4 */
r = map.framewalk_to_beats (frames_per_beat * 3, frames_per_beat * 6);
- CPPUNIT_ASSERT (r == 6);
+ CPPUNIT_ASSERT_EQUAL (r, 6.0);
/* Walk 1.5 beats-worth of frames from beat 3 */
r = map.framewalk_to_beats (frames_per_beat * 2, frames_per_beat * 1.5);
- CPPUNIT_ASSERT (r == 1.5);
+ CPPUNIT_ASSERT_EQUAL (r, 1.5);
/* Walk 1.5 beats-worth of frames from beat 2.5 */
r = map.framewalk_to_beats (frames_per_beat * 2.5, frames_per_beat * 1.5);
- CPPUNIT_ASSERT (r == 1.5);
+ CPPUNIT_ASSERT_EQUAL (r, 1.5);
}
void
@@ -76,22 +76,22 @@ FramewalkToBeatsTest::doubleTempoTest ()
/* Walk 1 beat from 1.2 */
double r = map.framewalk_to_beats (24e3, 24e3);
- assert (r == 1);
+ CPPUNIT_ASSERT_EQUAL (r, 1.0);
/* Walk 2 beats from 3.3 to 4.1 (over the tempo change) */
r = map.framewalk_to_beats (264e3, (24e3 + 12e3));
- assert (r == 2);
+ CPPUNIT_ASSERT_EQUAL (r, 2.0);
/* Walk 2.5 beats from 3.3-and-a-half to 4.2 (over the tempo change) */
r = map.framewalk_to_beats (264e3 - 12e3, (24e3 + 12e3 + 12e3));
- assert (r == 2.5);
+ CPPUNIT_ASSERT_EQUAL (r, 2.5);
- /* Walk 3 beats from 3.3-and-a-half to 4.2-and-a-half (over the tempo change) */
+ /* Walk 3 beats from 3.4-and-a-half to 4.3-and-a-half (over the tempo change) */
r = map.framewalk_to_beats (264e3 - 12e3, (24e3 + 12e3 + 12e3 + 6e3));
- assert (r == 3);
+ CPPUNIT_ASSERT_EQUAL (r, 3.0);
- /* Walk 3.5 beats from 3.3-and-a-half to 4.3 (over the tempo change) */
+ /* Walk 3.5 beats from 3.4-and-a-half to 4.4 (over the tempo change) */
r = map.framewalk_to_beats (264e3 - 12e3, (24e3 + 12e3 + 12e3 + 12e3));
- assert (r == 3.5);
+ CPPUNIT_ASSERT_EQUAL (r, 3.5);
}