diff options
Diffstat (limited to 'src/test/com')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java index e7457b905..506fcc1b7 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java @@ -176,8 +176,6 @@ public class TestScreenMode01NEWT extends UITestCase { // check reset .. - ScreenMode saveOrigMode = (ScreenMode) smOrig.clone(); - Assert.assertEquals(true,display.isNativeValid()); Assert.assertEquals(true,screen.isNativeValid()); Assert.assertEquals(true,window.isNativeValid()); @@ -200,7 +198,7 @@ public class TestScreenMode01NEWT extends UITestCase { System.err.println("[1] current/orig: "+smCurrent); Assert.assertNotNull(smCurrent); - Assert.assertEquals(saveOrigMode, smOrig); + Assert.assertEquals(smCurrent, smOrig); screen.destroy(); @@ -210,7 +208,7 @@ public class TestScreenMode01NEWT extends UITestCase { Thread.sleep(waitTimeShort); } - @Test + // @Test public void testScreenModeChangeWithFS01Pre() throws InterruptedException { Thread.sleep(waitTimeShort); testScreenModeChangeWithFS01Impl(true) ; @@ -251,6 +249,7 @@ public class TestScreenMode01NEWT extends UITestCase { if(preFS) { System.err.println("[0] set FS pre 0: "+window.isFullscreen()); window.setFullscreen(true); + System.err.println("[0] set FS pre 1: "+window.isFullscreen()); Assert.assertEquals(true, window.isFullscreen()); System.err.println("[0] set FS pre X: "+window.isFullscreen()); } @@ -269,18 +268,29 @@ public class TestScreenMode01NEWT extends UITestCase { // check reset .. - ScreenMode saveOrigMode = (ScreenMode) smOrig.clone(); + Assert.assertEquals(true,display.isNativeValid()); + Assert.assertEquals(true,screen.isNativeValid()); + Assert.assertEquals(true,window.isNativeValid()); + Assert.assertEquals(true,window.isVisible()); animator.stop(); destroyWindow(window); + Assert.assertEquals(false,window.isVisible()); + Assert.assertEquals(false,window.isNativeValid()); + Assert.assertEquals(false,screen.isNativeValid()); + Assert.assertEquals(false,display.isNativeValid()); + screen.createNative(); // trigger native re-creation + Assert.assertEquals(true,display.isNativeValid()); + Assert.assertEquals(true,screen.isNativeValid()); + ScreenMode smCurrent = screen.getCurrentScreenMode(); System.err.println("[1] current/orig: "+smCurrent); Assert.assertNotNull(smCurrent); - Assert.assertEquals(saveOrigMode, smOrig); + Assert.assertEquals(smCurrent, smOrig); screen.destroy(); } |