From 68f5a97ef165a39769040e36114c572c7d0f1abd Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 6 Sep 2011 06:57:49 +0200 Subject: NEWT/ScreenMode: Remove Cloneable on Immutable .. makes no sense --- .../test/junit/newt/TestScreenMode01NEWT.java | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/test') 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(); } -- cgit v1.2.3