diff options
author | Sven Gothel <[email protected]> | 2010-05-17 03:35:38 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-05-17 03:35:38 +0200 |
commit | e96eb241cf2e1fb54d924c0b8906ea4aedc211db (patch) | |
tree | 3d8221b2c64cfcf14f2d41e9e1392045bf9db6ff | |
parent | 729777127730306ed5092c2dd953f67f48a6e152 (diff) |
Cover all Offscreen tests with Assume ..
-rwxr-xr-x | src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java index 4a1e65a8d..bae727019 100755 --- a/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java +++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java @@ -92,7 +92,13 @@ public class TestOffscreen01NEWT { window.setSize(width, height); GLWindow glWindow = GLWindow.create(window); Assert.assertNotNull(glWindow); - glWindow.setVisible(true); + try { + glWindow.setVisible(true); + } catch (Throwable t) { + // stop test and ignore if pixmap cannot be used + t.printStackTrace(); + Assume.assumeNoException(t); + } GLEventListener demo = new RedSquare(); WindowUtilNEWT.setDemoFields(demo, window, glWindow, false); glWindow.addGLEventListener(demo); @@ -191,7 +197,13 @@ public class TestOffscreen01NEWT { windows[i].setSize(width, height); glWindows[i] = GLWindow.create(windows[i]); Assert.assertNotNull(glWindows[i]); - glWindows[i].setVisible(true); + try { + glWindows[i].setVisible(true); + } catch (Throwable t) { + // stop test and ignore if pixmap cannot be used + t.printStackTrace(); + Assume.assumeNoException(t); + } demos[i] = new RedSquare(); WindowUtilNEWT.setDemoFields(demos[i], windows[i], glWindows[i], false); glWindows[i].addGLEventListener(demos[i]); @@ -250,7 +262,13 @@ public class TestOffscreen01NEWT { windows[i].setSize(width, height); glWindows[i] = GLWindow.create(windows[i]); Assert.assertNotNull(glWindows[i]); - glWindows[i].setVisible(true); + try { + glWindows[i].setVisible(true); + } catch (Throwable t) { + // stop test and ignore if pixmap cannot be used + t.printStackTrace(); + Assume.assumeNoException(t); + } demos[i] = new RedSquare(); WindowUtilNEWT.setDemoFields(demos[i], windows[i], glWindows[i], false); glWindows[i].addGLEventListener(demos[i]); @@ -303,7 +321,13 @@ public class TestOffscreen01NEWT { window.setSize(width, height); GLWindow glWindow = GLWindow.create(window); Assert.assertNotNull(glWindow); - glWindow.setVisible(true); + try { + glWindow.setVisible(true); + } catch (Throwable t) { + // stop test and ignore if pixmap cannot be used + t.printStackTrace(); + Assume.assumeNoException(t); + } GLWindow windowOnScreen = null; WindowListener wl=null; @@ -357,7 +381,13 @@ public class TestOffscreen01NEWT { window.setSize(width, height); GLWindow glWindow = GLWindow.create(window); Assert.assertNotNull(glWindow); - glWindow.setVisible(true); + try { + glWindow.setVisible(true); + } catch (Throwable t) { + // stop test and ignore if pixmap cannot be used + t.printStackTrace(); + Assume.assumeNoException(t); + } GLEventListener demo = new RedSquare(); WindowUtilNEWT.setDemoFields(demo, window, glWindow, false); glWindow.addGLEventListener(demo); @@ -406,7 +436,13 @@ public class TestOffscreen01NEWT { window.setSize(width, height); GLWindow glWindow = GLWindow.create(window); Assert.assertNotNull(glWindow); - glWindow.setVisible(true); + try { + glWindow.setVisible(true); + } catch (Throwable t) { + // stop test and ignore if pixmap cannot be used + t.printStackTrace(); + Assume.assumeNoException(t); + } GLWindow windowOnScreen = null; WindowListener wl=null; |