modules/graphics/src/test/java/test/com/sun/scenario/animation/shared/GeneralClipInterpolatorTest.java
Print this page
rev 9250 : 8134762: Refactor Javafx graphics module tests for clear separation of tests
Reviewed-by:
*** 21,33 ****
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package com.sun.scenario.animation.shared;
import com.sun.javafx.animation.TickCalculation;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import javafx.animation.KeyFrame;
--- 21,34 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package test.com.sun.scenario.animation.shared;
import com.sun.javafx.animation.TickCalculation;
+ import com.sun.scenario.animation.shared.GeneralClipInterpolatorShim;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import javafx.animation.KeyFrame;
*** 43,53 ****
@Test
public void testSetKeyFrame() {
final KeyFrame kf1 = new KeyFrame(Duration.ZERO);
final KeyFrame kf2 = new KeyFrame(Duration.millis(1000));
final KeyFrame kf3 = new KeyFrame(Duration.millis(2000));
! final GeneralClipInterpolator gci = new GeneralClipInterpolator(new KeyFrame[] {kf1, kf2, kf3}, new long[] {0, 6000, 6000});
assertSame (gci, gci.setKeyFrames(new KeyFrame[]{kf1, kf2, kf3}, new long[] {0, 6000, 6000}));
assertNotSame(gci, gci.setKeyFrames(new KeyFrame[]{kf1, kf2 }, new long[] {0, 6000 }));
assertNotSame(gci, gci.setKeyFrames(new KeyFrame[]{kf1, kf3}, new long[] {0, 6000}));
assertSame (gci, gci.setKeyFrames(new KeyFrame[]{kf1 }, new long[] {0 }));
--- 44,54 ----
@Test
public void testSetKeyFrame() {
final KeyFrame kf1 = new KeyFrame(Duration.ZERO);
final KeyFrame kf2 = new KeyFrame(Duration.millis(1000));
final KeyFrame kf3 = new KeyFrame(Duration.millis(2000));
! final GeneralClipInterpolatorShim gci = new GeneralClipInterpolatorShim(new KeyFrame[] {kf1, kf2, kf3}, new long[] {0, 6000, 6000});
assertSame (gci, gci.setKeyFrames(new KeyFrame[]{kf1, kf2, kf3}, new long[] {0, 6000, 6000}));
assertNotSame(gci, gci.setKeyFrames(new KeyFrame[]{kf1, kf2 }, new long[] {0, 6000 }));
assertNotSame(gci, gci.setKeyFrames(new KeyFrame[]{kf1, kf3}, new long[] {0, 6000}));
assertSame (gci, gci.setKeyFrames(new KeyFrame[]{kf1 }, new long[] {0 }));
*** 62,81 ****
// main purpose of this test is to ensure we do not throw exceptions
final KeyFrame kf1 = new KeyFrame(Duration.ZERO);
final KeyFrame kf2 = new KeyFrame(Duration.ZERO);
// one key frame
! final GeneralClipInterpolator gci1 = new GeneralClipInterpolator (new KeyFrame[] {kf1}, new long[] {0});
gci1.validate(true);
gci1.validate(true);
gci1.setKeyFrames(new KeyFrame[]{kf2}, new long[] {6000});
gci1.validate(true);
gci1.setKeyFrames(new KeyFrame[]{}, new long[] {});
gci1.validate(true);
// no key frames
! final GeneralClipInterpolator gci2 = new GeneralClipInterpolator (new KeyFrame[] {}, new long[] {});
gci2.validate(true);
gci2.validate(true);
gci2.setKeyFrames(new KeyFrame[]{kf1}, new long[] {0});
gci2.validate(true);
}
--- 63,82 ----
// main purpose of this test is to ensure we do not throw exceptions
final KeyFrame kf1 = new KeyFrame(Duration.ZERO);
final KeyFrame kf2 = new KeyFrame(Duration.ZERO);
// one key frame
! final GeneralClipInterpolatorShim gci1 = new GeneralClipInterpolatorShim (new KeyFrame[] {kf1}, new long[] {0});
gci1.validate(true);
gci1.validate(true);
gci1.setKeyFrames(new KeyFrame[]{kf2}, new long[] {6000});
gci1.validate(true);
gci1.setKeyFrames(new KeyFrame[]{}, new long[] {});
gci1.validate(true);
// no key frames
! final GeneralClipInterpolatorShim gci2 = new GeneralClipInterpolatorShim (new KeyFrame[] {}, new long[] {});
gci2.validate(true);
gci2.validate(true);
gci2.setKeyFrames(new KeyFrame[]{kf1}, new long[] {0});
gci2.validate(true);
}
*** 87,97 ****
final KeyFrame end1 = new KeyFrame(Duration.millis(1000));
final KeyFrame end2a = new KeyFrame(Duration.millis(2000));
final KeyFrame end2b = new KeyFrame(Duration.millis(3000));
// four key frames
! final GeneralClipInterpolator gci1 = new GeneralClipInterpolator (new KeyFrame[] {start1, start2, end1, end2a}, new long[] {0, 0, 6000, 12000});
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(300));
gci1.interpolate(TickCalculation.fromMillis(1300));
gci1.validate(true);
--- 88,98 ----
final KeyFrame end1 = new KeyFrame(Duration.millis(1000));
final KeyFrame end2a = new KeyFrame(Duration.millis(2000));
final KeyFrame end2b = new KeyFrame(Duration.millis(3000));
// four key frames
! final GeneralClipInterpolatorShim gci1 = new GeneralClipInterpolatorShim (new KeyFrame[] {start1, start2, end1, end2a}, new long[] {0, 0, 6000, 12000});
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(300));
gci1.interpolate(TickCalculation.fromMillis(1300));
gci1.validate(true);
*** 105,115 ****
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(600));
gci1.interpolate(TickCalculation.fromMillis(1600));
// two key frames
! final GeneralClipInterpolator gci2 = new GeneralClipInterpolator (new KeyFrame[] {end1, end2a}, new long[] {6000, 12000});
gci2.validate(true);
gci2.interpolate(TickCalculation.fromMillis(300));
gci2.interpolate(TickCalculation.fromMillis(1300));
gci2.validate(true);
--- 106,116 ----
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(600));
gci1.interpolate(TickCalculation.fromMillis(1600));
// two key frames
! final GeneralClipInterpolatorShim gci2 = new GeneralClipInterpolatorShim (new KeyFrame[] {end1, end2a}, new long[] {6000, 12000});
gci2.validate(true);
gci2.interpolate(TickCalculation.fromMillis(300));
gci2.interpolate(TickCalculation.fromMillis(1300));
gci2.validate(true);
*** 132,142 ****
final KeyFrame start2 = new KeyFrame(Duration.ZERO, new KeyValue(v, 30));
final KeyFrame mid1 = new KeyFrame(Duration.millis(1000), new KeyValue(v, 40));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v, 60));
final KeyFrame end2 = new KeyFrame(Duration.millis(4000), new KeyValue(v, 70));
! final GeneralClipInterpolator gci1 = new GeneralClipInterpolator (new KeyFrame[] {start1, start2, mid1, end1}, new long[] {0, 0, 6000, 12000});
v.set(0);
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(0));
assertEquals(30, v.get());
gci1.interpolate(TickCalculation.fromMillis(300));
--- 133,143 ----
final KeyFrame start2 = new KeyFrame(Duration.ZERO, new KeyValue(v, 30));
final KeyFrame mid1 = new KeyFrame(Duration.millis(1000), new KeyValue(v, 40));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v, 60));
final KeyFrame end2 = new KeyFrame(Duration.millis(4000), new KeyValue(v, 70));
! final GeneralClipInterpolatorShim gci1 = new GeneralClipInterpolatorShim (new KeyFrame[] {start1, start2, mid1, end1}, new long[] {0, 0, 6000, 12000});
v.set(0);
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(0));
assertEquals(30, v.get());
gci1.interpolate(TickCalculation.fromMillis(300));
*** 196,206 ****
final IntegerProperty v = new SimpleIntegerProperty();
final KeyFrame mid1 = new KeyFrame(Duration.millis(1000), new KeyValue(v, 40));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v, 60));
final KeyFrame end2 = new KeyFrame(Duration.millis(4000), new KeyValue(v, 70));
! final GeneralClipInterpolator gci1 = new GeneralClipInterpolator (new KeyFrame[] {mid1, end1}, new long[] {6000, 12000});
v.set(0);
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(0));
assertEquals( 0, v.get());
gci1.interpolate(TickCalculation.fromMillis(300));
--- 197,207 ----
final IntegerProperty v = new SimpleIntegerProperty();
final KeyFrame mid1 = new KeyFrame(Duration.millis(1000), new KeyValue(v, 40));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v, 60));
final KeyFrame end2 = new KeyFrame(Duration.millis(4000), new KeyValue(v, 70));
! final GeneralClipInterpolatorShim gci1 = new GeneralClipInterpolatorShim (new KeyFrame[] {mid1, end1}, new long[] {6000, 12000});
v.set(0);
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(0));
assertEquals( 0, v.get());
gci1.interpolate(TickCalculation.fromMillis(300));
*** 265,275 ****
final KeyFrame start2 = new KeyFrame(Duration.ZERO, new KeyValue(v2, 130));
final KeyFrame mid1 = new KeyFrame(Duration.millis(1000), new KeyValue(v1, 40), new KeyValue(v2, 140), new KeyValue(v3, 240));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v1, 60), new KeyValue(v2, 160));
final KeyFrame end2 = new KeyFrame(Duration.millis(4000), new KeyValue(v1, 70), new KeyValue(v2, 170));
! final GeneralClipInterpolator gci1 = new GeneralClipInterpolator (new KeyFrame[] {start1, start2, mid1, end1}, new long[] {0, 0, 6000, 12000});
v1.set( 0);
v2.set(100);
v3.set(200);
v4.set(300);
gci1.validate(true);
--- 266,276 ----
final KeyFrame start2 = new KeyFrame(Duration.ZERO, new KeyValue(v2, 130));
final KeyFrame mid1 = new KeyFrame(Duration.millis(1000), new KeyValue(v1, 40), new KeyValue(v2, 140), new KeyValue(v3, 240));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v1, 60), new KeyValue(v2, 160));
final KeyFrame end2 = new KeyFrame(Duration.millis(4000), new KeyValue(v1, 70), new KeyValue(v2, 170));
! final GeneralClipInterpolatorShim gci1 = new GeneralClipInterpolatorShim (new KeyFrame[] {start1, start2, mid1, end1}, new long[] {0, 0, 6000, 12000});
v1.set( 0);
v2.set(100);
v3.set(200);
v4.set(300);
gci1.validate(true);
*** 403,413 ****
final IntegerProperty v3 = new SimpleIntegerProperty();
final KeyFrame mid1 = new KeyFrame(Duration.millis(1000), new KeyValue(v1, 40), new KeyValue(v2, 140), new KeyValue(v3, 240));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v1, 60), new KeyValue(v2, 160), new KeyValue(v3, 260));
final KeyFrame end2 = new KeyFrame(Duration.millis(4000), new KeyValue(v1, 70), new KeyValue(v2, 170), new KeyValue(v3, 270));
! final GeneralClipInterpolator gci1 = new GeneralClipInterpolator (new KeyFrame[] {mid1, end1}, new long[] {6000, 12000});
v1.set( 0);
v2.set(100);
v3.set(200);
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(0));
--- 404,414 ----
final IntegerProperty v3 = new SimpleIntegerProperty();
final KeyFrame mid1 = new KeyFrame(Duration.millis(1000), new KeyValue(v1, 40), new KeyValue(v2, 140), new KeyValue(v3, 240));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v1, 60), new KeyValue(v2, 160), new KeyValue(v3, 260));
final KeyFrame end2 = new KeyFrame(Duration.millis(4000), new KeyValue(v1, 70), new KeyValue(v2, 170), new KeyValue(v3, 270));
! final GeneralClipInterpolatorShim gci1 = new GeneralClipInterpolatorShim (new KeyFrame[] {mid1, end1}, new long[] {6000, 12000});
v1.set( 0);
v2.set(100);
v3.set(200);
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(0));
*** 521,531 ****
final KeyFrame mid2 = new KeyFrame(Duration.millis(1000), new KeyValue(v1, 40), new KeyValue(v1, -40), new KeyValue(v2, 100));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v1, 60), new KeyValue(v2, 0));
final KeyFrame end2 = new KeyFrame(Duration.millis(2000), new KeyValue(v1, 60), new KeyValue(v1, -60), new KeyValue(v2, 0));
// single value in start, single value in mid, duplicate value in end
! final GeneralClipInterpolator gci1 = new GeneralClipInterpolator (new KeyFrame[] {start1, mid1, end2}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(0));
assertEquals(30, v1.get());
--- 522,532 ----
final KeyFrame mid2 = new KeyFrame(Duration.millis(1000), new KeyValue(v1, 40), new KeyValue(v1, -40), new KeyValue(v2, 100));
final KeyFrame end1 = new KeyFrame(Duration.millis(2000), new KeyValue(v1, 60), new KeyValue(v2, 0));
final KeyFrame end2 = new KeyFrame(Duration.millis(2000), new KeyValue(v1, 60), new KeyValue(v1, -60), new KeyValue(v2, 0));
// single value in start, single value in mid, duplicate value in end
! final GeneralClipInterpolatorShim gci1 = new GeneralClipInterpolatorShim (new KeyFrame[] {start1, mid1, end2}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci1.validate(true);
gci1.interpolate(TickCalculation.fromMillis(0));
assertEquals(30, v1.get());
*** 542,552 ****
gci1.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// single value in start, duplicate value in mid, single value in end
! final GeneralClipInterpolator gci2 = new GeneralClipInterpolator (new KeyFrame[] {start1, mid2, end1}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci2.validate(true);
gci2.interpolate(TickCalculation.fromMillis(0));
assertEquals(30, v1.get());
--- 543,553 ----
gci1.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// single value in start, duplicate value in mid, single value in end
! final GeneralClipInterpolatorShim gci2 = new GeneralClipInterpolatorShim (new KeyFrame[] {start1, mid2, end1}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci2.validate(true);
gci2.interpolate(TickCalculation.fromMillis(0));
assertEquals(30, v1.get());
*** 563,573 ****
gci2.interpolate(TickCalculation.fromMillis(2000));
assertEquals(60, v1.get());
assertEquals(0, v2.get());
// duplicate value in start, single value in mid, single value in end
! final GeneralClipInterpolator gci3 = new GeneralClipInterpolator (new KeyFrame[] {start2, mid1, end1}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci3.validate(true);
gci3.interpolate(TickCalculation.fromMillis(0));
assertTrue("v1.get(): " + v1.get(), (30 == v1.get()) || (-30 == v1.get()));
--- 564,574 ----
gci2.interpolate(TickCalculation.fromMillis(2000));
assertEquals(60, v1.get());
assertEquals(0, v2.get());
// duplicate value in start, single value in mid, single value in end
! final GeneralClipInterpolatorShim gci3 = new GeneralClipInterpolatorShim (new KeyFrame[] {start2, mid1, end1}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci3.validate(true);
gci3.interpolate(TickCalculation.fromMillis(0));
assertTrue("v1.get(): " + v1.get(), (30 == v1.get()) || (-30 == v1.get()));
*** 584,594 ****
gci3.interpolate(TickCalculation.fromMillis(2000));
assertEquals(60, v1.get());
assertEquals(0, v2.get());
// duplicate value in start, duplicate value in mid, single value in end
! final GeneralClipInterpolator gci4 = new GeneralClipInterpolator (new KeyFrame[] {start2, mid2, end1}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci4.validate(true);
gci4.interpolate(TickCalculation.fromMillis(0));
assertTrue("v1.get(): " + v1.get(), (30 == v1.get()) || (-30 == v1.get()));
--- 585,595 ----
gci3.interpolate(TickCalculation.fromMillis(2000));
assertEquals(60, v1.get());
assertEquals(0, v2.get());
// duplicate value in start, duplicate value in mid, single value in end
! final GeneralClipInterpolatorShim gci4 = new GeneralClipInterpolatorShim (new KeyFrame[] {start2, mid2, end1}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci4.validate(true);
gci4.interpolate(TickCalculation.fromMillis(0));
assertTrue("v1.get(): " + v1.get(), (30 == v1.get()) || (-30 == v1.get()));
*** 605,615 ****
gci4.interpolate(TickCalculation.fromMillis(2000));
assertEquals(60, v1.get());
assertEquals(0, v2.get());
// duplicate value in start, single value in mid, duplicate value in end
! final GeneralClipInterpolator gci5 = new GeneralClipInterpolator (new KeyFrame[] {start2, mid1, end2}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci5.validate(true);
gci5.interpolate(TickCalculation.fromMillis(0));
assertTrue("v1.get(): " + v1.get(), (30 == v1.get()) || (-30 == v1.get()));
--- 606,616 ----
gci4.interpolate(TickCalculation.fromMillis(2000));
assertEquals(60, v1.get());
assertEquals(0, v2.get());
// duplicate value in start, single value in mid, duplicate value in end
! final GeneralClipInterpolatorShim gci5 = new GeneralClipInterpolatorShim (new KeyFrame[] {start2, mid1, end2}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci5.validate(true);
gci5.interpolate(TickCalculation.fromMillis(0));
assertTrue("v1.get(): " + v1.get(), (30 == v1.get()) || (-30 == v1.get()));
*** 626,636 ****
gci5.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// single value in start, duplicate value in mid, duplicate value in end
! final GeneralClipInterpolator gci6 = new GeneralClipInterpolator (new KeyFrame[] {start1, mid2, end2}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci6.validate(true);
gci6.interpolate(TickCalculation.fromMillis(0));
assertEquals(30, v1.get());
--- 627,637 ----
gci5.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// single value in start, duplicate value in mid, duplicate value in end
! final GeneralClipInterpolatorShim gci6 = new GeneralClipInterpolatorShim (new KeyFrame[] {start1, mid2, end2}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci6.validate(true);
gci6.interpolate(TickCalculation.fromMillis(0));
assertEquals(30, v1.get());
*** 647,657 ****
gci6.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// duplicate value in start, duplicate value in mid, duplicate value in end
! final GeneralClipInterpolator gci7 = new GeneralClipInterpolator (new KeyFrame[] {start2, mid2, end2}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci7.validate(true);
gci7.interpolate(TickCalculation.fromMillis(0));
assertTrue("v1.get(): " + v1.get(), (30 == v1.get()) || (-30 == v1.get()));
--- 648,658 ----
gci6.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// duplicate value in start, duplicate value in mid, duplicate value in end
! final GeneralClipInterpolatorShim gci7 = new GeneralClipInterpolatorShim (new KeyFrame[] {start2, mid2, end2}, new long[] {0, 6000, 12000});
v1.set(0);
v2.set(0);
gci7.validate(true);
gci7.interpolate(TickCalculation.fromMillis(0));
assertTrue("v1.get(): " + v1.get(), (30 == v1.get()) || (-30 == v1.get()));
*** 668,678 ****
gci7.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// no value in start, single value in mid, duplicate value in end
! final GeneralClipInterpolator gci8 = new GeneralClipInterpolator (new KeyFrame[] {mid1, end2}, new long[] {6000, 12000});
v1.set(0);
v2.set(0);
gci8.validate(true);
gci8.interpolate(TickCalculation.fromMillis(0));
assertEquals(0, v1.get());
--- 669,679 ----
gci7.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// no value in start, single value in mid, duplicate value in end
! final GeneralClipInterpolatorShim gci8 = new GeneralClipInterpolatorShim (new KeyFrame[] {mid1, end2}, new long[] {6000, 12000});
v1.set(0);
v2.set(0);
gci8.validate(true);
gci8.interpolate(TickCalculation.fromMillis(0));
assertEquals(0, v1.get());
*** 689,699 ****
gci8.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// no value in start, duplicate value in mid, single value in end
! final GeneralClipInterpolator gci9 = new GeneralClipInterpolator (new KeyFrame[] {mid2, end1}, new long[] {6000, 12000});
v1.set(0);
v2.set(0);
gci9.validate(true);
gci9.interpolate(TickCalculation.fromMillis(0));
assertEquals(0, v1.get());
--- 690,700 ----
gci8.interpolate(TickCalculation.fromMillis(2000));
assertTrue("v1.get(): " + v1.get(), (60 == v1.get()) || (-60 == v1.get()));
assertEquals(0, v2.get());
// no value in start, duplicate value in mid, single value in end
! final GeneralClipInterpolatorShim gci9 = new GeneralClipInterpolatorShim (new KeyFrame[] {mid2, end1}, new long[] {6000, 12000});
v1.set(0);
v2.set(0);
gci9.validate(true);
gci9.interpolate(TickCalculation.fromMillis(0));
assertEquals(0, v1.get());
*** 710,720 ****
gci9.interpolate(TickCalculation.fromMillis(2000));
assertEquals(60, v1.get());
assertEquals(0, v2.get());
// no value in start, duplicate value in mid, duplicate value in end
! final GeneralClipInterpolator gci10 = new GeneralClipInterpolator (new KeyFrame[] {mid2, end2}, new long[] {6000, 12000});
v1.set(0);
v2.set(0);
gci10.validate(true);
gci10.interpolate(TickCalculation.fromMillis(0));
assertEquals(0, v1.get());
--- 711,721 ----
gci9.interpolate(TickCalculation.fromMillis(2000));
assertEquals(60, v1.get());
assertEquals(0, v2.get());
// no value in start, duplicate value in mid, duplicate value in end
! final GeneralClipInterpolatorShim gci10 = new GeneralClipInterpolatorShim (new KeyFrame[] {mid2, end2}, new long[] {6000, 12000});
v1.set(0);
v2.set(0);
gci10.validate(true);
gci10.interpolate(TickCalculation.fromMillis(0));
assertEquals(0, v1.get());