mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 17:46:34 +01:00
Reverse parameters to CPPUNIT_ASSERT_EQUAL so its assert
messages read the right way round. git-svn-id: svn://localhost/ardour2/branches/3.0@11137 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e11c96019a
commit
d345d44688
1 changed files with 8 additions and 8 deletions
|
|
@ -26,11 +26,11 @@ FrameposPlusBeatsTest::singleTempoTest ()
|
||||||
|
|
||||||
/* Add 1 beat to beat 3 of the first bar */
|
/* Add 1 beat to beat 3 of the first bar */
|
||||||
framepos_t r = map.framepos_plus_beats (frames_per_beat * 2, 1);
|
framepos_t r = map.framepos_plus_beats (frames_per_beat * 2, 1);
|
||||||
CPPUNIT_ASSERT_EQUAL (r, framepos_t (frames_per_beat * 3));
|
CPPUNIT_ASSERT_EQUAL (framepos_t (frames_per_beat * 3), r);
|
||||||
|
|
||||||
/* Add 4 beats to a -ve frame of 1 beat before zero */
|
/* Add 4 beats to a -ve frame of 1 beat before zero */
|
||||||
r = map.framepos_plus_beats (-frames_per_beat * 1, 4);
|
r = map.framepos_plus_beats (-frames_per_beat * 1, 4);
|
||||||
CPPUNIT_ASSERT_EQUAL (r, framepos_t (frames_per_beat * 3));
|
CPPUNIT_ASSERT_EQUAL (framepos_t (frames_per_beat * 3), r);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test adding things that overlap a tempo change */
|
/* Test adding things that overlap a tempo change */
|
||||||
|
|
@ -70,15 +70,15 @@ FrameposPlusBeatsTest::doubleTempoTest ()
|
||||||
|
|
||||||
/* Add 1 beat to 1|2 */
|
/* Add 1 beat to 1|2 */
|
||||||
framepos_t r = map.framepos_plus_beats (24e3, 1);
|
framepos_t r = map.framepos_plus_beats (24e3, 1);
|
||||||
CPPUNIT_ASSERT_EQUAL (r, framepos_t (48e3));
|
CPPUNIT_ASSERT_EQUAL (framepos_t (48e3), r);
|
||||||
|
|
||||||
/* Add 2 beats to 3|4 (over the tempo change) */
|
/* Add 2 beats to 3|4 (over the tempo change) */
|
||||||
r = map.framepos_plus_beats (264e3, 2);
|
r = map.framepos_plus_beats (264e3, 2);
|
||||||
CPPUNIT_ASSERT_EQUAL (r, framepos_t (264e3 + 24e3 + 12e3));
|
CPPUNIT_ASSERT_EQUAL (framepos_t (264e3 + 24e3 + 12e3), r);
|
||||||
|
|
||||||
/* Add 2.5 beats to 3|3|960 (over the tempo change) */
|
/* Add 2.5 beats to 3|3|960 (over the tempo change) */
|
||||||
r = map.framepos_plus_beats (264e3 - 12e3, 2.5);
|
r = map.framepos_plus_beats (264e3 - 12e3, 2.5);
|
||||||
CPPUNIT_ASSERT_EQUAL (r, framepos_t (264e3 + 24e3 + 12e3));
|
CPPUNIT_ASSERT_EQUAL (framepos_t (264e3 + 24e3 + 12e3), r);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Same as doubleTempoTest () except put a meter change at the same time as the
|
/* Same as doubleTempoTest () except put a meter change at the same time as the
|
||||||
|
|
@ -124,15 +124,15 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
|
||||||
|
|
||||||
/* Add 1 beat to 1|2 */
|
/* Add 1 beat to 1|2 */
|
||||||
framepos_t r = map.framepos_plus_beats (24e3, 1);
|
framepos_t r = map.framepos_plus_beats (24e3, 1);
|
||||||
CPPUNIT_ASSERT_EQUAL (r, framepos_t (48e3));
|
CPPUNIT_ASSERT_EQUAL (framepos_t (48e3), r);
|
||||||
|
|
||||||
/* Add 2 beats to 3|4 (over the tempo change) */
|
/* Add 2 beats to 3|4 (over the tempo change) */
|
||||||
r = map.framepos_plus_beats (264e3, 2);
|
r = map.framepos_plus_beats (264e3, 2);
|
||||||
CPPUNIT_ASSERT_EQUAL (r, framepos_t (264e3 + 24e3 + 12e3));
|
CPPUNIT_ASSERT_EQUAL (framepos_t (264e3 + 24e3 + 12e3), r);
|
||||||
|
|
||||||
/* Add 2.5 beats to 3|3|960 (over the tempo change) */
|
/* Add 2.5 beats to 3|3|960 (over the tempo change) */
|
||||||
r = map.framepos_plus_beats (264e3 - 12e3, 2.5);
|
r = map.framepos_plus_beats (264e3 - 12e3, 2.5);
|
||||||
CPPUNIT_ASSERT_EQUAL (r, framepos_t (264e3 + 24e3 + 12e3));
|
CPPUNIT_ASSERT_EQUAL (framepos_t (264e3 + 24e3 + 12e3), r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue