summaryrefslogtreecommitdiffstats
path: root/src/junit/com
diff options
context:
space:
mode:
authorSteve Vaughan <[email protected]>2010-11-17 01:11:09 -0500
committerSteve Vaughan <[email protected]>2010-11-17 01:11:09 -0500
commite491306690f5c1e281bb4f673481dc890fef5217 (patch)
tree79204e5f039f02cc433736715d15d998ef7dcb91 /src/junit/com
parent483d47795fd1b4bd4cf892960ced8e961f7a8a3c (diff)
Implement CapabilitiesImmutable to indicate that getRequestedCapabilities() and getChosenCapabilities() return immutable instances. Add cloneCapabilities() to create a mutable clone of an immutable set of capabilities.
Diffstat (limited to 'src/junit/com')
-rw-r--r--src/junit/com/jogamp/test/junit/newt/TestRemoteWindow01NEWT.java12
-rw-r--r--src/junit/com/jogamp/test/junit/newt/TestWindows01NEWT.java12
-rw-r--r--src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02NEWT.java2
3 files changed, 13 insertions, 13 deletions
diff --git a/src/junit/com/jogamp/test/junit/newt/TestRemoteWindow01NEWT.java b/src/junit/com/jogamp/test/junit/newt/TestRemoteWindow01NEWT.java
index 2a43c3ac5..b384145b6 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestRemoteWindow01NEWT.java
+++ b/src/junit/com/jogamp/test/junit/newt/TestRemoteWindow01NEWT.java
@@ -83,12 +83,12 @@ public class TestRemoteWindow01NEWT extends UITestCase {
// Create native OpenGL resources .. XGL/WGL/CGL ..
// equivalent to GLAutoDrawable methods: setVisible(true)
//
- caps = window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
- Assert.assertNotNull(caps);
- Assert.assertTrue(caps.getGreenBits()>5);
- Assert.assertTrue(caps.getBlueBits()>5);
- Assert.assertTrue(caps.getRedBits()>5);
- Assert.assertEquals(caps.isOnscreen(),onscreen);
+ CapabilitiesImmutable chosenCapabilities = window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ Assert.assertNotNull(chosenCapabilities);
+ Assert.assertTrue(chosenCapabilities.getGreenBits()>5);
+ Assert.assertTrue(chosenCapabilities.getBlueBits()>5);
+ Assert.assertTrue(chosenCapabilities.getRedBits()>5);
+ Assert.assertEquals(chosenCapabilities.isOnscreen(),onscreen);
return window;
}
diff --git a/src/junit/com/jogamp/test/junit/newt/TestWindows01NEWT.java b/src/junit/com/jogamp/test/junit/newt/TestWindows01NEWT.java
index 706ad5192..033542bea 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestWindows01NEWT.java
+++ b/src/junit/com/jogamp/test/junit/newt/TestWindows01NEWT.java
@@ -82,12 +82,12 @@ public class TestWindows01NEWT extends UITestCase {
// Create native OpenGL resources .. XGL/WGL/CGL ..
// equivalent to GLAutoDrawable methods: setVisible(true)
//
- caps = window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
- Assert.assertNotNull(caps);
- Assert.assertTrue(caps.getGreenBits()>5);
- Assert.assertTrue(caps.getBlueBits()>5);
- Assert.assertTrue(caps.getRedBits()>5);
- Assert.assertEquals(caps.isOnscreen(),onscreen);
+ CapabilitiesImmutable chosenCapabilities = window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ Assert.assertNotNull(chosenCapabilities);
+ Assert.assertTrue(chosenCapabilities.getGreenBits()>5);
+ Assert.assertTrue(chosenCapabilities.getBlueBits()>5);
+ Assert.assertTrue(chosenCapabilities.getRedBits()>5);
+ Assert.assertEquals(chosenCapabilities.isOnscreen(),onscreen);
return window;
}
diff --git a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02NEWT.java b/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02NEWT.java
index 3d9efcf82..23e3e1c44 100644
--- a/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02NEWT.java
+++ b/src/junit/com/jogamp/test/junit/newt/parenting/TestParenting02NEWT.java
@@ -127,7 +127,7 @@ public class TestParenting02NEWT extends UITestCase {
// glWindow1.addGLEventListener(demo1);
glWindow1.setVisible(true);
- Capabilities capsChosen = glWindow1.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ CapabilitiesImmutable capsChosen = glWindow1.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
Assert.assertNotNull(capsChosen);
Assert.assertTrue(capsChosen.isOnscreen()==true);