aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java33
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00bNEWT.java39
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01bNEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java2
5 files changed, 35 insertions, 45 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
index cfb8c7715..985affa92 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
@@ -103,26 +103,21 @@ public class TestScreenMode00NEWT extends UITestCase {
Screen screen = window.getScreen();
List<ScreenMode> screenModes = screen.getScreenModes();
- if(null != screenModes) {
- Assert.assertTrue(screenModes.size()>0);
- int i=0;
- for(Iterator<ScreenMode> iter=screenModes.iterator(); iter.hasNext(); i++) {
- System.err.println(i+": "+iter.next());
- }
- ScreenMode sm_o = screen.getOriginalScreenMode();
- Assert.assertNotNull(sm_o);
- ScreenMode sm_c = screen.getCurrentScreenMode();
- Assert.assertNotNull(sm_c);
- System.err.println("orig SM: "+sm_o);
- System.err.println("curr SM: "+sm_c);
- System.err.println("curr sz: "+screen.getWidth()+"x"+screen.getHeight());
- Assert.assertEquals(sm_o, sm_c);
- Assert.assertEquals(sm_c.getRotatedWidth(), screen.getWidth());
- Assert.assertEquals(sm_c.getRotatedHeight(), screen.getHeight());
- } else {
- // no support ..
- System.err.println("Your platform has no ScreenMode change support, sorry");
+ Assert.assertTrue(screenModes.size()>0);
+ int i=0;
+ for(Iterator<ScreenMode> iter=screenModes.iterator(); iter.hasNext(); i++) {
+ System.err.println(i+": "+iter.next());
}
+ ScreenMode sm_o = screen.getOriginalScreenMode();
+ Assert.assertNotNull(sm_o);
+ ScreenMode sm_c = screen.getCurrentScreenMode();
+ Assert.assertNotNull(sm_c);
+ System.err.println("orig SM: "+sm_o);
+ System.err.println("curr SM: "+sm_c);
+ System.err.println("curr sz: "+screen.getWidth()+"x"+screen.getHeight());
+ Assert.assertEquals(sm_o, sm_c);
+ Assert.assertEquals(sm_c.getRotatedWidth(), screen.getWidth());
+ Assert.assertEquals(sm_c.getRotatedHeight(), screen.getHeight());
window.destroy();
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00bNEWT.java
index 15b3740a2..41bdfdfd7 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00bNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00bNEWT.java
@@ -82,30 +82,25 @@ public class TestScreenMode00bNEWT extends UITestCase {
Assert.assertEquals(true,display.isNativeValid());
List<ScreenMode> screenModes = screen.getScreenModes();
- if(null != screenModes) {
- Assert.assertTrue(screenModes.size()>0);
- int i=0;
- for(Iterator<ScreenMode> iter=screenModes.iterator(); iter.hasNext(); i++) {
- System.err.println(i+": "+iter.next());
- }
- ScreenMode sm_o = screen.getOriginalScreenMode();
-
- Assert.assertNotNull(sm_o);
- ScreenMode sm_c = screen.getCurrentScreenMode();
+ Assert.assertTrue(screenModes.size()>0);
+ int i=0;
+ for(Iterator<ScreenMode> iter=screenModes.iterator(); iter.hasNext(); i++) {
+ System.err.println(i+": "+iter.next());
+ }
+ ScreenMode sm_o = screen.getOriginalScreenMode();
+
+ Assert.assertNotNull(sm_o);
+ ScreenMode sm_c = screen.getCurrentScreenMode();
+ Assert.assertNotNull(sm_c);
+ System.err.println("orig: "+sm_o);
+ System.err.println("curr: "+sm_c);
+
+ for(i=0; i<100; i++) {
+ sm_c = screen.getCurrentScreenMode();
Assert.assertNotNull(sm_c);
- System.err.println("orig: "+sm_o);
- System.err.println("curr: "+sm_c);
-
- for(i=0; i<100; i++) {
- sm_c = screen.getCurrentScreenMode();
- Assert.assertNotNull(sm_c);
- System.err.print(".");
- }
- System.err.println("!");
- } else {
- // no support ..
- System.err.println("Your platform has no ScreenMode change support, sorry");
+ System.err.print(".");
}
+ System.err.println("!");
// screen.removeReference();
anim.stop();
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 c53c9a1de..5f14fc466 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
@@ -184,7 +184,7 @@ public class TestScreenMode01NEWT extends UITestCase {
Assert.assertNotNull(window);
List<ScreenMode> screenModes = screen.getScreenModes();
- if(null==screenModes) {
+ if(screenModes.size()==1) {
// no support ..
System.err.println("Your platform has no ScreenMode change support, sorry");
destroyWindow(window);
@@ -293,7 +293,7 @@ public class TestScreenMode01NEWT extends UITestCase {
Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight());
List<ScreenMode> screenModes = screen.getScreenModes();
- if(null==screenModes) {
+ if(screenModes.size()==1) {
// no support ..
destroyWindow(window);
return;
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01bNEWT.java
index 6c505d58a..4d7769669 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01bNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01bNEWT.java
@@ -110,7 +110,7 @@ public class TestScreenMode01bNEWT extends UITestCase {
Assert.assertNotNull(window0);
List<ScreenMode> screenModes = screen.getScreenModes();
- if(null==screenModes) {
+ if(screenModes.size()==1) {
// no support ..
System.err.println("Your platform has no ScreenMode change support, sorry");
destroyWindow(window0);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java
index c5c11682c..8c7f75e2b 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java
@@ -104,7 +104,7 @@ public class TestScreenMode02NEWT extends UITestCase {
Assert.assertNotNull(window);
List<ScreenMode> screenModes = screen.getScreenModes();
- if(null==screenModes) {
+ if(screenModes.size()==1) {
// no support ..
System.err.println("Your platform has no ScreenMode change support, sorry");
destroyWindow(window);