changeset 10830:4f433399edbd

8196615: Skip 3D unit tests on system without 3D capability Reviewed-by: kcr, mbilla
author rkamath
date Mon, 12 Feb 2018 11:54:06 +0530
parents e86a63664896
children da1e2198d2f5
files tests/system/src/test/java/test/com/sun/prism/impl/PNTMeshVertexBufferLengthTest.java
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/system/src/test/java/test/com/sun/prism/impl/PNTMeshVertexBufferLengthTest.java	Tue Feb 06 20:41:35 2018 +0530
+++ b/tests/system/src/test/java/test/com/sun/prism/impl/PNTMeshVertexBufferLengthTest.java	Mon Feb 12 11:54:06 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import javafx.application.Application;
+import javafx.application.ConditionalFeature;
 import javafx.application.Platform;
 import javafx.scene.Group;
 import javafx.scene.PerspectiveCamera;
@@ -48,6 +49,8 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
+import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import test.util.Util;
@@ -280,6 +283,11 @@
         Platform.exit();
     }
 
+    @Before
+    public void setupEach() {
+        assumeTrue(Platform.isSupported(ConditionalFeature.SCENE3D));
+    }
+
     // ========================== TEST CASES ==========================
     @Test(timeout = 5000)
     public void testMeshWithZeroDiv() throws InterruptedException {