temporal: add (back) first set of unit tests

This just uses the old Evoral BeatTest. Some of the tests needed amending
because temporal uses rint() to convert between float and int, not just
a cast.
This commit is contained in:
Paul Davis 2022-02-12 15:12:24 -07:00
parent 9cea6b7359
commit 04bd9187e4
4 changed files with 136 additions and 0 deletions

View file

@ -0,0 +1,22 @@
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
class BeatsTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(BeatsTest);
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();
};