summaryrefslogtreecommitdiff
path: root/libs/ardour/test
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2010-01-29 05:17:57 +0000
committerHans Baier <hansfbaier@googlemail.com>2010-01-29 05:17:57 +0000
commit2f09d2353e47e66dd00d81847bbdd0e41fcf66c3 (patch)
tree54028e5411290a4da803610347247eb92d89222a /libs/ardour/test
parent405def9215a2fc7b70dd2999a06d16e704ddd058 (diff)
BBTTest: make it pass
git-svn-id: svn://localhost/ardour2/branches/3.0@6585 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/test')
-rw-r--r--libs/ardour/test/bbt_test.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/libs/ardour/test/bbt_test.cpp b/libs/ardour/test/bbt_test.cpp
index be1605a75f..ae169cc43e 100644
--- a/libs/ardour/test/bbt_test.cpp
+++ b/libs/ardour/test/bbt_test.cpp
@@ -11,10 +11,22 @@ void
BBTTest::addTest ()
{
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
- CPPUNIT_ASSERT(map.bbt_add(BBT_Time(0, 0, 0), BBT_Time(1, 2, 3)) == 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));
+ BBT_Time time = map.bbt_add(BBT_Time(1, 1, 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