Fix interpolator being lost when moving keyframe to the end (fixes #62)

This commit is contained in:
johni0702
2017-04-13 20:39:45 +02:00
parent fcbbbc9ea1
commit 0c1dc658ad
4 changed files with 75 additions and 13 deletions

View File

@@ -473,6 +473,27 @@ public class SPTimelineTest {
impl.setInterpolatorToDefault(0);
}
@Test
public void testMoveKeyframeSimple() {
addPosition(0, 0);
addPosition(1, 1);
setInterpolator(0, new LinearInterpolator(), 1);
assertIsLinear(0);
impl.moveKeyframe(SPPath.POSITION, 0, 2);
assertValidInterpolators(SPPath.POSITION, 1);
assertIsLinear(0);
impl.moveKeyframe(SPPath.POSITION, 2, 0);
assertValidInterpolators(SPPath.POSITION, 1);
assertIsLinear(0);
addPosition(2, 1);
impl.moveKeyframe(SPPath.POSITION, 0, 3);
assertValidInterpolators(SPPath.POSITION, 1);
assertIsLinear(0);
assertIsLinear(1);
}
@Test
public void testMoveKeyframe() {
addPosition(1, 0);