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