2023-02-16 10:59:41 -07:00
|
|
|
#include <memory>
|
|
|
|
|
|
2015-01-19 22:14:58 +01:00
|
|
|
#include <cppunit/TestFixture.h>
|
|
|
|
|
#include <cppunit/extensions/HelperMacros.h>
|
2023-02-16 10:59:41 -07:00
|
|
|
|
2019-10-25 13:13:51 -06:00
|
|
|
#include "evoral/ControlList.h"
|
2015-01-19 22:14:58 +01:00
|
|
|
|
|
|
|
|
class CurveTest : public CppUnit::TestFixture
|
|
|
|
|
{
|
|
|
|
|
CPPUNIT_TEST_SUITE (CurveTest);
|
2016-12-04 15:17:08 -05:00
|
|
|
CPPUNIT_TEST (trivial);
|
|
|
|
|
CPPUNIT_TEST (rtGet);
|
2015-01-19 23:53:52 +01:00
|
|
|
CPPUNIT_TEST (twoPointLinear);
|
2015-01-20 00:46:58 +01:00
|
|
|
CPPUNIT_TEST (threePointLinear);
|
|
|
|
|
CPPUNIT_TEST (threePointDiscete);
|
2015-02-13 12:25:26 +00:00
|
|
|
CPPUNIT_TEST (constrainedCubic);
|
2015-01-20 00:46:58 +01:00
|
|
|
CPPUNIT_TEST (ctrlListEval);
|
2015-01-19 22:14:58 +01:00
|
|
|
CPPUNIT_TEST_SUITE_END ();
|
|
|
|
|
|
|
|
|
|
public:
|
2016-12-04 15:17:08 -05:00
|
|
|
void trivial ();
|
|
|
|
|
void rtGet ();
|
2015-01-19 23:53:52 +01:00
|
|
|
void twoPointLinear ();
|
2015-01-20 00:46:58 +01:00
|
|
|
void threePointLinear ();
|
|
|
|
|
void threePointDiscete ();
|
2015-02-13 12:25:26 +00:00
|
|
|
void constrainedCubic ();
|
2015-01-20 00:46:58 +01:00
|
|
|
void ctrlListEval ();
|
2015-01-19 22:14:58 +01:00
|
|
|
|
2015-01-19 23:53:52 +01:00
|
|
|
private:
|
2023-02-16 16:33:28 -07:00
|
|
|
std::shared_ptr<Evoral::ControlList> TestCtrlList() {
|
2015-01-19 23:53:52 +01:00
|
|
|
Evoral::Parameter param (Evoral::Parameter(0));
|
|
|
|
|
const Evoral::ParameterDescriptor desc;
|
2023-07-21 09:56:42 -06:00
|
|
|
return std::shared_ptr<Evoral::ControlList> (new Evoral::ControlList(param, desc, Temporal::TimeDomainProvider (Temporal::AudioTime)));
|
2015-01-19 23:53:52 +01:00
|
|
|
}
|
|
|
|
|
};
|