From 4c3e9e258fae1161949dd14828c09f387bfd53d9 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 22 Nov 2010 12:46:19 +0100 Subject: GLAnimatorControl pause()/resume() don't fail fast, return a boolean instead to simplify usage. --- .../com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java | 4 ++-- .../com/jogamp/test/junit/newt/parenting/TestParenting01NEWT.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/junit/com') diff --git a/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java b/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java index a019de72d..34e4f6430 100644 --- a/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java +++ b/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java @@ -258,12 +258,12 @@ public class TestGLWindows02NEWTAnimated extends UITestCase { Assert.assertEquals(true, animator.isAnimating()); Assert.assertEquals(false, animator.isPaused()); - animator.pause(); + Assert.assertEquals(true, animator.pause()); Assert.assertEquals(true, animator.isStarted()); Assert.assertEquals(false, animator.isAnimating()); Assert.assertEquals(true, animator.isPaused()); - animator.resume(); + Assert.assertEquals(true, animator.resume()); Assert.assertEquals(true, animator.isStarted()); Assert.assertEquals(true, animator.isAnimating()); Assert.assertEquals(false, animator.isPaused()); diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01NEWT.java b/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01NEWT.java index 97589ed3a..21c0a479c 100644 --- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01NEWT.java +++ b/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting01NEWT.java @@ -171,22 +171,22 @@ public class TestParenting01NEWT extends UITestCase { Assert.assertTrue(0 < glWindow1.getTotalFrames()); Assert.assertTrue(0 < glWindow2.getTotalFrames()); - animator1.pause(); + Assert.assertEquals(true, animator1.pause()); Assert.assertEquals(false, animator1.isAnimating()); Assert.assertEquals(true, animator1.isPaused()); Assert.assertNotNull(animator1.getThread()); - animator2.pause(); + Assert.assertEquals(true, animator2.pause()); Assert.assertEquals(false, animator2.isAnimating()); Assert.assertEquals(true, animator2.isPaused()); Assert.assertNotNull(animator2.getThread()); glWindow1.resetCounter(); glWindow2.resetCounter(); - animator1.resume(); + Assert.assertEquals(true, animator1.resume()); Assert.assertEquals(true, animator1.isAnimating()); Assert.assertEquals(false, animator1.isPaused()); Assert.assertNotNull(animator1.getThread()); - animator2.resume(); + Assert.assertEquals(true, animator2.resume()); Assert.assertEquals(true, animator2.isAnimating()); Assert.assertEquals(false, animator2.isPaused()); Assert.assertNotNull(animator2.getThread()); -- cgit v1.2.3