< prev index next >

jdk/test/valhalla/mvt/point/TestPoint.java

Print this page




   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 import jdk.experimental.bytecode.MacroCodeBuilder.CondKind;
  27 import jdk.experimental.bytecode.TypeTag;
  28 import jdk.experimental.value.MethodHandleBuilder;
  29 import jdk.experimental.value.ValueType;
  30 
  31 import java.lang.invoke.MethodHandle;
  32 import java.lang.invoke.MethodHandles;
  33 import java.lang.invoke.MethodType;
  34 import java.util.Random;
  35 import java.util.stream.Stream;
  36 
  37 import org.testng.annotations.*;
  38 import static org.testng.Assert.assertEquals;
  39 import static org.testng.Assert.assertTrue;
  40 
  41 /*
  42  * @test



  43  * @run testng/othervm -XX:+EnableMVT TestPoint
  44  */
  45 
  46 @Test
  47 public class TestPoint {
  48 
  49     @DataProvider(name = "createPoints")
  50     public Object[][] createPoints() {
  51         Object[][] data = new Object[10 * 10][];
  52         int n = 0;
  53         for (int i = 0 ; i < 10 ; i++) {
  54             for (int j = 0 ; j < 10 ; j++) {
  55                 data[n++] = new Object[] { new Point(i, j) };
  56             }
  57         }
  58         return data;
  59     }
  60 
  61     @DataProvider(name = "createPointArrays")
  62     public Object[][] createPointArrays() throws Throwable {




   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 import jdk.experimental.bytecode.MacroCodeBuilder.CondKind;
  27 import jdk.experimental.bytecode.TypeTag;
  28 import jdk.experimental.value.MethodHandleBuilder;
  29 import jdk.incubator.mvt.ValueType;
  30 
  31 import java.lang.invoke.MethodHandle;
  32 import java.lang.invoke.MethodHandles;
  33 import java.lang.invoke.MethodType;
  34 import java.util.Random;
  35 import java.util.stream.Stream;
  36 
  37 import org.testng.annotations.*;
  38 import static org.testng.Assert.assertEquals;
  39 import static org.testng.Assert.assertTrue;
  40 
  41 /*
  42  * @test
  43  * @modules java.base/jdk.experimental.bytecode
  44  *          java.base/jdk.experimental.value
  45  *          jdk.incubator.mvt
  46  * @run testng/othervm -XX:+EnableMVT TestPoint
  47  */
  48 
  49 @Test
  50 public class TestPoint {
  51 
  52     @DataProvider(name = "createPoints")
  53     public Object[][] createPoints() {
  54         Object[][] data = new Object[10 * 10][];
  55         int n = 0;
  56         for (int i = 0 ; i < 10 ; i++) {
  57             for (int j = 0 ; j < 10 ; j++) {
  58                 data[n++] = new Object[] { new Point(i, j) };
  59             }
  60         }
  61         return data;
  62     }
  63 
  64     @DataProvider(name = "createPointArrays")
  65     public Object[][] createPointArrays() throws Throwable {


< prev index next >