/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | RandomTest.java | 45 .nextInt() == r2.nextInt()); in test_ConstructorJ() 55 .nextInt() == r2.nextInt()); in test_setSeed() 169 int lastNum = r.nextInt(); in test_nextInt() 173 nextNum = r.nextInt(); in test_nextInt() 188 int lastNum = r.nextInt(range); in test_nextIntI() 193 nextNum = r.nextInt(range); in test_nextIntI() 291 mr.nextInt(); in test_next() 293 mr.nextInt(10); in test_next() 324 assertEquals("should be equal", initialRand.nextInt(), deserializedRand.nextInt());
|
D | SortedMapTestBase.java | 51 ref.put(rnd.nextInt(N) * 2, rnd.nextBoolean() ? null : rnd.nextInt(N) * 2); in setUp() 62 int key = rnd.nextInt(N); in testContainsKey() 70 int value = rnd.nextInt(N); in testContainsValue() 91 int key = rnd.nextInt(N); in testGet() 113 int key = rnd.nextInt(N); in testPut() 114 int value = rnd.nextInt(N); in testPut() 125 int key = rnd.nextInt(N); in testPut0() 126 int value = rnd.nextInt(N); in testPut0() 135 mixin.put(rnd.nextInt(N), rnd.nextInt(N)); in testPutAll() 145 int key = rnd.nextInt(N); in testRemove() [all …]
|
D | ScannerTest.java | 284 s.nextInt(); in test_ConstructorLjava_nio_channels_ReadableByteChannel() 937 assertEquals(123, s.nextInt(10)); in test_nextIntI() 938 assertEquals(456, s.nextInt(10)); in test_nextIntI() 940 s.nextInt(10); in test_nextIntI() 947 assertEquals(38, s.nextInt(5)); in test_nextIntI() 949 s.nextInt(5); in test_nextIntI() 957 s.nextInt(10); in test_nextIntI() 969 s.nextInt(10); in test_nextIntI() 975 assertEquals(23456, s.nextInt(10)); in test_nextIntI() 976 assertEquals(23456, s.nextInt(10)); in test_nextIntI() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | RandomBenchmark.java | 26 rng.nextInt(); in timeNewRandom() 33 rng.nextInt(); in timeReusedRandom() 40 rng.nextInt(); in timeReusedSecureRandom() 47 rng.nextInt(); in timeNewSecureRandom()
|
D | CollectionsBenchmark.java | 75 list.add(random.nextInt()); in buildList()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ThreadLocalRandomTest.java | 63 int f = ThreadLocalRandom.current().nextInt(); in testNextInt() 65 while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f) in testNextInt() 132 rnd.nextInt(bound); 150 rnd.nextInt(badBounds[0], badBounds[1]); 163 int f = ThreadLocalRandom.current().nextInt(bound); 168 (j = ThreadLocalRandom.current().nextInt(bound)) == f) { 183 int f = ThreadLocalRandom.current().nextInt(least, bound); 188 (j = ThreadLocalRandom.current().nextInt(least, bound)) == f) {
|
D | TreeSetTest.java | 711 int element = rnd.nextInt(limit); in populate() 722 remove(set, min - 5 + rnd.nextInt(rangeSize + 10)); in mutateSet() 735 int element = min + rnd.nextInt(rangeSize); in mutateSet() 747 remove(set, min - 5 + rnd.nextInt(rangeSize + 10)); in mutateSubSet() 760 int element = min - 5 + rnd.nextInt(rangeSize + 10); in mutateSubSet() 834 endpoints[0] = min + rnd.nextInt(rangeSize); in bashSubSet() 835 endpoints[1] = min + rnd.nextInt(rangeSize); in bashSubSet()
|
D | ConcurrentSkipListSetTest.java | 707 int element = rnd.nextInt(limit); in populate() 718 remove(set, min - 5 + rnd.nextInt(rangeSize + 10), bs); in mutateSet() 731 int element = min + rnd.nextInt(rangeSize); in mutateSet() 744 remove(set, min - 5 + rnd.nextInt(rangeSize + 10), bs); in mutateSubSet() 757 int element = min - 5 + rnd.nextInt(rangeSize + 10); in mutateSubSet() 832 endpoints[0] = min + rnd.nextInt(rangeSize); in bashSubSet() 833 endpoints[1] = min + rnd.nextInt(rangeSize); in bashSubSet()
|
D | TreeMapTest.java | 818 int key = rnd.nextInt(limit); 829 remove(map, min - 5 + rnd.nextInt(rangeSize + 10)); 842 int key = min + rnd.nextInt(rangeSize); 854 remove(map, min - 5 + rnd.nextInt(rangeSize + 10)); 867 int key = min - 5 + rnd.nextInt(rangeSize + 10); 941 endpoints[0] = min + rnd.nextInt(rangeSize); 942 endpoints[1] = min + rnd.nextInt(rangeSize);
|
D | ConcurrentSkipListMapTest.java | 1013 int key = rnd.nextInt(limit); 1024 remove(map, min - 5 + rnd.nextInt(rangeSize + 10)); 1037 int key = min + rnd.nextInt(rangeSize); 1049 remove(map, min - 5 + rnd.nextInt(rangeSize + 10)); 1062 int key = min - 5 + rnd.nextInt(rangeSize + 10); 1136 endpoints[0] = min + rnd.nextInt(rangeSize); 1137 endpoints[1] = min + rnd.nextInt(rangeSize);
|
D | ConcurrentLinkedDequeTest.java | 759 int max = rng.nextInt(5) + 2; in testIteratorRemove() 760 int split = rng.nextInt(max - 1) + 1; in testIteratorRemove() 827 int max = rng.nextInt(5) + 2; in testDescendingIteratorRemove() 828 int split = rng.nextInt(max - 1) + 1; in testDescendingIteratorRemove()
|
/libcore/ojluni/src/main/java/java/util/ |
D | PrimitiveIterator.java | 94 int nextInt(); in nextInt() method 115 action.accept(nextInt()); in forEachRemaining() 128 return nextInt(); in next()
|
D | Random.java | 229 for (int rnd = nextInt(), in nextBytes() 279 return nextInt(n) + origin; in internalNextInt() 284 r = nextInt(); in internalNextInt() 290 return nextInt(); in internalNextInt() 329 public int nextInt() { in nextInt() method in Random 389 public int nextInt(int n) { in nextInt() method in Random
|
D | SplittableRandom.java | 407 public int nextInt() { in nextInt() method in SplittableRandom 420 public int nextInt(int bound) { in nextInt() method in SplittableRandom 448 public int nextInt(int origin, int bound) { in nextInt() method in SplittableRandom
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | RandomTest.java | 37 r1.nextInt(); in test_subclassing() 41 r2.nextInt(); in test_subclassing() 51 rands[i] = rand.nextInt(); in test_ints$() 64 rands[i] = rand.nextInt(); in test_ints$L() 84 rands[i] = rand.nextInt(bound - origin) + origin; in test_ints$II() 103 rands[i] = rand.nextInt(bound - origin) + origin; in test_ints$LII()
|
D | OldAndroidTreeMapTest.java | 49 int val = mRandom.nextInt(1000); in doTest() 83 int val = mRandom.nextInt(1000); in doTest()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | CharSequence.java | 138 public int nextInt() { in chars() method in CharSequence.CharIterator 209 public int nextInt() { in codePoints() method in CharSequence.CodePointIterator
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | IntPrimitiveOpsTests.java | 103 int[] content = IntStream.generate(() -> r.nextInt(100)).limit(10).toArray(); in testSort() 121 int[] content = IntStream.generate(() -> r.nextInt(100)).limit(10).toArray(); in testSortSort()
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | OldAndroidZipStressTest.java | 141 byte what = (byte)random.nextInt(256); in testZipDeflateInflateStress() 142 int howMany = random.nextInt(32); in testZipDeflateInflateStress()
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
D | LockSupport.java | 373 else if ((r = java.util.concurrent.ThreadLocalRandom.current().nextInt()) == 0) in nextSecondarySeed()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | OldBigIntegerTest.java | 147 bi = BigInteger.valueOf(rand.nextInt(1000000)).multiply( in test_isProbablePrimeI() 148 BigInteger.valueOf(rand.nextInt(1000000))); in test_isProbablePrimeI()
|
/libcore/ojluni/src/main/java/sun/net/www/http/ |
D | HttpCapture.java | 160 String f2 = f.replace("%d", Integer.toString(rand.nextInt())); in getCapture()
|
/libcore/support/src/test/java/org/apache/harmony/testframework/ |
D | CharSinkTester.java | 169 expected[c] = (char) ('A' + dice.nextInt(26)); in sinkTestWriteLargeArray()
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | ThreadLocalRandom.java | 253 public int nextInt() { in nextInt() method in ThreadLocalRandom 266 public int nextInt(int bound) { in nextInt() method in ThreadLocalRandom 293 public int nextInt(int origin, int bound) { in nextInt() method in ThreadLocalRandom
|
/libcore/ojluni/src/main/java/java/util/prefs/ |
D | Base64.java | 247 arr[k] = (byte)rnd.nextInt(); in main()
|