summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-25 23:40:36 +0100
committerSven Gothel <[email protected]>2012-02-25 23:40:36 +0100
commit397665ff472d83809a028e4f4a5d332294617623 (patch)
tree577eba68c1942181d4a98703896e537fdb606a71 /src/test/com
parentcc16e21c5601c3c9433b1e021addbbc9534a6e5a (diff)
UITestCase: Gracely ignore unsupported tests (ES2) ; Ignore all Shared-Context and more 'known' test cases for ES.
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java12
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextNewtAWTBug523.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT.java7
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java7
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java132
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWTAnalyzeBug455.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWTBug450.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java15
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen02BitmapNEWT.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/UITestCase.java3
18 files changed, 230 insertions, 40 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java
index 6db500ae8..a723e120a 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java
@@ -12,6 +12,7 @@ import javax.media.opengl.GLProfile;
import org.junit.Assert;
import org.junit.Test;
+import com.jogamp.common.os.Platform;
import com.jogamp.graph.curve.Region;
import com.jogamp.graph.curve.opengl.RenderState;
import com.jogamp.graph.geom.opengl.SVertex;
@@ -51,6 +52,11 @@ public class TestRegionRendererNEWT01 extends UITestCase {
@Test
public void testRegionRendererR2T01() throws InterruptedException {
+ if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
+ // FIXME: Disabled for now - since it doesn't seem fit for mobile (performance wise).
+ setTestSupported(false);
+ return;
+ }
GLProfile glp = GLProfile.getGL2ES2();
GLCapabilities caps = new GLCapabilities(glp);
@@ -111,6 +117,12 @@ public class TestRegionRendererNEWT01 extends UITestCase {
@Test
public void testRegionRendererMSAA02() throws InterruptedException {
+ if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
+ // FIXME: Disabled for now - since it doesn't seem fit for mobile (performance wise).
+ // FIXME: Also the GLSL code for VARIABLE_CURVE is not fit for mobile yet!
+ setTestSupported(false);
+ return;
+ }
GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
GLCapabilities caps = new GLCapabilities(glp);
caps.setAlphaBits(4);
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
index 5a5f9debb..f9c88dc30 100755
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
@@ -13,6 +13,7 @@ import javax.media.opengl.GLProfile;
import org.junit.Assert;
import org.junit.Test;
+import com.jogamp.common.os.Platform;
import com.jogamp.graph.curve.Region;
import com.jogamp.graph.curve.opengl.RenderState;
import com.jogamp.graph.curve.opengl.TextRenderer;
@@ -74,6 +75,11 @@ public class TestTextRendererNEWT01 extends UITestCase {
@Test
public void testTextRendererR2T01() throws InterruptedException {
+ if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
+ // FIXME: Disabled for now - since it doesn't seem fit for mobile (performance wise).
+ setTestSupported(false);
+ return;
+ }
GLProfile glp = GLProfile.getGL2ES2();
GLCapabilities caps = new GLCapabilities(glp);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
index b3035ff41..60502bab1 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
@@ -59,8 +59,8 @@ public class TestSharedContextListAWT extends UITestCase {
@BeforeClass
public static void initClass() {
if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
- // Turns out on some platforms (Linux ARM),
- // Mesa3D software impl. freezes when shared context is used.
+ // FIXME: Turns out on some mobile GL drivers and platforms
+ // using shared context is instable, Linux ARM (Omap4, Tegra2, Mesa3d, ..)
setTestSupported(false);
return;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
index 8beb7a0c8..39367d1b0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
@@ -58,8 +58,8 @@ public class TestSharedContextListNEWT extends UITestCase {
@BeforeClass
public static void initClass() {
if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
- // Turns out on some platforms (Linux ARM),
- // Mesa3D software impl. freezes when shared context is used.
+ // FIXME: Turns out on some mobile GL drivers and platforms
+ // using shared context is instable, Linux ARM (Omap4, Tegra2, Mesa3d, ..)
setTestSupported(false);
return;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java
index 89617fc78..7dca314bd 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java
@@ -56,8 +56,8 @@ public class TestSharedContextListNEWT2 extends UITestCase {
@BeforeClass
public static void initClass() {
if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
- // Turns out on some platforms (Linux ARM),
- // Mesa3D software impl. freezes when shared context is used.
+ // FIXME: Turns out on some mobile GL drivers and platforms
+ // using shared context is instable, Linux ARM (Omap4, Tegra2, Mesa3d, ..)
setTestSupported(false);
return;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextNewtAWTBug523.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextNewtAWTBug523.java
index 3e68643a9..bc2eddb9a 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextNewtAWTBug523.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextNewtAWTBug523.java
@@ -119,8 +119,8 @@ public class TestSharedContextNewtAWTBug523 extends UITestCase {
@BeforeClass
public static void initClass() {
if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
- // Turns out on some platforms (Linux ARM),
- // Mesa3D software impl. freezes when shared context is used.
+ // FIXME: Turns out on some mobile GL drivers and platforms
+ // using shared context is instable, Linux ARM (Omap4, Tegra2, Mesa3d, ..)
setTestSupported(false);
return;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java
index ff46347ed..707bd5a9b 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java
@@ -55,6 +55,12 @@ public class TestSharedContextVBOES1NEWT extends UITestCase {
@BeforeClass
public static void initClass() {
+ if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
+ // FIXME: Turns out on some mobile GL drivers and platforms
+ // using shared context is instable, Linux ARM (Omap4, Tegra2, Mesa3d, ..)
+ setTestSupported(false);
+ return;
+ }
if(GLProfile.isAvailable(GLProfile.GL2ES1)) {
glp = GLProfile.get(GLProfile.GL2ES1);
Assert.assertNotNull(glp);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT.java
index 1286560bb..ce2bd77e1 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT.java
@@ -28,6 +28,7 @@
package com.jogamp.opengl.test.junit.jogl.acore;
+import com.jogamp.common.os.Platform;
import com.jogamp.newt.opengl.GLWindow;
import javax.media.nativewindow.util.InsetsImmutable;
@@ -54,6 +55,12 @@ public class TestSharedContextVBOES2NEWT extends UITestCase {
@BeforeClass
public static void initClass() {
+ if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
+ // FIXME: Turns out on some mobile GL drivers and platforms
+ // using shared context is instable, Linux ARM (Omap4, Tegra2, Mesa3d, ..)
+ setTestSupported(false);
+ return;
+ }
if(GLProfile.isAvailable(GLProfile.GL2ES2)) {
glp = GLProfile.get(GLProfile.GL2ES2);
Assert.assertNotNull(glp);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java
index c4752bb30..8911e73ef 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java
@@ -30,6 +30,7 @@ package com.jogamp.opengl.test.junit.jogl.acore;
import java.io.IOException;
+import com.jogamp.common.os.Platform;
import com.jogamp.newt.opengl.GLWindow;
import javax.media.nativewindow.util.InsetsImmutable;
@@ -54,6 +55,12 @@ public class TestSharedContextVBOES2NEWT2 extends UITestCase {
@BeforeClass
public static void initClass() {
+ if(Platform.CPUFamily.X86 != Platform.CPU_ARCH.family) { // FIXME
+ // FIXME: Turns out on some mobile GL drivers and platforms
+ // using shared context is instable, Linux ARM (Omap4, Tegra2, Mesa3d, ..)
+ setTestSupported(false);
+ return;
+ }
if(GLProfile.isAvailable(GLProfile.GL2ES2)) {
glp = GLProfile.get(GLProfile.GL2ES2);
Assert.assertNotNull(glp);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java
new file mode 100644
index 000000000..e2b1e4844
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java
@@ -0,0 +1,132 @@
+/**
+ * Copyright 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+package com.jogamp.opengl.test.junit.jogl.demos.es2.awt;
+
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.Animator;
+import javax.media.opengl.awt.GLCanvas;
+import com.jogamp.newt.event.awt.AWTKeyAdapter;
+import com.jogamp.newt.event.awt.AWTWindowAdapter;
+import com.jogamp.newt.event.TraceKeyAdapter;
+import com.jogamp.newt.event.TraceWindowAdapter;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.QuitAdapter;
+import java.awt.Frame;
+import java.lang.reflect.InvocationTargetException;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestGearsES2AWT extends UITestCase {
+ static GLProfile glp;
+ static int width, height;
+ static boolean firstUIActionOnProcess = false;
+
+ @BeforeClass
+ public static void initClass() {
+ glp = GLProfile.getGL2ES2();
+ Assert.assertNotNull(glp);
+ width = 512;
+ height = 512;
+ }
+
+ @AfterClass
+ public static void releaseClass() {
+ }
+
+ protected void runTestGL(GLCapabilities caps) throws InterruptedException, InvocationTargetException {
+ final Frame frame = new Frame("GearsES2 AWT Test");
+ Assert.assertNotNull(frame);
+
+ final GLCanvas glCanvas = new GLCanvas(caps);
+ Assert.assertNotNull(glCanvas);
+ frame.add(glCanvas);
+ frame.setSize(512, 512);
+
+ glCanvas.addGLEventListener(new GearsES2(1));
+
+ Animator animator = new Animator(glCanvas);
+ QuitAdapter quitAdapter = new QuitAdapter();
+
+ new AWTKeyAdapter(new TraceKeyAdapter(quitAdapter)).addTo(glCanvas);
+ new AWTWindowAdapter(new TraceWindowAdapter(quitAdapter)).addTo(frame);
+
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ frame.setVisible(true);
+ }});
+ animator.setUpdateFPSFrames(60, System.err);
+ animator.start();
+
+ while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+ Thread.sleep(100);
+ }
+
+ Assert.assertNotNull(frame);
+ Assert.assertNotNull(glCanvas);
+ Assert.assertNotNull(animator);
+
+ animator.stop();
+ Assert.assertEquals(false, animator.isAnimating());
+ frame.setVisible(false);
+ Assert.assertEquals(false, frame.isVisible());
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ frame.remove(glCanvas);
+ frame.dispose();
+ }});
+ }
+
+ @Test
+ public void test01() throws InterruptedException, InvocationTargetException {
+ GLCapabilities caps = new GLCapabilities(glp);
+ runTestGL(caps);
+ }
+
+ static long duration = 500; // ms
+
+ public static void main(String args[]) {
+ for(int i=0; i<args.length; i++) {
+ if(args[i].equals("-time")) {
+ i++;
+ try {
+ duration = Integer.parseInt(args[i]);
+ } catch (Exception ex) { ex.printStackTrace(); }
+ } else if(args[i].equals("-firstUIAction")) {
+ firstUIActionOnProcess = true;
+ }
+ }
+ org.junit.runner.JUnitCore.main(TestGearsES2AWT.class.getName());
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
index f03269614..08c073c13 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
@@ -55,10 +55,14 @@ public class TestGearsAWT extends UITestCase {
@BeforeClass
public static void initClass() {
- glp = GLProfile.getDefault();
- Assert.assertNotNull(glp);
- width = 512;
- height = 512;
+ if(GLProfile.isAvailable(GLProfile.GL2)) {
+ glp = GLProfile.get(GLProfile.GL2);
+ Assert.assertNotNull(glp);
+ width = 512;
+ height = 512;
+ } else {
+ setTestSupported(false);
+ }
}
@AfterClass
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWTAnalyzeBug455.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWTAnalyzeBug455.java
index 4b670f0e1..4807e5d25 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWTAnalyzeBug455.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWTAnalyzeBug455.java
@@ -61,10 +61,14 @@ public class TestGearsAWTAnalyzeBug455 extends UITestCase {
@BeforeClass
public static void initClass() {
- glp = GLProfile.getDefault();
- Assert.assertNotNull(glp);
- width = 512;
- height = 512;
+ if(GLProfile.isAvailable(GLProfile.GL2)) {
+ glp = GLProfile.get(GLProfile.GL2);
+ Assert.assertNotNull(glp);
+ width = 512;
+ height = 512;
+ } else {
+ setTestSupported(false);
+ }
}
@AfterClass
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java
index 59d54c3dd..be3ffe3a0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java
@@ -53,10 +53,14 @@ public class TestGearsGLJPanelAWT extends UITestCase {
@BeforeClass
public static void initClass() {
- glp = GLProfile.getDefault();
- Assert.assertNotNull(glp);
- width = 512;
- height = 512;
+ if(GLProfile.isAvailable(GLProfile.GL2)) {
+ glp = GLProfile.get(GLProfile.GL2);
+ Assert.assertNotNull(glp);
+ width = 512;
+ height = 512;
+ } else {
+ setTestSupported(false);
+ }
}
@AfterClass
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWTBug450.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWTBug450.java
index 7a4645b80..c724b2abe 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWTBug450.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWTBug450.java
@@ -68,10 +68,14 @@ public class TestGearsGLJPanelAWTBug450 extends UITestCase {
@BeforeClass
public static void initClass() {
- glp = GLProfile.getDefault();
- Assert.assertNotNull(glp);
- width = 512;
- height = 256;
+ if(GLProfile.isAvailable(GLProfile.GL2)) {
+ glp = GLProfile.get(GLProfile.GL2);
+ Assert.assertNotNull(glp);
+ width = 512;
+ height = 512;
+ } else {
+ setTestSupported(false);
+ }
}
@AfterClass
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
index f410baf9d..4a58233f9 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
@@ -38,11 +38,8 @@ import com.jogamp.opengl.util.Animator;
import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears;
-import javax.media.opengl.FPSCounter;
-import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
-import javax.media.opengl.GLRunnable;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -55,10 +52,14 @@ public class TestGearsNEWT extends UITestCase {
@BeforeClass
public static void initClass() {
- glp = GLProfile.getDefault();
- Assert.assertNotNull(glp);
- width = 512;
- height = 512;
+ if(GLProfile.isAvailable(GLProfile.GL2)) {
+ glp = GLProfile.get(GLProfile.GL2);
+ Assert.assertNotNull(glp);
+ width = 512;
+ height = 512;
+ } else {
+ setTestSupported(false);
+ }
}
@AfterClass
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java
index e05c588a4..9758235a9 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java
@@ -51,10 +51,14 @@ public class TestGearsNewtAWTWrapper extends UITestCase {
@BeforeClass
public static void initClass() {
- glp = GLProfile.getDefault();
- Assert.assertNotNull(glp);
- width = 512;
- height = 512;
+ if(GLProfile.isAvailable(GLProfile.GL2)) {
+ glp = GLProfile.get(GLProfile.GL2);
+ Assert.assertNotNull(glp);
+ width = 512;
+ height = 512;
+ } else {
+ setTestSupported(false);
+ }
}
@AfterClass
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen02BitmapNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen02BitmapNEWT.java
index e2ce78b9b..46e79588b 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen02BitmapNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen02BitmapNEWT.java
@@ -81,8 +81,7 @@ public class TestOffscreen02BitmapNEWT extends UITestCase {
@Test
public void test11OffscreenWindowPixmap() {
- // Offscreen doesn't work on >= GL3 (ATI)
- GLProfile glp = GLProfile.get(GLProfile.GL2);
+ GLProfile glp = GLProfile.getGL2ES1();
Assert.assertNotNull(glp);
GLCapabilities caps = new GLCapabilities(glp);
Assert.assertNotNull(caps);
@@ -124,8 +123,7 @@ public class TestOffscreen02BitmapNEWT extends UITestCase {
@Test
public void test14OffscreenSnapshotWithDemoPixmap() {
- // Offscreen doesn't work on >= GL3 (ATI)
- GLProfile glp = GLProfile.get(GLProfile.GL2);
+ GLProfile glp = GLProfile.getGL2ES1();
Assert.assertNotNull(glp);
GLCapabilities caps = new GLCapabilities(glp);
Assert.assertNotNull(caps);
diff --git a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
index 879c8b161..cc5986f28 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
@@ -31,6 +31,7 @@ package com.jogamp.opengl.test.junit.util;
import com.jogamp.common.os.Platform;
import com.jogamp.common.util.locks.SingletonInstance;
+import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.After;
@@ -98,7 +99,7 @@ public abstract class UITestCase {
System.err.print("++++ UITestCase.setUp: "+getFullTestName(" - "));
if(!testSupported) {
System.err.println(" - "+unsupportedTestMsg);
- throw new UnsupportedOperationException(unsupportedTestMsg);
+ Assume.assumeTrue(testSupported);
}
System.err.println();
}