modules/graphics/src/test/java/test/com/sun/prism/impl/shape/NativePiscesRasterizerTest.java

Print this page
rev 9250 : 8134762: Refactor Javafx graphics module tests for clear separation of tests
Reviewed-by:

@@ -21,14 +21,15 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
-package com.sun.prism.impl.shape;
+package test.com.sun.prism.impl.shape;
 
 import com.sun.javafx.geom.PathIterator;
 import com.sun.prism.BasicStroke;
+import com.sun.prism.impl.shape.NativePiscesRasterizerShim;
 import org.junit.Test;
 
 public class NativePiscesRasterizerTest {
     static final int JOIN_BEVEL = BasicStroke.JOIN_BEVEL;
     static final int JOIN_MITER = BasicStroke.JOIN_MITER;

@@ -56,46 +57,46 @@
     static final int bounds10[] = { 0, 0, 10, 10 };
     static final byte mask1k[] = new byte[1024];
 
     @Test(expected=java.lang.NullPointerException.class)
     public void FillNullCoords() {
-        NativePiscesRasterizer.produceFillAlphas(null, move_arr, 1, true,
+        NativePiscesRasterizerShim.produceFillAlphas(null, move_arr, 1, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  bounds10, mask1k);
     }
 
     @Test(expected=java.lang.NullPointerException.class)
     public void FillNullCommands() {
-        NativePiscesRasterizer.produceFillAlphas(coords6, null, 1, true,
+        NativePiscesRasterizerShim.produceFillAlphas(coords6, null, 1, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  bounds10, mask1k);
     }
 
     @Test(expected=java.lang.NullPointerException.class)
     public void FillNullBounds() {
-        NativePiscesRasterizer.produceFillAlphas(coords6, move_arr, 1, true,
+        NativePiscesRasterizerShim.produceFillAlphas(coords6, move_arr, 1, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  null, mask1k);
     }
 
     @Test(expected=java.lang.NullPointerException.class)
     public void FillNullMask() {
-        NativePiscesRasterizer.produceFillAlphas(coords6, move_arr, 1, true,
+        NativePiscesRasterizerShim.produceFillAlphas(coords6, move_arr, 1, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  bounds10, null);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void FillShortBounds() {
-        NativePiscesRasterizer.produceFillAlphas(coords6, move_arr, 1, true,
+        NativePiscesRasterizerShim.produceFillAlphas(coords6, move_arr, 1, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  new int[3], mask1k);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void FillShortCommands() {
-        NativePiscesRasterizer.produceFillAlphas(coords6, move_arr, 2, true,
+        NativePiscesRasterizerShim.produceFillAlphas(coords6, move_arr, 2, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  bounds10, mask1k);
     }
 
     @Test

@@ -111,11 +112,11 @@
                 case SEG_CLOSE:
                     continue;
                 default:
                     badcmd_arr[1] = (byte) i;
                     try {
-                        NativePiscesRasterizer.produceFillAlphas(coords6, badcmd_arr, 2, true,
+                        NativePiscesRasterizerShim.produceFillAlphas(coords6, badcmd_arr, 2, true,
                                                                  1, 0, 0, 0, 1, 0,
                                                                  bounds10, mask1k);
                         throw new RuntimeException("allowed bad command: "+i);
                     } catch (InternalError e) {
                     }

@@ -124,79 +125,79 @@
         }
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void FillShortMoveCoords() {
-        NativePiscesRasterizer.produceFillAlphas(coords1, move_arr, 1, true,
+        NativePiscesRasterizerShim.produceFillAlphas(coords1, move_arr, 1, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  bounds10, mask1k);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void FillShortLineCoords() {
-        NativePiscesRasterizer.produceFillAlphas(coords3, moveline_arr, 2, true,
+        NativePiscesRasterizerShim.produceFillAlphas(coords3, moveline_arr, 2, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  bounds10, mask1k);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void FillShortQuadCoords() {
-        NativePiscesRasterizer.produceFillAlphas(coords5, movequad_arr, 2, true,
+        NativePiscesRasterizerShim.produceFillAlphas(coords5, movequad_arr, 2, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  bounds10, mask1k);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void FillShortCubicCoords() {
-        NativePiscesRasterizer.produceFillAlphas(coords7, movecubic_arr, 2, true,
+        NativePiscesRasterizerShim.produceFillAlphas(coords7, movecubic_arr, 2, true,
                                                  1, 0, 0, 0, 1, 0,
                                                  bounds10, mask1k);
     }
 
     @Test(expected=java.lang.NullPointerException.class)
     public void StrokeNullCoords() {
-        NativePiscesRasterizer.produceStrokeAlphas(null, move_arr, 1,
+        NativePiscesRasterizerShim.produceStrokeAlphas(null, move_arr, 1,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    bounds10, mask1k);
     }
 
     @Test(expected=java.lang.NullPointerException.class)
     public void StrokeNullCommands() {
-        NativePiscesRasterizer.produceStrokeAlphas(coords6, null, 1,
+        NativePiscesRasterizerShim.produceStrokeAlphas(coords6, null, 1,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    bounds10, mask1k);
     }
 
     @Test(expected=java.lang.NullPointerException.class)
     public void StrokeNullBounds() {
-        NativePiscesRasterizer.produceStrokeAlphas(coords6, move_arr, 1,
+        NativePiscesRasterizerShim.produceStrokeAlphas(coords6, move_arr, 1,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    null, mask1k);
     }
 
     @Test(expected=java.lang.NullPointerException.class)
     public void StrokeNullMask() {
-        NativePiscesRasterizer.produceStrokeAlphas(coords6, move_arr, 1,
+        NativePiscesRasterizerShim.produceStrokeAlphas(coords6, move_arr, 1,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    bounds10, null);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void StrokeShortBounds() {
-        NativePiscesRasterizer.produceStrokeAlphas(coords6, move_arr, 1,
+        NativePiscesRasterizerShim.produceStrokeAlphas(coords6, move_arr, 1,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    new int[3], mask1k);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void StrokeShortCommands() {
-        NativePiscesRasterizer.produceStrokeAlphas(coords6, move_arr, 2,
+        NativePiscesRasterizerShim.produceStrokeAlphas(coords6, move_arr, 2,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    bounds10, mask1k);
     }
 

@@ -213,11 +214,11 @@
                 case SEG_CLOSE:
                     continue;
                 default:
                     badcmd_arr[1] = (byte) i;
                     try {
-                        NativePiscesRasterizer.produceStrokeAlphas(coords6, badcmd_arr, 2,
+                        NativePiscesRasterizerShim.produceStrokeAlphas(coords6, badcmd_arr, 2,
                                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                                    1, 0, 0, 0, 1, 0,
                                                                    bounds10, mask1k);
                         throw new RuntimeException("allowed bad command: "+i);
                     } catch (InternalError e) {

@@ -227,35 +228,35 @@
         }
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void StrokeShortMoveCoords() {
-        NativePiscesRasterizer.produceStrokeAlphas(coords1, move_arr, 1,
+        NativePiscesRasterizerShim.produceStrokeAlphas(coords1, move_arr, 1,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    bounds10, mask1k);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void StrokeShortLineCoords() {
-        NativePiscesRasterizer.produceStrokeAlphas(coords3, moveline_arr, 2,
+        NativePiscesRasterizerShim.produceStrokeAlphas(coords3, moveline_arr, 2,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    bounds10, mask1k);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void StrokeShortQuadCoords() {
-        NativePiscesRasterizer.produceStrokeAlphas(coords5, movequad_arr, 2,
+        NativePiscesRasterizerShim.produceStrokeAlphas(coords5, movequad_arr, 2,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    bounds10, mask1k);
     }
 
     @Test(expected=java.lang.ArrayIndexOutOfBoundsException.class)
     public void StrokeShortCubicCoords() {
-        NativePiscesRasterizer.produceStrokeAlphas(coords7, movecubic_arr, 2,
+        NativePiscesRasterizerShim.produceStrokeAlphas(coords7, movecubic_arr, 2,
                                                    10, CAP_ROUND, JOIN_ROUND, 10, null, 0,
                                                    1, 0, 0, 0, 1, 0,
                                                    bounds10, mask1k);
     }
 }