mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 06:06:25 +01:00
BBTTest: make it pass
git-svn-id: svn://localhost/ardour2/branches/3.0@6585 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
405def9215
commit
2f09d2353e
1 changed files with 14 additions and 2 deletions
|
|
@ -11,10 +11,22 @@ void
|
||||||
BBTTest::addTest ()
|
BBTTest::addTest ()
|
||||||
{
|
{
|
||||||
TempoMap map(48000);
|
TempoMap map(48000);
|
||||||
|
Tempo tempo(120);
|
||||||
|
Meter meter(4.0, 4.0);
|
||||||
|
|
||||||
|
map.add_meter (meter, BBT_Time(1, 1, 0));
|
||||||
|
|
||||||
// Test basic operations with a flat tempo map
|
// Test basic operations with a flat tempo map
|
||||||
CPPUNIT_ASSERT(map.bbt_add(BBT_Time(0, 0, 0), BBT_Time(1, 2, 3)) == BBT_Time(1, 2, 3));
|
BBT_Time time = map.bbt_add(BBT_Time(1, 1, 0), BBT_Time(1, 2, 3));
|
||||||
CPPUNIT_ASSERT(map.bbt_add(BBT_Time(1, 2, 3), BBT_Time(0, 0, 0)) == BBT_Time(1, 2, 3));
|
//cerr << "result: BBT_Time(" << time.bars << ", " << time.beats << ", "
|
||||||
|
// << time.ticks << ")" << endl;
|
||||||
|
CPPUNIT_ASSERT(time == BBT_Time(2, 3, 0));
|
||||||
|
|
||||||
|
|
||||||
|
time = map.bbt_add(BBT_Time(1, 2, 3), BBT_Time(2, 2, 3));
|
||||||
|
//cerr << "result: BBT_Time(" << time.bars << ", " << time.beats << ", "
|
||||||
|
// << time.ticks << ")" << endl;
|
||||||
|
CPPUNIT_ASSERT(time == BBT_Time(3, 4, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue