< prev index next >

test/compiler/intrinsics/bmi/verifycode/BmiIntrinsicBase.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 



  25 import jdk.test.lib.Asserts;
  26 import jdk.test.lib.Platform;
  27 import jdk.test.lib.Utils;
  28 import sun.hotspot.code.NMethod;
  29 import sun.hotspot.cpuinfo.CPUInfo;
  30 
  31 import java.lang.invoke.MethodHandle;
  32 import java.lang.invoke.MethodType;
  33 import java.lang.reflect.Executable;
  34 import java.lang.reflect.Method;
  35 import java.util.concurrent.Callable;
  36 import java.util.function.Function;
  37 import compiler.whitebox.CompilerWhiteBoxTest;
  38 
  39 public class BmiIntrinsicBase extends CompilerWhiteBoxTest {
  40 
  41     protected BmiIntrinsicBase(BmiTestCase testCase) {
  42         super(testCase);
  43     }
  44 
  45     public static void verifyTestCase(Function<Method, BmiTestCase> constructor, Method... methods) throws Exception {
  46         for (Method method : methods) {
  47             new BmiIntrinsicBase(constructor.apply(method)).test();
  48         }
  49     }
  50 
  51     @Override
  52     protected void test() throws Exception {
  53         BmiTestCase bmiTestCase = (BmiTestCase) testCase;
  54 
  55         if (!(Platform.isX86() || Platform.isX64())) {
  56             System.out.println("Unsupported platform, test SKIPPED");
  57             return;




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 package compiler.intrinsics.bmi.verifycode;
  26 
  27 import compiler.whitebox.CompilerWhiteBoxTest;
  28 import jdk.test.lib.Asserts;
  29 import jdk.test.lib.Platform;
  30 import jdk.test.lib.Utils;
  31 import sun.hotspot.code.NMethod;
  32 import sun.hotspot.cpuinfo.CPUInfo;
  33 
  34 import java.lang.invoke.MethodHandle;
  35 import java.lang.invoke.MethodType;
  36 import java.lang.reflect.Executable;
  37 import java.lang.reflect.Method;
  38 import java.util.concurrent.Callable;
  39 import java.util.function.Function;

  40 
  41 public class BmiIntrinsicBase extends CompilerWhiteBoxTest {
  42 
  43     protected BmiIntrinsicBase(BmiTestCase testCase) {
  44         super(testCase);
  45     }
  46 
  47     public static void verifyTestCase(Function<Method, BmiTestCase> constructor, Method... methods) throws Exception {
  48         for (Method method : methods) {
  49             new BmiIntrinsicBase(constructor.apply(method)).test();
  50         }
  51     }
  52 
  53     @Override
  54     protected void test() throws Exception {
  55         BmiTestCase bmiTestCase = (BmiTestCase) testCase;
  56 
  57         if (!(Platform.isX86() || Platform.isX64())) {
  58             System.out.println("Unsupported platform, test SKIPPED");
  59             return;


< prev index next >