[libgdx] Fixed tests.

AnimationStateTests failure was caused by a321aa76d556a618a09abb3adeb7473a6c099304, when `computeHold` was added, specifically `|| timeline instanceof EventTimeline`. The slight event order difference is unlikely to be an issue for anyone.
This commit is contained in:
NathanSweet 2019-10-14 13:59:39 +02:00
parent bbbb1495b2
commit eb1c382a3b
4 changed files with 307 additions and 385 deletions

View File

@ -37,6 +37,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglFileHandle;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Pool;
import com.esotericsoftware.spine.AnimationState.AnimationStateListener;
import com.esotericsoftware.spine.AnimationState.TrackEntry;
import com.esotericsoftware.spine.attachments.AttachmentLoader;
@ -651,14 +652,15 @@ public class AnimationStateTests {
expect(0, "start", 0, 0.4f), //
expect(0, "event 0", 0.1f, 0.5f), //
expect(1, "end", 0.8f, 0.9f), //
expect(1, "dispose", 0.8f, 0.9f), //
expect(0, "event 14", 0.5f, 0.9f), //
expect(2, "end", 0.8f, 1.1f), //
expect(2, "dispose", 0.8f, 1.1f), //
expect(1, "end", 0.8f, 1.1f), //
expect(1, "dispose", 0.8f, 1.1f), //
expect(0, "event 30", 1, 1.4f), //
expect(0, "complete", 1, 1.4f), //
expect(0, "end", 1, 1.5f), //

View File

@ -42,7 +42,7 @@ public class EventTimelineTests {
private final SkeletonData skeletonData;
private final Skeleton skeleton;
private final Array<Event> firedEvents = new Array();
private EventTimeline timeline = new EventTimeline(0);
private EventTimeline timeline = new EventTimeline(1);
private char[] events;
private float[] frames;