Reverse parameters to CPPUNIT_ASSERT_EQUAL so its assert
authorCarl Hetherington <carl@carlh.net>
Tue, 3 Jan 2012 14:32:17 +0000 (14:32 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 3 Jan 2012 14:32:17 +0000 (14:32 +0000)
messages read the right way round.

git-svn-id: svn://localhost/ardour2/branches/3.0@11137 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/test/framepos_plus_beats_test.cc

index 882b6b57212b4fbc2f2c4dfecd2c3adf0a2da89b..c95c2a7a6637f18213ff0bf1c3ede31c446c0ada 100644 (file)
@@ -26,11 +26,11 @@ FrameposPlusBeatsTest::singleTempoTest ()
 
        /* Add 1 beat to beat 3 of the first bar */
        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 */
        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 */
@@ -70,15 +70,15 @@ FrameposPlusBeatsTest::doubleTempoTest ()
 
        /* Add 1 beat to 1|2 */
        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) */
        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) */
        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
@@ -124,15 +124,15 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
 
        /* Add 1 beat to 1|2 */
        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) */
        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) */
        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);
 }