From cda92c2cc066c18ab30b828592e1979ab535441c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 29 Aug 2015 23:10:30 +0200 Subject: Bug 1203: Fix TestGLAutoDrawableFactoryGLProfileDeviceNEWT: Do not assume EGL/Desktop factories are available! --- .../TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/test/com') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java index 5f19e2b44..d940510cb 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java @@ -141,6 +141,10 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase { @Test public void test01ES2OnEGL() throws InterruptedException { final GLDrawableFactory factory = GLDrawableFactory.getEGLFactory(); + if( null == factory ) { + System.err.println("EGL Factory n/a"); + return; + } final GLProfile glp = getProfile(factory.getDefaultDevice(), GLProfile.GLES2); if(null != glp) { Assert.assertTrue("Not a GLES2 profile but "+glp, glp.isGLES2()); @@ -159,6 +163,10 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase { @Test public void test02GLOnEGL() throws InterruptedException { final GLDrawableFactory factory = GLDrawableFactory.getEGLFactory(); + if( null == factory ) { + System.err.println("EGL Factory n/a"); + return; + } final GLProfile glp = getProfile(factory.getDefaultDevice(), GLProfile.GL2GL3); if(null != glp) { Assert.assertTrue("Not a GL2GL3 profile but "+glp, glp.isGL2GL3()); @@ -179,6 +187,10 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase { @Test public void test11ES2OnGL() throws InterruptedException { final GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory(); + if( null == factory ) { + System.err.println("Desktop Factory n/a"); + return; + } final GLProfile glp = getProfile(factory.getDefaultDevice(), GLProfile.GLES2); if(null != glp) { Assert.assertTrue("Not a GLES2 profile but "+glp, glp.isGLES2()); @@ -197,6 +209,10 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase { @Test public void test12GLOnGL() throws InterruptedException { final GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory(); + if( null == factory ) { + System.err.println("Desktop Factory n/a"); + return; + } final GLProfile glp = getProfile(factory.getDefaultDevice(), GLProfile.GL2GL3); if(null != glp) { Assert.assertTrue("Not a GL2GL3 profile but "+glp, glp.isGL2GL3()); -- cgit v1.2.3