From 14ac8fd36b9f4e77e87b5728bc2c6ec5cdf26075 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 12 Feb 2022 17:51:30 -0700 Subject: [PATCH] skeleton for temporal/BBT testing (empty for now) --- libs/temporal/test/BBTTest.cc | 40 ++++++++++++++++++++++++++++++++ libs/temporal/test/BBTTest.h | 22 ++++++++++++++++++ libs/temporal/test/BeatTest.cc | 1 - libs/temporal/test/testrunner.cc | 4 ++++ libs/temporal/wscript | 1 + 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 libs/temporal/test/BBTTest.cc create mode 100644 libs/temporal/test/BBTTest.h diff --git a/libs/temporal/test/BBTTest.cc b/libs/temporal/test/BBTTest.cc new file mode 100644 index 0000000000..d0d1da6682 --- /dev/null +++ b/libs/temporal/test/BBTTest.cc @@ -0,0 +1,40 @@ +#include + +#include "temporal/beats.h" + +#include "BBTTest.h" + +CPPUNIT_TEST_SUITE_REGISTRATION(BBTTest); + +using namespace Temporal; + +void +BBTTest::createTest() +{ +} + +void +BBTTest::addTest() +{ +} + +void +BBTTest::subtractTest() +{ +} + +void +BBTTest::multiplyTest() +{ +} + +void +BBTTest::roundTest() +{ +} + +void +BBTTest::convertTest() +{ +} + diff --git a/libs/temporal/test/BBTTest.h b/libs/temporal/test/BBTTest.h new file mode 100644 index 0000000000..9437919be3 --- /dev/null +++ b/libs/temporal/test/BBTTest.h @@ -0,0 +1,22 @@ +#include +#include + +class BBTTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE(BBTTest); + CPPUNIT_TEST(createTest); + CPPUNIT_TEST(addTest); + CPPUNIT_TEST(subtractTest); + CPPUNIT_TEST(multiplyTest); + CPPUNIT_TEST(convertTest); + CPPUNIT_TEST(roundTest); + CPPUNIT_TEST_SUITE_END(); + +public: + void createTest(); + void addTest(); + void subtractTest(); + void multiplyTest(); + void convertTest(); + void roundTest(); +}; diff --git a/libs/temporal/test/BeatTest.cc b/libs/temporal/test/BeatTest.cc index 1e01abb206..f67b704b3a 100644 --- a/libs/temporal/test/BeatTest.cc +++ b/libs/temporal/test/BeatTest.cc @@ -6,7 +6,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(BeatsTest); -using namespace Evoral; using namespace Temporal; static const double delta = 1.5 / (double)Beats::PPQN; diff --git a/libs/temporal/test/testrunner.cc b/libs/temporal/test/testrunner.cc index 664bdf5774..d1802576a0 100644 --- a/libs/temporal/test/testrunner.cc +++ b/libs/temporal/test/testrunner.cc @@ -51,6 +51,10 @@ main(int argc, char* argv[]) if (!PBD::init ()) return 1; Temporal::init (); + // TempoMap::SharedPtr tmap = TempoMap::write_copy (); /* get writable copy of current tempo map */ + // change it + // TempoMap::update (tmap); /* update the global tempo map manager */ + CppUnit::TestResult testresult; CppUnit::TestResultCollector collectedresults; diff --git a/libs/temporal/wscript b/libs/temporal/wscript index 07ce93391a..ca590371bc 100644 --- a/libs/temporal/wscript +++ b/libs/temporal/wscript @@ -85,6 +85,7 @@ def build(bld): obj = bld(features = 'cxx cxxprogram') obj.source = ''' test/BeatTest.cc + test/BBTTest.cc test/testrunner.cc ''' obj.includes = ['.']