< prev index next >
test/compiler/c2/Test6603011.java
Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke
@@ -25,30 +25,32 @@
* @test
* @bug 6603011
* @summary long/int division by constant
* @modules java.base/jdk.internal.misc
* @library /testlibrary
- * @run main/othervm -Xcomp -Xbatch -XX:-Inline Test
+ *
+ * @run main/othervm -Xcomp -Xbatch -XX:-Inline compiler.c2.Test6603011
*/
//
// -XX:-Inline is essential to this test so that verification functions
// divi, modi, divl and modl generate "plain" divides.
// -Xcomp -Xbatch are also useful to ensure the full range of
// dividend and divisor combinations are tested
//
+package compiler.c2;
+
import jdk.test.lib.Utils;
-class s {
+public class Test6603011 implements Runnable {
+ static class s {
static int divi(int dividend, int divisor) { return dividend / divisor; }
static int modi(int dividend, int divisor) { return dividend % divisor; }
static long divl(long dividend, long divisor) { return dividend / divisor; }
static long modl(long dividend, long divisor) { return dividend % divisor; }
-}
-
-public class Test implements Runnable {
+ }
// Report verbose messages on failure; turn off to suppress
// too much output with gross numbers of failures.
static final boolean VERBOSE = true;
// Initailize DIVISOR so that it is final in this class.
@@ -192,17 +194,17 @@
public static void test_divisor(int divisor,
ClassLoader apploader) throws Exception {
System.setProperty("divisor", "" + divisor);
ClassLoader loader
= Utils.getTestClassPathURLClassLoader(apploader.getParent());
- Class c = loader.loadClass("Test");
+ Class c = loader.loadClass(Test6603011.class.getName());
Runnable r = (Runnable)c.newInstance();
r.run();
}
public static void main(String[] args) throws Exception {
- Class cl = Class.forName("Test");
+ Class cl = Test6603011.class;
ClassLoader apploader = cl.getClassLoader();
// Test every divisor between -100 and 100.
for (int i = -100; i <= 100; i++) {
< prev index next >