test/compiler/intrinsics/mathexact/Verify.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/test/compiler/intrinsics/mathexact/Verify.java	Tue Oct 28 19:58:59 2014
--- new/test/compiler/intrinsics/mathexact/Verify.java	Tue Oct 28 19:58:59 2014

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 19,28 **** --- 19,35 ---- * 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. */ + import com.oracle.java.testlibrary.Utils; + import java.util.Random; + + /** + * The class depends on Utils class from testlibrary package. + * It uses factory method that obtains random generator. + */ public class Verify { public static String throwWord(boolean threw) { return (threw ? "threw" : "didn't throw"); }
*** 132,142 **** --- 139,149 ---- verifyResult(method, result1, result2, exception1, exception2, a, b); } public static class LoadTest { ! public static java.util.Random rnd = new java.util.Random(); ! public static Random rnd = Utils.getRandomInstance(); public static int[] values = new int[256]; public static void init() { for (int i = 0; i < values.length; ++i) { values[i] = rnd.nextInt();
*** 157,167 **** --- 164,174 ---- } } } public static class NonConstantTest { ! public static java.util.Random rnd = new java.util.Random(); ! public static Random rnd = Utils.getRandomInstance(); public static int[] values = new int[] { Integer.MAX_VALUE, Integer.MIN_VALUE }; public static void verify(BinaryMethod method) { for (int i = 0; i < 50000; ++i) { int rnd1 = rnd.nextInt(), rnd2 = rnd.nextInt();
*** 178,188 **** --- 185,195 ---- } } public static class NonConstantLongTest { public static long[] values = { Long.MIN_VALUE, Long.MAX_VALUE, 0, Long.MAX_VALUE - 1831 }; ! public static java.util.Random rnd = new java.util.Random(); ! public static Random rnd = Utils.getRandomInstance(); public static void verify(BinaryLongMethod method) { for (int i = 0; i < 50000; ++i) { long rnd1 = rnd.nextLong(), rnd2 = rnd.nextLong(); Verify.verifyBinary(rnd1, rnd2, method);
*** 197,207 **** --- 204,214 ---- } } } public static class LoopDependentTest { ! public static java.util.Random rnd = new java.util.Random(); ! public static Random rnd = Utils.getRandomInstance(); public static void verify(BinaryMethod method) { int rnd1 = rnd.nextInt(), rnd2 = rnd.nextInt(); runTest(rnd1, rnd2, method); }

test/compiler/intrinsics/mathexact/Verify.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File