Fix counting thinko in tests.
authornick_m <mainsbridge@gmail.com>
Fri, 24 Jun 2016 15:37:48 +0000 (01:37 +1000)
committernick_m <mainsbridge@gmail.com>
Fri, 24 Jun 2016 15:37:48 +0000 (01:37 +1000)
- note that the negative framepos in
  FrameposPlusBeatsTest::singleTempoTest() will
  not pass. needs some thougt as to whether it is testing
  the correct thing.

libs/ardour/test/framepos_minus_beats_test.cc
libs/ardour/test/framepos_plus_beats_test.cc
libs/ardour/test/tempo_test.cc

index e9a1403cc0d8bda2f6729bce9df347508b08fd85..09c91756b6a3f25845b6de88cba0f984349b02b5 100644 (file)
@@ -110,7 +110,7 @@ FrameposMinusBeatsTest::doubleTempoWithMeterTest ()
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
-         0 pulses                                              4 pulses
+         0 pulses                                              3 pulses
          |                 |                 |                 |             |
          | 1.1 1.2 1.3 1.4 | 2.1 2.2 2.3.2.4 | 3.1 3.2 3.3 3.4 | 4.1 4.2 4.3 |
 
@@ -121,7 +121,7 @@ FrameposMinusBeatsTest::doubleTempoWithMeterTest ()
        Tempo tempoB (240);
        map.add_tempo (tempoB, 12.0 / tempoA.note_type(), 0, TempoSection::Constant, MusicTime);
        Meter meterB (3, 4);
-       map.add_meter (meterB, 12.0 / tempoA.note_type(), BBT_Time (4, 1, 0), 0, MusicTime);
+       map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0), 0, MusicTime);
 
        /* Now some tests */
 
index a82415ac2338c6c58274da2a92505bd885ea5f6d..a1a72d5dcbdca581b3896d221362b9afb8f36364 100644 (file)
@@ -56,7 +56,7 @@ FrameposPlusBeatsTest::doubleTempoTest ()
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
-         0 pulses                                              4 pulses
+         0 pulses                                              3 pulses
          |                 |                 |                 |                 |
          | 1.1 1.2 1.3 1.4 | 2.1 2.2 2.3.2.4 | 3.1 3.2 3.3 3.4 | 4.1 4.2 4.3 4.4 |
 
@@ -109,7 +109,7 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
-         0 pulses                                              4 pulses
+         0 pulses                                              3 pulses
          |                 |                 |                 |             |
          | 1.1 1.2 1.3 1.4 | 2.1 2.2 2.3.2.4 | 3.1 3.2 3.3 3.4 | 4.1 4.2 4.3 |
 
@@ -120,7 +120,7 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
        Tempo tempoB (240);
        map.add_tempo (tempoB, 12.0 / tempoA.note_type(), 0, TempoSection::Constant, MusicTime);
        Meter meterB (3, 4);
-       map.add_meter (meterB, 12.0 / tempoA.note_type(), BBT_Time (4, 1, 0), 0, MusicTime);
+       map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0), 0, MusicTime);
 
        /* Now some tests */
 
index 6caa48648fec735a8428132b77c849dd9b763261..d7c5724d309302cb282fb2ac9f8a95efef6f35b8 100644 (file)
@@ -29,7 +29,7 @@ TempoTest::recomputeMapTest ()
          120bpm                                                240bpm
          0 beats                                               12 beats
          0 frames                                              288e3 frames
-         0 pulses                                              4 pulses
+         0 pulses                                              3 pulses
          |                 |                 |                 |             |
          | 1.1 1.2 1.3 1.4 | 2.1 2.2 2.3.2.4 | 3.1 3.2 3.3 3.4 | 4.1 4.2 4.3 |
 
@@ -38,7 +38,7 @@ TempoTest::recomputeMapTest ()
        Tempo tempoA (120);
        map.add_tempo (tempoA, 0.0, 0, TempoSection::Constant, AudioTime);
        Tempo tempoB (240);
-       map.add_tempo (tempoB, 4.0, 0, TempoSection::Constant, MusicTime);
+       map.add_tempo (tempoB, 3.0, 0, TempoSection::Constant, MusicTime);
        Meter meterB (3, 4);
        map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0), 0, MusicTime);