diff options
author | Sven Gothel <[email protected]> | 2010-09-28 02:59:28 +0300 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-09-28 02:59:28 +0300 |
commit | 6cc98d9d0ea0a6f7c7973d891711af2d1fa9cb9b (patch) | |
tree | 730fbd17c0cc7986d71ea7d818a71d731f389725 | |
parent | ef02d3a1dc631f69fbb70e2bc3b53b82777f9916 (diff) |
JUnit test: Check of GL3 availability to not let test fail
-rw-r--r-- | src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVeryingsBug407NEWT.java | 15 | ||||
-rw-r--r-- | src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWTRobot.java | 28 |
2 files changed, 42 insertions, 1 deletions
diff --git a/src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVeryingsBug407NEWT.java b/src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVeryingsBug407NEWT.java index 2e092a5b7..2acbd0d95 100644 --- a/src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVeryingsBug407NEWT.java +++ b/src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVeryingsBug407NEWT.java @@ -39,6 +39,11 @@ public class TestTransformFeedbackVeryingsBug407NEWT { @Before public void setUp() { + if(!GLProfile.isGL3Available()) { + System.err.println("GL3 not available"); + System.err.println(GLProfile.glAvailabilityToString()); + return; + } VERTEX_SHADER_TEXT = "#version 150 \n" + " \n" @@ -82,7 +87,9 @@ public class TestTransformFeedbackVeryingsBug407NEWT { @After public void tearDown() { - context.release(); + if(null!=context) { + context.release(); + } } private int getShader(GL3 gl, String text, int type) { @@ -112,6 +119,9 @@ public class TestTransformFeedbackVeryingsBug407NEWT { @Test public void testGlTransformFeedbackVaryings_WhenVarNameOK() { + if(!GLProfile.isGL3Available()) { + return; + } ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream pbaos = new PrintStream(baos); @@ -139,6 +149,9 @@ public class TestTransformFeedbackVeryingsBug407NEWT { @Test public void testGlTransformFeedbackVaryings_WhenVarNameWrong() { + if(!GLProfile.isGL3Available()) { + return; + } ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream pbaos = new PrintStream(baos); diff --git a/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWTRobot.java b/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWTRobot.java index 728d2c1a5..cdba796e8 100644 --- a/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWTRobot.java +++ b/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWTRobot.java @@ -1,3 +1,31 @@ +/** + * 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.test.junit.newt; import org.junit.Assert; |