13
0
livetrax/libs/evoral/test/RangeTest.hpp
Colin Fletcher 4358b8db79 Add test for Evoral::coverage()
Add a test function to test Evoral::coverage() with all possible overlap
types. The first test (line 161) that expects OverlapExternal will fail
with the current implementation of coverage().

There's possibly still a discussion to be had about what the overlap type of
ranges with negative lengths should be: there are currently places in the main
Ardour code base where coverage() is called with ranges where start > end.
2014-11-25 17:49:51 +00:00

27 lines
584 B
C++

#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
class RangeTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE (RangeTest);
CPPUNIT_TEST (coalesceTest);
CPPUNIT_TEST (subtractTest1);
CPPUNIT_TEST (subtractTest2);
CPPUNIT_TEST (subtractTest3);
CPPUNIT_TEST (subtractTest4);
CPPUNIT_TEST (subtractTest5);
CPPUNIT_TEST (coverageTest);
CPPUNIT_TEST_SUITE_END ();
public:
void coalesceTest ();
void subtractTest1 ();
void subtractTest2 ();
void subtractTest3 ();
void subtractTest4 ();
void subtractTest5 ();
void coverageTest ();
};