< prev index next >
test/sun/nio/cs/FindDecoderBugs.java
Print this page
@@ -22,20 +22,23 @@
*/
/*
* @test
* @bug 6380723
- * @summary Decode many byte sequences in many ways
+ * @summary Decode many byte sequences in many ways (use -Dseed=X to set PRNG seed)
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
* @run main/timeout=1800 FindDecoderBugs
* @author Martin Buchholz
- * @key randomness
+ * @key intermittent randomness
*/
import java.util.*;
import java.util.regex.*;
import java.nio.*;
import java.nio.charset.*;
+import jdk.testlibrary.RandomFactory;
public class FindDecoderBugs {
static boolean isBroken(String csn) {
if (csn.equals("x-COMPOUND_TEXT")) return true;
@@ -320,11 +323,11 @@
testRandomly(prefix, 3);
testRandomly(prefix, 4);
}
}
- private final static Random rnd = new Random();
+ private final static Random rnd = RandomFactory.getRandom();
private static byte randomByte() {
return (byte) rnd.nextInt(0x100);
}
private static byte[] randomBytes(int len) {
byte[] a = new byte[len];
< prev index next >