Mercurial > hg > truffle
comparison test/compiler/intrinsics/mathexact/Verify.java @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | cd5d10655495 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
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 }; | |
164 | 163 |
165 public static void verify(BinaryMethod method) { | 164 public static void verify(BinaryMethod method) { |
166 for (int i = 0; i < 50000; ++i) { | 165 for (int i = 0; i < 50000; ++i) { |
167 int rnd1 = rnd.nextInt(), rnd2 = rnd.nextInt(); | 166 int rnd1 = rnd.nextInt(), rnd2 = rnd.nextInt(); |
168 Verify.verifyBinary(rnd1, rnd2, method); | 167 Verify.verifyBinary(rnd1, rnd2, method); |
169 Verify.verifyBinary(rnd1, rnd2 + 1, method); | 168 Verify.verifyBinary(rnd1, rnd2 + 1, method); |
170 Verify.verifyBinary(rnd1 + 1, rnd2, method); | 169 Verify.verifyBinary(rnd1 + 1, rnd2, method); |
171 Verify.verifyBinary(rnd1 - 1, rnd2, method); | 170 Verify.verifyBinary(rnd1 - 1, rnd2, method); |
172 Verify.verifyBinary(rnd1, rnd2 - 1, method); | 171 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); | |
177 } | 172 } |
178 } | 173 } |
179 } | 174 } |
180 | 175 |
181 public static class NonConstantLongTest { | 176 public static class NonConstantLongTest { |