|
|
|
@ -34,6 +34,7 @@ namespace Magnum { namespace Animation { namespace Test { |
|
|
|
struct TrackViewTest: TestSuite::Tester { |
|
|
|
struct TrackViewTest: TestSuite::Tester { |
|
|
|
explicit TrackViewTest(); |
|
|
|
explicit TrackViewTest(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void constructEmpty(); |
|
|
|
void construct(); |
|
|
|
void construct(); |
|
|
|
void constructDefaults(); |
|
|
|
void constructDefaults(); |
|
|
|
void constructSingleArray(); |
|
|
|
void constructSingleArray(); |
|
|
|
@ -87,7 +88,8 @@ const struct { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TrackViewTest::TrackViewTest() { |
|
|
|
TrackViewTest::TrackViewTest() { |
|
|
|
addTests({&TrackViewTest::construct, |
|
|
|
addTests({&TrackViewTest::constructEmpty, |
|
|
|
|
|
|
|
&TrackViewTest::construct, |
|
|
|
&TrackViewTest::constructDefaults, |
|
|
|
&TrackViewTest::constructDefaults, |
|
|
|
&TrackViewTest::constructSingleArray, |
|
|
|
&TrackViewTest::constructSingleArray, |
|
|
|
&TrackViewTest::constructSingleArrayDefaults, |
|
|
|
&TrackViewTest::constructSingleArrayDefaults, |
|
|
|
@ -103,6 +105,15 @@ TrackViewTest::TrackViewTest() { |
|
|
|
|
|
|
|
|
|
|
|
using namespace Math::Literals; |
|
|
|
using namespace Math::Literals; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void TrackViewTest::constructEmpty() { |
|
|
|
|
|
|
|
const TrackView<Float, Vector3> a; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_VERIFY(!a.interpolator()); |
|
|
|
|
|
|
|
CORRADE_VERIFY(a.keys().empty()); |
|
|
|
|
|
|
|
CORRADE_VERIFY(a.values().empty()); |
|
|
|
|
|
|
|
CORRADE_COMPARE(a.at(42.0f), Vector3{}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void TrackViewTest::construct() { |
|
|
|
void TrackViewTest::construct() { |
|
|
|
constexpr Float keys[]{0.0f, 5.0f}; |
|
|
|
constexpr Float keys[]{0.0f, 5.0f}; |
|
|
|
constexpr Vector3 values[]{{3.0f, 1.0f, 0.1f}, {0.3f, 0.6f, 1.0f}}; |
|
|
|
constexpr Vector3 values[]{{3.0f, 1.0f, 0.1f}, {0.3f, 0.6f, 1.0f}}; |
|
|
|
|