summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/junit/com/jogamp/test')
-rw-r--r--src/junit/com/jogamp/test/junit/jogl/acore/TestGLProfile01NEWT.java32
-rw-r--r--src/junit/com/jogamp/test/junit/jogl/awt/TestAWT01GLn.java3
2 files changed, 10 insertions, 25 deletions
diff --git a/src/junit/com/jogamp/test/junit/jogl/acore/TestGLProfile01NEWT.java b/src/junit/com/jogamp/test/junit/jogl/acore/TestGLProfile01NEWT.java
index 742c0174c..a1ca698ba 100644
--- a/src/junit/com/jogamp/test/junit/jogl/acore/TestGLProfile01NEWT.java
+++ b/src/junit/com/jogamp/test/junit/jogl/acore/TestGLProfile01NEWT.java
@@ -35,13 +35,9 @@ import com.jogamp.test.junit.util.UITestCase;
import com.jogamp.test.junit.util.DumpGLInfo;
import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.AfterClass;
import org.junit.Test;
import javax.media.opengl.*;
-import com.jogamp.newt.*;
import com.jogamp.newt.opengl.*;
import com.jogamp.newt.*;
@@ -49,21 +45,9 @@ import com.jogamp.opengl.JoglVersion;
import java.io.IOException;
public class TestGLProfile01NEWT extends UITestCase {
- static GLProfile glp;
-
- @BeforeClass
- public static void initClass() {
- GLProfile.initSingleton(true);
- glp = GLProfile.getDefault();
- Assert.assertNotNull(glp);
- }
-
- @AfterClass
- public static void releaseClass() {
- }
@Test
- public void test00Version() {
+ public void test00Version() throws InterruptedException {
System.err.println(VersionUtil.getPlatformInfo());
System.err.println(GlueGenVersion.getInstance());
System.err.println(NativeWindowVersion.getInstance());
@@ -72,14 +56,14 @@ public class TestGLProfile01NEWT extends UITestCase {
}
@Test
- public void test01GLProfileDefault() {
+ public void test01GLProfileDefault() throws InterruptedException {
System.out.println("GLProfile "+GLProfile.glAvailabilityToString());
GLProfile glp = GLProfile.getDefault();
dumpVersion(glp);
}
@Test
- public void test02GLProfileMaxFixedFunc() {
+ public void test02GLProfileMaxFixedFunc() throws InterruptedException {
// Assuming at least one fixed profile is available
GLProfile glp = GLProfile.getMaxFixedFunc();
System.out.println("GLProfile getMaxFixedFunc(): "+glp);
@@ -105,7 +89,7 @@ public class TestGLProfile01NEWT extends UITestCase {
}
@Test
- public void test03GLProfileMaxProgrammable() {
+ public void test03GLProfileMaxProgrammable() throws InterruptedException {
// Assuming at least one programmable profile is available
GLProfile glp = GLProfile.getMaxProgrammable();
System.out.println("GLProfile getMaxProgrammable(): "+glp);
@@ -131,7 +115,7 @@ public class TestGLProfile01NEWT extends UITestCase {
}
@Test
- public void test04GLProfileGL2ES1() {
+ public void test04GLProfileGL2ES1() throws InterruptedException {
if(!GLProfile.isGL2ES1Available()) {
System.out.println("GLProfile GL2ES1 n/a");
return;
@@ -142,7 +126,7 @@ public class TestGLProfile01NEWT extends UITestCase {
}
@Test
- public void test05GLProfileGL2ES2() {
+ public void test05GLProfileGL2ES2() throws InterruptedException {
if(!GLProfile.isGL2ES2Available()) {
System.out.println("GLProfile GL2ES2 n/a");
return;
@@ -152,7 +136,7 @@ public class TestGLProfile01NEWT extends UITestCase {
dumpVersion(glp);
}
- protected void dumpVersion(GLProfile glp) {
+ protected void dumpVersion(GLProfile glp) throws InterruptedException {
GLCapabilities caps = new GLCapabilities(glp);
GLWindow glWindow = GLWindow.create(caps);
Assert.assertNotNull(glWindow);
@@ -162,7 +146,9 @@ public class TestGLProfile01NEWT extends UITestCase {
glWindow.setSize(128, 128);
glWindow.setVisible(true);
+
glWindow.display();
+ Thread.sleep(100);
glWindow.invalidate();
}
diff --git a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT01GLn.java b/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT01GLn.java
index 0fef76c7d..a1c87da79 100644
--- a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT01GLn.java
+++ b/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT01GLn.java
@@ -84,6 +84,7 @@ public class TestAWT01GLn extends UITestCase {
protected void runTestGL(GLCapabilities caps) throws InterruptedException {
glCanvas = new GLCanvas(caps);
Assert.assertNotNull(glCanvas);
+ glCanvas.addGLEventListener(new Gears());
frame.add(glCanvas);
// Revalidate size/layout.
@@ -92,8 +93,6 @@ public class TestAWT01GLn extends UITestCase {
frame.setSize(512, 512);
frame.validate();
- glCanvas.addGLEventListener(new Gears());
-
try {
javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
public void run() {