comparison test/compiler/intrinsics/mathexact/Verify.java @ 18041:52b4284cb496

Merge with jdk8u20-b26
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 16:02:50 +0200
parents 4ca6dc0799b6
children
comparison
equal deleted inserted replaced
17606:45d7b2c7029d 18041:52b4284cb496
158 } 158 }
159 } 159 }
160 160
161 public static class NonConstantTest { 161 public static class NonConstantTest {
162 public static java.util.Random rnd = new java.util.Random(); 162 public static java.util.Random rnd = new java.util.Random();
163 public static int[] values = new int[] { Integer.MAX_VALUE, Integer.MIN_VALUE };
163 164
164 public static void verify(BinaryMethod method) { 165 public static void verify(BinaryMethod method) {
165 for (int i = 0; i < 50000; ++i) { 166 for (int i = 0; i < 50000; ++i) {
166 int rnd1 = rnd.nextInt(), rnd2 = rnd.nextInt(); 167 int rnd1 = rnd.nextInt(), rnd2 = rnd.nextInt();
167 Verify.verifyBinary(rnd1, rnd2, method); 168 Verify.verifyBinary(rnd1, rnd2, method);
168 Verify.verifyBinary(rnd1, rnd2 + 1, method); 169 Verify.verifyBinary(rnd1, rnd2 + 1, method);
169 Verify.verifyBinary(rnd1 + 1, rnd2, method); 170 Verify.verifyBinary(rnd1 + 1, rnd2, method);
170 Verify.verifyBinary(rnd1 - 1, rnd2, method); 171 Verify.verifyBinary(rnd1 - 1, rnd2, method);
171 Verify.verifyBinary(rnd1, rnd2 - 1, method); 172 Verify.verifyBinary(rnd1, rnd2 - 1, method);
173 Verify.verifyBinary(0, values[0], method);
174 Verify.verifyBinary(values[0], 0, method);
175 Verify.verifyBinary(0, values[1], method);
176 Verify.verifyBinary(values[1], 0, method);
172 } 177 }
173 } 178 }
174 } 179 }
175 180
176 public static class NonConstantLongTest { 181 public static class NonConstantLongTest {