summaryrefslogtreecommitdiff
path: root/libs/ardour/test/bbt_test.cpp
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2010-01-29 05:17:44 +0000
committerHans Baier <hansfbaier@googlemail.com>2010-01-29 05:17:44 +0000
commit0c6c45fc689c0e50b2b13f153369a4fc82542053 (patch)
tree7b0074637ccaca8fe3f4562cca359ac1318971bc /libs/ardour/test/bbt_test.cpp
parentd978f102f56ae583d6107b3b29a6bcdd3fe55784 (diff)
* add waf option to enable compilation of unit tests
* libs/ardour: make filenames of unit tests compy with the convention git-svn-id: svn://localhost/ardour2/branches/3.0@6583 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/test/bbt_test.cpp')
-rw-r--r--libs/ardour/test/bbt_test.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/libs/ardour/test/bbt_test.cpp b/libs/ardour/test/bbt_test.cpp
new file mode 100644
index 0000000000..be1605a75f
--- /dev/null
+++ b/libs/ardour/test/bbt_test.cpp
@@ -0,0 +1,23 @@
+#include <cassert>
+#include "ardour/tempo.h"
+#include "bbt_test.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION(BBTTest);
+
+using namespace std;
+using namespace ARDOUR;
+
+void
+BBTTest::addTest ()
+{
+ TempoMap map(48000);
+
+ // 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));
+}
+
+void
+BBTTest::subtractTest ()
+{
+}