From feebfdea24f8ac98282751824aa4d3569bb71d93 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 1 Feb 2013 12:41:53 +0100 Subject: Fix Animator resume() wait-condition (drawablesEmpty didn't wait for pausedIssued); Update TestGLWindows02NEWTAnimated (isPaused()) --- .../junit/newt/TestGLWindows02NEWTAnimated.java | 46 +++++++++++++--------- 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java index 6f4ced53c..64c5e9c8d 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java @@ -132,7 +132,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase { animator.remove(window); Assert.assertEquals(false, animator.isAnimating()); - Assert.assertEquals(false, animator.isPaused()); + Assert.assertEquals(true, animator.isPaused()); // zero drawables Assert.assertEquals(true, animator.isStarted()); Assert.assertTrue(animator.stop()); } @@ -142,21 +142,24 @@ public class TestGLWindows02NEWTAnimated extends UITestCase { GLCapabilities caps = new GLCapabilities(glp); Assert.assertNotNull(caps); GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */, true /* vsync */); - Animator animator = new Animator(window); + Animator animator = new Animator(); animator.setUpdateFPSFrames(1, null); Assert.assertTrue(animator.start()); + Assert.assertEquals(false, animator.isAnimating()); // zero drawables + Assert.assertEquals(true, animator.isPaused()); // zero drawables + animator.add(window); while(animator.isAnimating() && animator.getTotalFPSDuration()