summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-09-26 04:19:11 +0200
committerSven Gothel <[email protected]>2010-09-26 04:19:11 +0200
commit609e30836d4fcc5d2da945bf1c7d1d9a9c349b2a (patch)
tree70216c951469fb5389596f3e994f4348d399cbeb /src/junit/com/jogamp/test
parent0d073c5ea4426b0139409b20a3879b6003f795b0 (diff)
NEWT: Add Window.hasFocus() ; Test cleanup ..
- Window add focus tracking and query via hasFocus() - TestTransformFeedbackVeryingsBug407NEWT allow fail if no GL3 is available - TestFocus01SwingAWT check on NEWTChild focus
Diffstat (limited to 'src/junit/com/jogamp/test')
-rw-r--r--src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVeryingsBug407NEWT.java9
-rw-r--r--src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java4
2 files changed, 10 insertions, 3 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 361d16613..2e092a5b7 100644
--- a/src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVeryingsBug407NEWT.java
+++ b/src/junit/com/jogamp/test/junit/jogl/glsl/TestTransformFeedbackVeryingsBug407NEWT.java
@@ -12,6 +12,7 @@ import javax.media.opengl.GLProfile;
import org.junit.After;
import org.junit.Assert;
+import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
@@ -51,7 +52,13 @@ public class TestTransformFeedbackVeryingsBug407NEWT {
Window window;
GLDrawable drawable;
- GLProfile glp = GLProfile.get(GLProfile.GL3);
+ GLProfile glp = null;
+ try {
+ glp = GLProfile.get(GLProfile.GL3);
+ } catch (Throwable t) {
+ t.printStackTrace();
+ Assume.assumeNoException(t);
+ }
caps = new GLCapabilities(glp);
caps.setOnscreen(true);
diff --git a/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java b/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java
index 42a58e2b1..1dac6edad 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java
+++ b/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java
@@ -2,6 +2,7 @@ package com.jogamp.test.junit.newt;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.awt.AWTException;
import java.awt.BorderLayout;
@@ -94,8 +95,7 @@ public class TestFocus01SwingAWT {
// Verify focus status.
assertFalse("AWT parent canvas has focus", newtCanvasAWT.hasFocus());
- // TODO No test for NEWT hasFocus.
- // assertTrue(newtCanvasAWT.getNEWTChild().hasFocus());
+ assertTrue(newtCanvasAWT.getNEWTChild().hasFocus());
// Type two keys, which should be directed to the focused window.
Robot robot = new Robot();