Searched defs:rand (Results 1 - 25 of 38) sorted by relevance

12

/openjdk7/jdk/test/java/nio/file/Files/walkFileTree/
H A DCreateFileTree.java35 static final Random rand = new Random(); field in class:CreateFileTree
44 int total = 1 + rand.nextInt(20);
48 int r = Math.min((total-n), (1+rand.nextInt(3)));
62 int x = rand.nextInt(dirs.size());
67 int links = 1 + rand.nextInt(5);
69 int x = rand.nextInt(dirs.size());
72 y = rand.nextInt(dirs.size());
H A DTerminateWalk.java35 static final Random rand = new Random(); field in class:TerminateWalk
41 if (rand.nextInt(10) == 0) {
H A DSkipSiblings.java35 static final Random rand = new Random(); field in class:SkipSiblings
47 if (parent != null && rand.nextBoolean()) {
/openjdk7/jdk/test/java/nio/channels/Channels/
H A DShortWrite.java38 static Random rand = new Random(); field in class:ShortWrite
48 int n = rand.nextInt(rem) + 1;
H A DBasic2.java37 static final Random rand = new Random(); field in class:Basic2
92 byte[] buf = new byte[128 + rand.nextInt(128)];
94 if (rand.nextBoolean()) {
99 len = 1 + rand.nextInt(64);
100 off = rand.nextInt(64);
131 this.total = 50*1000 + rand.nextInt(50*1000);
139 byte[] buf = new byte[1 + rand.nextInt(rem)];
143 if (rand.nextBoolean()) {
147 off = rand.nextInt(buf.length);
149 len = (r <= 1) ? 1 : (1 + rand
[all...]
/openjdk7/jdk/test/java/io/Serializable/corruptedUTFConsumption/
H A DCorruptedUTFConsumption.java38 static Random rand = new Random(System.currentTimeMillis()); field in class:CorruptedUTFConsumption
52 utf[utf.length - 1] = (byte) (0xC0 | rand.nextInt() & 0x1F);
56 utf[utf.length - 1] = (byte) (0xE0 | rand.nextInt() & 0x0F);
61 utf[utf.length - 2] = (byte) (0xE0 | rand.nextInt() & 0x0F);
62 utf[utf.length - 1] = (byte) (0x80 | rand.nextInt() & 0x3F);
/openjdk7/jdk/test/java/nio/channels/AsynchronousChannelGroup/
H A DRestart.java44 static final Random rand = new Random(); field in class:Restart
68 int nThreads = 1 + rand.nextInt(4);
76 group = AsynchronousChannelGroup.withCachedThreadPool(pool, rand.nextInt(5));
106 if (rand.nextBoolean()) {
H A DBasic.java39 static final Random rand = new Random(); field in class:Basic
61 if (rand.nextBoolean()) {
63 group = AsynchronousChannelGroup.withCachedThreadPool(pool, rand.nextInt(5));
65 int nThreads = 1 + rand.nextInt(8);
83 if (rand.nextBoolean()) {
85 group = AsynchronousChannelGroup.withCachedThreadPool(pool, rand.nextInt(10));
87 int nThreads = 1 + rand.nextInt(8);
92 switch (rand.nextInt(2)) {
119 if (rand.nextBoolean()) {
122 .withCachedThreadPool(pool, rand
[all...]
H A DIdentity.java43 static final Random rand = new Random(); field in class:Identity
107 final int groupCount = 3 + rand.nextInt(8);
113 if (rand.nextBoolean()) {
114 int nThreads = 1 + rand.nextInt(10);
118 group = AsynchronousChannelGroup.withCachedThreadPool(pool, rand.nextInt(5));
138 int id = rand.nextInt(groupCount);
165 if (rand.nextBoolean()) {
/openjdk7/jdk/test/java/nio/channels/SocketChannel/
H A DCloseDuringWrite.java38 static final Random rand = new Random(); field in class:CloseDuringWrite
71 int when = 1000 + rand.nextInt(2000);
79 int limit = rand.nextInt(bb.capacity());
H A DOutOfBand.java37 private static final Random rand = new Random(); field in class:OutOfBand
79 int b1 = -127 + rand.nextInt(384);
136 final int STOP = rand.nextInt(256);
H A DShortWrite.java38 static final Random rand = new Random(); field in class:ShortWrite
86 rand.nextBytes(buf.array());
126 int size = rand.nextInt(1024*1024);
/openjdk7/jdk/test/java/lang/Math/
H A DCubeRootTests.java41 static java.util.Random rand = new java.util.Random(); field in class:CubeRootTests
124 ((long) (rand.nextInt() & 0xFFFF))<<
131 ((long) (rand.nextInt() & 0xFFFF))<<
172 double d = 1.0 + rand.nextDouble();
H A DLog10Tests.java42 static java.util.Random rand = new java.util.Random(0L); field in class:Log10Tests
100 double input = Double.longBitsToDouble(rand.nextLong());
/openjdk7/jdk/test/java/nio/channels/FileChannel/
H A DAtomicAppend.java43 static final Random rand = new Random(); field in class:AtomicAppend
47 if (rand.nextBoolean()) {
56 if (rand.nextBoolean()) {
68 if (rand.nextBoolean()) {
87 if (rand.nextBoolean()) {
H A DClosedByInterrupt.java38 static final Random rand = new Random(); field in class:ClosedByInterrupt
48 rand.nextBytes(b);
87 Thread.sleep(500 + rand.nextInt(1000));
92 Thread.sleep(rand.nextInt(50));
116 this.writer = rand.nextBoolean();
122 rand.nextBytes(bb.array());
126 long position = rand.nextInt(K*K - bb.capacity());
137 Thread.sleep(rand.nextInt(50));
/openjdk7/jdk/test/java/nio/file/WatchService/
H A DSensitivityModifier.java41 static final Random rand = new Random(); field in class:SensitivityModifier
48 sensitivtives[ rand.nextInt(sensitivtives.length) ];
60 int nDirs = 5 + rand.nextInt(20);
61 int nFiles = 50 + rand.nextInt(50);
68 Path dir = dirs[rand.nextInt(nDirs)];
82 Path file = files[rand.nextInt(nFiles)];
H A DLotsOfEvents.java40 static final Random rand = new Random(); field in class:LotsOfEvents
136 final int nfiles = 5 + rand.nextInt(10);
143 if (rand.nextBoolean())
155 DirectoryEntry entry = entries[rand.nextInt(nfiles)];
156 int action = rand.nextInt(10);
/openjdk7/jdk/test/sun/security/provider/SeedGenerator/
H A DPriority_Inversion.java51 RandomTest rand = new RandomTest();
52 InvertTest invert = new InvertTest(deltaPriority, rand);
53 rand.start();
62 SecureRandom rand = new SecureRandom();
63 rand.nextBytes(new byte[5]);
76 private RandomTest rand; field in class:InvertTest
78 InvertTest(int delta, RandomTest rand) { argument
80 this.rand = rand;
89 rand
[all...]
/openjdk7/jdk/test/java/nio/channels/DatagramChannel/
H A DAdaptDatagramSocket.java38 static Random rand = new Random(); field in class:AdaptDatagramSocket
51 rand.nextBytes(op.getData());
H A DMulticastSendReceiveTests.java41 static final Random rand = new Random(); field in class:MulticastSendReceiveTests
64 int id = rand.nextInt();
/openjdk7/jdk/test/java/nio/file/Files/
H A DBytesAndLines.java37 static final Random rand = new Random(); field in class:BytesAndLines
54 testReadAndWriteBytes(rand.nextInt(32000));
91 boolean append = rand.nextBoolean();
94 rand.nextBytes(b1);
97 rand.nextBytes(b2);
100 if (rand.nextBoolean())
189 if (rand.nextBoolean())
/openjdk7/jdk/test/java/nio/file/attribute/FileTime/
H A DBasic.java36 static final Random rand = new Random(); field in class:Basic
75 for (int i=0; i<100; i++) { to(rand.nextLong(), unit); }
/openjdk7/jdk/test/java/nio/channels/AsynchronousFileChannel/
H A DLotsOfWrites.java37 static final Random rand = new Random(); field in class:LotsOfWrites
58 int n = Math.min(8192 + rand.nextInt(8192), (int)(size - position));
120 int count = 20 + rand.nextInt(16);
126 long size = 512*1024 + rand.nextInt(512*1024);
/openjdk7/jdk/test/java/nio/channels/AsynchronousSocketChannel/
H A DStressLoopback.java36 static final Random rand = new Random(); field in class:StressLoopback
47 int count = 2 + rand.nextInt(9);
94 int size = 1024 + rand.nextInt(10000);
95 this.sentBuffer = (rand.nextBoolean()) ?
137 int size = 1024 + rand.nextInt(10000);
138 this.readBuffer = (rand.nextBoolean()) ?

Completed in 84 milliseconds

12