summaryrefslogtreecommitdiff
path: root/libs/ardour/test/midi_clock_test.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-09-05 14:52:08 +0200
committerRobin Gareus <robin@gareus.org>2019-09-05 14:52:08 +0200
commit01c5aa34c69cebf2816f5ea42bccbdd9b80145d0 (patch)
treefef1d32787a6749d7d1bcbeda65359ee1571f1cb /libs/ardour/test/midi_clock_test.h
parent5dfb729155e19960e99ca973947bdbb680e6630f (diff)
Update MClk unit-test - new transportmaster API
Diffstat (limited to 'libs/ardour/test/midi_clock_test.h')
-rw-r--r--libs/ardour/test/midi_clock_test.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/libs/ardour/test/midi_clock_test.h b/libs/ardour/test/midi_clock_test.h
new file mode 100644
index 0000000000..09dd048046
--- /dev/null
+++ b/libs/ardour/test/midi_clock_test.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015-2019 Robin Gareus <robin@gareus.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <cassert>
+#include <stdint.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "ardour/tempo.h"
+#include "ardour/transport_master.h"
+
+#include "test_needing_session.h"
+
+namespace ARDOUR {
+
+class MclkTestMaster : public ARDOUR::MIDIClock_TransportMaster
+{
+
+public:
+ MclkTestMaster () : MIDIClock_TransportMaster ("MClk-test", 24) {}
+ void testStepResponse ();
+};
+
+class MIDIClock_Test : public TestNeedingSession
+{
+ CPPUNIT_TEST_SUITE(MIDIClock_Test);
+ CPPUNIT_TEST(run_test);
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void run_test ();
+};
+
+} // namespace ARDOUR