MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / TEST

Function TEST

Tests/Curve_Test.cpp:35–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#include "Engine/Curve.h"
34
35NATRON_NAMESPACE_USING
36
37TEST(KeyFrame,
38 Basic)
39{
40 KeyFrame k;
41
42 k.setValue(10.);
43 EXPECT_EQ( 10., k.getValue() );
44 k.setTime(50.);
45 EXPECT_EQ( 50., k.getTime() );
46 k.setLeftDerivative(-1.);
47 EXPECT_EQ( -1., k.getLeftDerivative() );
48 k.setRightDerivative(-2.);
49 EXPECT_EQ( -2., k.getRightDerivative() );
50 k.setInterpolation(eKeyframeTypeCatmullRom);
51 EXPECT_EQ( eKeyframeTypeCatmullRom, k.getInterpolation() );
52
53 KeyFrame k1(10., 20.);
54 EXPECT_NE(k, k1);
55 EXPECT_TRUE( KeyFrame_compare_time() (k1, k) );
56 EXPECT_TRUE( k1.getTime() < k.getTime() );
57 k1.setValue(10.);
58 k1.setTime(50.);
59 k1.setLeftDerivative(-1.);
60 k1.setRightDerivative(-2.);
61 k1.setInterpolation(eKeyframeTypeCatmullRom);
62 EXPECT_EQ(k, k1);
63}
64
65TEST(Curve, Basic)
66{

Callers

nothing calls this directly

Calls 15

KeyFrameClass · 0.85
setTimeMethod · 0.80
getTimeMethod · 0.80
setLeftDerivativeMethod · 0.80
getLeftDerivativeMethod · 0.80
setRightDerivativeMethod · 0.80
getRightDerivativeMethod · 0.80
getInterpolationMethod · 0.80
addKeyFrameMethod · 0.80
getValueAtMethod · 0.80
getDerivativeAtMethod · 0.80

Tested by

no test coverage detected