diff options
author | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2014-11-24 15:10:50 +0000 |
---|---|---|
committer | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2014-11-25 14:59:48 +0000 |
commit | 3a6c9e3bb982b1cad8cfbcac2b1c906ddac1e7b6 (patch) | |
tree | 97d37458d3a44582eae9780625365394f4c7663d /libs/ardour/test | |
parent | 1f58f81aa6e1f917b00ae1773650dc93b97c6da1 (diff) |
Fix build of evoral tests
Fix compile errors in libs/evoral/test/, by explicitly calling
Evoral::MusicalTime::to_double() wherever a double value is required of a
MusicalTime.
Some of the double variables should probably really be made into MusicalTime
ones instead, but I don't want to mess with this too much.
takeFiveTest still fails for me after this, but a failing test is probably
more informative in the long run than a test that won't even compile.
Diffstat (limited to 'libs/ardour/test')
-rw-r--r-- | libs/ardour/test/framewalk_to_beats_test.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/ardour/test/framewalk_to_beats_test.cc b/libs/ardour/test/framewalk_to_beats_test.cc index 2385dd53c9..bcbd3e089f 100644 --- a/libs/ardour/test/framewalk_to_beats_test.cc +++ b/libs/ardour/test/framewalk_to_beats_test.cc @@ -24,19 +24,19 @@ FramewalkToBeatsTest::singleTempoTest () map.add_tempo (tempo, BBT_Time (1, 1, 0)); /* Walk 1 beats-worth of frames from beat 3 */ - double r = map.framewalk_to_beats (frames_per_beat * 2, frames_per_beat * 1); + double r = map.framewalk_to_beats (frames_per_beat * 2, frames_per_beat * 1).to_double(); CPPUNIT_ASSERT_EQUAL (1.0, r); /* Walk 6 beats-worth of frames from beat 4 */ - r = map.framewalk_to_beats (frames_per_beat * 3, frames_per_beat * 6); + r = map.framewalk_to_beats (frames_per_beat * 3, frames_per_beat * 6).to_double(); CPPUNIT_ASSERT_EQUAL (6.0, r); /* Walk 1.5 beats-worth of frames from beat 3 */ - r = map.framewalk_to_beats (frames_per_beat * 2, frames_per_beat * 1.5); + r = map.framewalk_to_beats (frames_per_beat * 2, frames_per_beat * 1.5).to_double(); CPPUNIT_ASSERT_EQUAL (1.5, r); /* 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); + r = map.framewalk_to_beats (frames_per_beat * 2.5, frames_per_beat * 1.5).to_double(); CPPUNIT_ASSERT_EQUAL (1.5, r); } @@ -77,22 +77,22 @@ FramewalkToBeatsTest::doubleTempoTest () /* Now some tests */ /* Walk 1 beat from 1|2 */ - double r = map.framewalk_to_beats (24e3, 24e3); + double r = map.framewalk_to_beats (24e3, 24e3).to_double(); CPPUNIT_ASSERT_EQUAL (1.0, r); /* Walk 2 beats from 3|3 to 4|1 (over the tempo change) */ - r = map.framewalk_to_beats (240e3, (24e3 + 24e3)); + r = map.framewalk_to_beats (240e3, (24e3 + 24e3)).to_double(); CPPUNIT_ASSERT_EQUAL (2.0, r); /* Walk 2.5 beats from 3|3.5 to 4.2 (over the tempo change) */ - r = map.framewalk_to_beats (264e3 - 12e3, (24e3 + 12e3 + 12e3)); + r = map.framewalk_to_beats (264e3 - 12e3, (24e3 + 12e3 + 12e3)).to_double(); CPPUNIT_ASSERT_EQUAL (2.5, r); /* Walk 3 beats from 3|4.5 to 4|3.5 (over the tempo change) */ - r = map.framewalk_to_beats (264e3 - 12e3, (24e3 + 12e3 + 12e3 + 6e3)); + r = map.framewalk_to_beats (264e3 - 12e3, (24e3 + 12e3 + 12e3 + 6e3)).to_double(); CPPUNIT_ASSERT_EQUAL (3.0, r); /* Walk 3.5 beats from 3|4.5 to 4.4 (over the tempo change) */ - r = map.framewalk_to_beats (264e3 - 12e3, (24e3 + 12e3 + 12e3 + 12e3)); + r = map.framewalk_to_beats (264e3 - 12e3, (24e3 + 12e3 + 12e3 + 12e3)).to_double(); CPPUNIT_ASSERT_EQUAL (3.5, r); } @@ -132,6 +132,6 @@ FramewalkToBeatsTest::tripleTempoTest () map.add_tempo (tempoC, BBT_Time (3, 1, 0)); /* Walk from 1|3 to 4|1 */ - double r = map.framewalk_to_beats (2 * 24e3, (2 * 24e3) + (4 * 12e3) + (4 * 18e3)); + double r = map.framewalk_to_beats (2 * 24e3, (2 * 24e3) + (4 * 12e3) + (4 * 18e3)).to_double(); CPPUNIT_ASSERT_EQUAL (10.0, r); } |