Home
last modified time | relevance | path

Searched refs:nextInt (Results 1 – 25 of 60) sorted by relevance

123

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DRandomTest.java45 .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());
DSortedMapTestBase.java51 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 …]
DScannerTest.java397 s.nextInt(); in test_ConstructorLjava_nio_channels_ReadableByteChannel()
1050 assertEquals(123, s.nextInt(10)); in test_nextIntI()
1051 assertEquals(456, s.nextInt(10)); in test_nextIntI()
1053 s.nextInt(10); in test_nextIntI()
1060 assertEquals(38, s.nextInt(5)); in test_nextIntI()
1062 s.nextInt(5); in test_nextIntI()
1070 s.nextInt(10); in test_nextIntI()
1082 s.nextInt(10); in test_nextIntI()
1088 assertEquals(23456, s.nextInt(10)); in test_nextIntI()
1089 assertEquals(23456, s.nextInt(10)); in test_nextIntI()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DRandomBenchmark.java26 rng.nextInt(); in timeNewRandom()
33 rng.nextInt(); in timeReusedRandom()
40 rng.nextInt(); in timeReusedSecureRandom()
47 rng.nextInt(); in timeNewSecureRandom()
DCollectionsBenchmark.java75 list.add(random.nextInt()); in buildList()
/libcore/jsr166-tests/src/test/java/jsr166/
DThreadLocalRandomTest.java63 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) {
DTreeSetTest.java711 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()
DConcurrentSkipListSetTest.java707 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()
/libcore/ojluni/src/main/java/java/util/
DPrimitiveIterator.java94 int nextInt(); in nextInt() method
115 action.accept(nextInt()); in forEachRemaining()
128 return nextInt(); in next()
DRandom.java229 for (int rnd = nextInt(), in nextBytes()
279 return nextInt(n) + origin; in internalNextInt()
284 r = nextInt(); in internalNextInt()
290 return nextInt(); in internalNextInt()
328 public int nextInt() { in nextInt() method in Random
386 public int nextInt(int bound) { in nextInt() method in Random
DSplittableRandom.java406 public int nextInt() { in nextInt() method in SplittableRandom
419 public int nextInt(int bound) { in nextInt() method in SplittableRandom
447 public int nextInt(int origin, int bound) { in nextInt() method in SplittableRandom
/libcore/luni/src/test/java/libcore/java/util/
DRandomTest.java37 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()
DOldAndroidTreeMapTest.java49 int val = mRandom.nextInt(1000); in doTest()
83 int val = mRandom.nextInt(1000); in doTest()
/libcore/luni/src/test/java/libcore/dalvik/system/
DEmulatedStackFrameTest.java51 assertEquals(43, reader.nextInt()); in testReaderWriter_allParamTypes()
89 assertEquals(64, reader.nextInt()); in testReaderWriter_allReturnTypes()
124 reader.nextInt(); in testReaderWriter_wrongTypes()
176 reader.nextInt(); in testReturnValueReaderWriter_wrongTypes()
/libcore/ojluni/src/main/java/java/lang/
DCharSequence.java138 public int nextInt() { in chars() method in CharSequence.CharIterator
209 public int nextInt() { in codePoints() method in CharSequence.CodePointIterator
/libcore/support/src/test/java/libcore/testing/io/
DTestIoUtils.java55 return random.nextInt(); in nextRandomInt()
/libcore/ojluni/src/main/java/java/lang/invoke/
DTransformers.java256 final int index = reader.nextInt(); in transform()
285 final int index = reader.nextInt(); in transform()
530 filterWriter.putNextInt(returnValueReader.nextInt()); in transform()
585 arguments[i] = reader.nextInt(); in transform()
738 case 'I': { o = reader.nextInt(); break; } in referenceArray()
758 case 'I': { arityArray[i] = reader.nextInt(); break; } in intArray()
777 case 'I': { arityArray[i] = reader.nextInt(); break; } in longArray()
852 case 'I': { arityArray[i] = reader.nextInt(); break; } in floatArray()
873 case 'I': { arityArray[i] = reader.nextInt(); break; } in doubleArray()
938 case 'I': { writer.putNextInt(reader.nextInt()); break; } in copyParameter()
[all …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DIntPrimitiveOpsTests.java103 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/
DOldAndroidZipStressTest.java141 byte what = (byte)random.nextInt(256); in testZipDeflateInflateStress()
142 int howMany = random.nextInt(32); in testZipDeflateInflateStress()
/libcore/ojluni/annotations/hiddenapi/java/util/
DRandom.java74 public int nextInt() { in nextInt() method in Random
78 public int nextInt(int bound) { in nextInt() method in Random
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
DLockSupport.java402 else if ((r = java.util.concurrent.ThreadLocalRandom.current().nextInt()) == 0) in nextSecondarySeed()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DOldBigIntegerTest.java147 bi = BigInteger.valueOf(rand.nextInt(1000000)).multiply( in test_isProbablePrimeI()
148 BigInteger.valueOf(rand.nextInt(1000000))); in test_isProbablePrimeI()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestZoneTextPrinterParser.java79 zdt = zdt.withDayOfYear(r.nextInt(365) + 1) in test_printText()
80 .with(ChronoField.SECOND_OF_DAY, r.nextInt(86400)); in test_printText()
/libcore/dalvik/src/main/java/dalvik/system/
DEmulatedStackFrame.java394 writer.putNextInt(reader.nextInt()); in copyNext()
476 public int nextInt() { in nextInt() method in EmulatedStackFrame.StackFrameReader
/libcore/ojluni/src/test/java/time/test/java/util/
DTestFormatter.java106 zdt = zdt.with(ChronoField.DAY_OF_YEAR, (r.nextInt(365) + 1)) in test()
107 .with(ChronoField.SECOND_OF_DAY, r.nextInt(86400)); in test()

123