< prev index next >

tests/system/src/test/java/test/robot/test3d/MeshCompareTest.java

Print this page
rev 9491 : 8145203: Refactor systemTests for clear separation of tests
Reviewed-by: kcr


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package test3d;
  27 
  28 import com.sun.javafx.geom.Vec3f;
  29 import java.util.ArrayList;
  30 import java.util.Collection;
  31 import java.util.concurrent.atomic.AtomicBoolean;
  32 import javafx.application.ConditionalFeature;
  33 import javafx.application.Platform;
  34 import javafx.scene.AmbientLight;
  35 import javafx.scene.Group;
  36 import javafx.scene.PerspectiveCamera;
  37 import javafx.scene.PointLight;
  38 import javafx.scene.Scene;
  39 import javafx.scene.image.WritableImage;
  40 import javafx.scene.paint.Color;
  41 import javafx.scene.paint.PhongMaterial;
  42 import javafx.scene.shape.Box;
  43 import javafx.scene.shape.MeshView;
  44 import javafx.scene.shape.Shape3D;
  45 import javafx.scene.shape.Sphere;
  46 import javafx.scene.shape.TriangleMesh;
  47 import javafx.scene.shape.VertexFormat;
  48 import javafx.stage.Stage;
  49 import org.junit.Test;
  50 import org.junit.runner.RunWith;
  51 import org.junit.runners.Parameterized;
  52 import testharness.VisualTestBase;
  53 
  54 /**
  55  * 3D Snapshot validation tests.
  56  */
  57 @RunWith(Parameterized.class)
  58 public class MeshCompareTest extends VisualTestBase {
  59 
  60     private static Collection params = null;
  61 
  62     private static final Object[] pNumLights = { 0, 1, 2, 3 };
  63 
  64     @Parameterized.Parameters
  65     public static Collection getParams() {
  66         if (params == null) {
  67             params = new ArrayList();
  68             for (Object o1 : pNumLights) {
  69                 params.add(new Object[]{o1});
  70             }
  71         }
  72         return params;




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package test.robot.test3d;
  27 
  28 import com.sun.javafx.geom.Vec3f;
  29 import java.util.ArrayList;
  30 import java.util.Collection;
  31 import java.util.concurrent.atomic.AtomicBoolean;
  32 import javafx.application.ConditionalFeature;
  33 import javafx.application.Platform;
  34 import javafx.scene.AmbientLight;
  35 import javafx.scene.Group;
  36 import javafx.scene.PerspectiveCamera;
  37 import javafx.scene.PointLight;
  38 import javafx.scene.Scene;
  39 import javafx.scene.image.WritableImage;
  40 import javafx.scene.paint.Color;
  41 import javafx.scene.paint.PhongMaterial;
  42 import javafx.scene.shape.Box;
  43 import javafx.scene.shape.MeshView;
  44 import javafx.scene.shape.Shape3D;
  45 import javafx.scene.shape.Sphere;
  46 import javafx.scene.shape.TriangleMesh;
  47 import javafx.scene.shape.VertexFormat;
  48 import javafx.stage.Stage;
  49 import org.junit.Test;
  50 import org.junit.runner.RunWith;
  51 import org.junit.runners.Parameterized;
  52 import test.robot.testharness.VisualTestBase;
  53 
  54 /**
  55  * 3D Snapshot validation tests.
  56  */
  57 @RunWith(Parameterized.class)
  58 public class MeshCompareTest extends VisualTestBase {
  59 
  60     private static Collection params = null;
  61 
  62     private static final Object[] pNumLights = { 0, 1, 2, 3 };
  63 
  64     @Parameterized.Parameters
  65     public static Collection getParams() {
  66         if (params == null) {
  67             params = new ArrayList();
  68             for (Object o1 : pNumLights) {
  69                 params.add(new Object[]{o1});
  70             }
  71         }
  72         return params;


< prev index next >