9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /*
27 * @test
28 * @library /test/lib
29 * @run main PrimeTest
30 * @bug 8026236 8074460 8078672
31 * @summary test primality verification methods in BigInteger (use -Dseed=X to set PRNG seed)
32 * @author bpb
33 * @key randomness
34 */
35 import java.math.BigInteger;
36 import java.util.BitSet;
37 import java.util.List;
38 import java.util.NavigableSet;
39 import java.util.Set;
40 import java.util.SplittableRandom;
41 import java.util.TreeSet;
42 import jdk.test.lib.RandomFactory;
43 import static java.util.stream.Collectors.toCollection;
44 import static java.util.stream.Collectors.toList;
45
46 public class PrimeTest {
47
48 private static final int DEFAULT_UPPER_BOUND = 1299709; // 100000th prime
|
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /*
27 * @test
28 * @library /test/lib
29 * @build jdk.test.lib.RandomFactory
30 * @run main PrimeTest
31 * @bug 8026236 8074460 8078672
32 * @summary test primality verification methods in BigInteger (use -Dseed=X to set PRNG seed)
33 * @author bpb
34 * @key randomness
35 */
36 import java.math.BigInteger;
37 import java.util.BitSet;
38 import java.util.List;
39 import java.util.NavigableSet;
40 import java.util.Set;
41 import java.util.SplittableRandom;
42 import java.util.TreeSet;
43 import jdk.test.lib.RandomFactory;
44 import static java.util.stream.Collectors.toCollection;
45 import static java.util.stream.Collectors.toList;
46
47 public class PrimeTest {
48
49 private static final int DEFAULT_UPPER_BOUND = 1299709; // 100000th prime
|