mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-02 11:49:33 +01:00
temporal: new addRemoveTest unit test
This commit is contained in:
parent
bd5b8b82a6
commit
fee0af27cf
2 changed files with 19 additions and 0 deletions
|
|
@ -35,6 +35,22 @@ TempoMapTest::addTest()
|
|||
tmap->abort_update ();
|
||||
}
|
||||
|
||||
void
|
||||
TempoMapTest::addRemoveTest()
|
||||
{
|
||||
TempoMap::WritableSharedPtr tmap (new TempoMap(Tempo (120,4), Meter (4,4)));
|
||||
|
||||
tmap->set_tempo (Tempo (120, 4), BBT_Argument (5, 1, 0));
|
||||
tmap->set_meter (Meter (2, 4), BBT_Argument (5, 1, 0));
|
||||
|
||||
TempoPoint& tp = tmap->set_tempo (Tempo (120, 4), BBT_Argument (7, 1, 0));
|
||||
tmap->set_meter (Meter (4, 5), BBT_Argument (7, 1, 0));
|
||||
|
||||
tmap->replace_tempo (tp, Tempo (64, 4), timepos_t (tp.beats()));
|
||||
|
||||
CPPUNIT_ASSERT (tmap->tempo_at (BBT_Argument (8, 1, 0)).note_types_per_minute() == Tempo (64, 4).note_types_per_minute());
|
||||
}
|
||||
|
||||
void
|
||||
TempoMapTest::subtractTest()
|
||||
{
|
||||
|
|
@ -55,3 +71,4 @@ TempoMapTest::convertTest()
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ class TempoMapTest : public CppUnit::TestFixture
|
|||
CPPUNIT_TEST_SUITE(TempoMapTest);
|
||||
CPPUNIT_TEST(createTest);
|
||||
CPPUNIT_TEST(addTest);
|
||||
CPPUNIT_TEST(addRemoveTest);
|
||||
CPPUNIT_TEST(subtractTest);
|
||||
CPPUNIT_TEST(multiplyTest);
|
||||
CPPUNIT_TEST(convertTest);
|
||||
|
|
@ -15,6 +16,7 @@ class TempoMapTest : public CppUnit::TestFixture
|
|||
public:
|
||||
void createTest();
|
||||
void addTest();
|
||||
void addRemoveTest();
|
||||
void subtractTest();
|
||||
void multiplyTest();
|
||||
void convertTest();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue