8079419: Update to RegEx test to use random number library
authordarcy
Tue, 05 May 2015 15:34:22 -0700
changeset 30370 984bf40cdc67
parent 30369 26cd8124a0a4
child 30371 aa862dad6ad9
8079419: Update to RegEx test to use random number library Reviewed-by: sherman
jdk/test/java/util/regex/RegExTest.java
--- a/jdk/test/java/util/regex/RegExTest.java	Tue May 05 14:44:39 2015 -0700
+++ b/jdk/test/java/util/regex/RegExTest.java	Tue May 05 15:34:22 2015 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @summary tests RegExp framework
+ * @summary tests RegExp framework (use -Dseed=X to set PRNG seed)
  * @author Mike McCloskey
  * @bug 4481568 4482696 4495089 4504687 4527731 4599621 4631553 4619345
  * 4630911 4672616 4711773 4727935 4750573 4792284 4803197 4757029 4808962
@@ -33,6 +33,9 @@
  * 6350801 6676425 6878475 6919132 6931676 6948903 6990617 7014645 7039066
  * 7067045 7014640 7189363 8007395 8013252 8013254 8012646 8023647 6559590
  * 8027645 8035076 8039124 8035975 8074678
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
+ * @run main RegExTest
  * @key randomness
  */
 
@@ -50,7 +53,7 @@
  */
 public class RegExTest {
 
-    private static Random generator = new Random();
+    private static Random generator = RandomFactory.getRandom();
     private static boolean failure = false;
     private static int failCount = 0;
     private static String firstFailure = null;