Browse Source

[libgdx] Fixed AnimationState tests.

Commit a321aa76d556a618a09abb3adeb7473a6c099304 added "|| timeline instanceof EventTimeline" to `computeHold`, so event timelines always use FIRST, never HOLD. This changed the timing slightly and broke the test, but the new timing is better.
Nathan Sweet 5 years ago
parent
commit
24ff3258ec

+ 5 - 3
spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/AnimationStateTests.java

@@ -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), //