diff options
author | nick_m <mainsbridge@gmail.com> | 2016-10-02 03:55:18 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-10-02 03:55:18 +1100 |
commit | af289cab6231ec8785a2e69ab78f6257626aef9f (patch) | |
tree | 42a5af66405bdcbb974ee3a74fd9b67d42ae4521 /libs/ardour/test/framepos_minus_beats_test.cc | |
parent | bb3312c3bb9c6ed9b75ac6739a6ee720ddf86c86 (diff) |
Remove unused methods, add tests to ensure meter divisors don't mess with Beats.
- TempoMap::framepos_minus_beats() was only used by its test,
so don't build the test.
Diffstat (limited to 'libs/ardour/test/framepos_minus_beats_test.cc')
-rw-r--r-- | libs/ardour/test/framepos_minus_beats_test.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/ardour/test/framepos_minus_beats_test.cc b/libs/ardour/test/framepos_minus_beats_test.cc index 85032d2240..fcf20e9238 100644 --- a/libs/ardour/test/framepos_minus_beats_test.cc +++ b/libs/ardour/test/framepos_minus_beats_test.cc @@ -26,11 +26,11 @@ FrameposMinusBeatsTest::singleTempoTest () map.replace_tempo (map.first_tempo(), tempo, 0.0, 0, TempoSection::Constant, AudioTime); /* Subtract 1 beat from beat 3 of the first bar */ - framepos_t r = map.framepos_minus_beats (frames_per_beat * 2, Beats(1)); + framepos_t r = map.framepos_minus_qn (frames_per_beat * 2, Beats(1)); CPPUNIT_ASSERT_EQUAL (r, framepos_t (frames_per_beat * 1)); /* Subtract 4 beats from 3 beats in, to go beyond zero */ - r = map.framepos_minus_beats (frames_per_beat * 3, Beats(4)); + r = map.framepos_minus_qn (frames_per_beat * 3, Beats(4)); CPPUNIT_ASSERT_EQUAL (r, framepos_t (- frames_per_beat)); } @@ -71,15 +71,15 @@ FrameposMinusBeatsTest::doubleTempoTest () /* Now some tests */ /* Subtract 1 beat from 1|2 */ - framepos_t r = map.framepos_minus_beats (24e3, Beats(1)); + framepos_t r = map.framepos_minus_qn (24e3, Beats(1)); CPPUNIT_ASSERT_EQUAL (r, framepos_t (0)); /* Subtract 2 beats from 4|2 (over the tempo change) */ - r = map.framepos_minus_beats (288e3 + 12e3, Beats(2)); + r = map.framepos_minus_qn (288e3 + 12e3, Beats(2)); CPPUNIT_ASSERT_EQUAL (r, framepos_t (288e3 - 24e3)); /* Subtract 2.5 beats from 4|2 (over the tempo change) */ - r = map.framepos_minus_beats (288e3 + 12e3, Beats(2.5)); + r = map.framepos_minus_qn (288e3 + 12e3, Beats(2.5)); CPPUNIT_ASSERT_EQUAL (r, framepos_t (288e3 - 24e3 - 12e3)); } @@ -126,15 +126,15 @@ FrameposMinusBeatsTest::doubleTempoWithMeterTest () /* Now some tests */ /* Subtract 1 beat from 1|2 */ - framepos_t r = map.framepos_minus_beats (24e3, Beats(1)); + framepos_t r = map.framepos_minus_qn (24e3, Beats(1)); CPPUNIT_ASSERT_EQUAL (r, framepos_t (0)); /* Subtract 2 beats from 4|2 (over the tempo change) */ - r = map.framepos_minus_beats (288e3 + 12e3, Beats(2)); + r = map.framepos_minus_qn (288e3 + 12e3, Beats(2)); CPPUNIT_ASSERT_EQUAL (r, framepos_t (288e3 - 24e3)); /* Subtract 2.5 beats from 4|2 (over the tempo change) */ - r = map.framepos_minus_beats (288e3 + 12e3, Beats(2.5)); + r = map.framepos_minus_qn (288e3 + 12e3, Beats(2.5)); CPPUNIT_ASSERT_EQUAL (r, framepos_t (288e3 - 24e3 - 12e3)); } |