NOOP, remove trailing tabs/whitespace.
[ardour.git] / libs / ardour / test / framepos_plus_beats_test.cc
index 882b6b57212b4fbc2f2c4dfecd2c3adf0a2da89b..69fd9a597d6b6de426cbd5759d134d63afd9cbfd 100644 (file)
@@ -16,7 +16,7 @@ FrameposPlusBeatsTest::singleTempoTest ()
        int const bpm = 120;
 
        double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
-       
+
        TempoMap map (sampling_rate);
        Tempo tempo (bpm);
        Meter meter (4, 4);
@@ -25,12 +25,12 @@ FrameposPlusBeatsTest::singleTempoTest ()
        map.add_tempo (tempo, BBT_Time (1, 1, 0));
 
        /* 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));
+       framepos_t r = map.framepos_plus_beats (frames_per_beat * 2, Evoral::Beats(1));
+       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));
+       r = map.framepos_plus_beats (-frames_per_beat * 1, Evoral::Beats(4));
+       CPPUNIT_ASSERT_EQUAL (framepos_t (frames_per_beat * 3), r);
 }
 
 /* Test adding things that overlap a tempo change */
@@ -45,14 +45,14 @@ FrameposPlusBeatsTest::doubleTempoTest ()
 
        /*
          120bpm at bar 1, 240bpm at bar 4
-         
+
          120bpm = 24e3 samples per beat
          240bpm = 12e3 samples per beat
        */
-       
+
 
        /*
-         
+
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
@@ -69,23 +69,23 @@ FrameposPlusBeatsTest::doubleTempoTest ()
        /* Now some tests */
 
        /* Add 1 beat to 1|2 */
-       framepos_t r = map.framepos_plus_beats (24e3, 1);
-       CPPUNIT_ASSERT_EQUAL (r, framepos_t (48e3));
+       framepos_t r = map.framepos_plus_beats (24e3, Evoral::Beats(1));
+       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));
+       r = map.framepos_plus_beats (264e3, Evoral::Beats(2));
+       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));
+       r = map.framepos_plus_beats (264e3 - 12e3, Evoral::Beats(2.5));
+       CPPUNIT_ASSERT_EQUAL (framepos_t (264e3 + 24e3 + 12e3), r);
 }
 
 /* Same as doubleTempoTest () except put a meter change at the same time as the
    tempo change (which shouldn't affect anything, since we are just dealing with
    beats)
 */
-   
+
 void
 FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
 {
@@ -97,14 +97,14 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
 
        /*
          120bpm at bar 1, 240bpm at bar 4
-         
+
          120bpm = 24e3 samples per beat
          240bpm = 12e3 samples per beat
        */
-       
+
 
        /*
-         
+
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
@@ -123,16 +123,16 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
        /* Now some tests */
 
        /* Add 1 beat to 1|2 */
-       framepos_t r = map.framepos_plus_beats (24e3, 1);
-       CPPUNIT_ASSERT_EQUAL (r, framepos_t (48e3));
+       framepos_t r = map.framepos_plus_beats (24e3, Evoral::Beats(1));
+       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));
+       r = map.framepos_plus_beats (264e3, Evoral::Beats(2));
+       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));
+       r = map.framepos_plus_beats (264e3 - 12e3, Evoral::Beats(2.5));
+       CPPUNIT_ASSERT_EQUAL (framepos_t (264e3 + 24e3 + 12e3), r);
 }