Home
last modified time | relevance | path

Searched refs:rnd (Results 1 – 25 of 26) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DSortedMapTestBase.java46 Random rnd; field in SortedMapTestBase
49 rnd = new Random(-1); in setUp()
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()
103 if (rnd.nextBoolean()) { in testKeySet()
113 int key = rnd.nextInt(N); in testPut()
114 int value = rnd.nextInt(N); in testPut()
125 int key = rnd.nextInt(N); in testPut0()
[all …]
DHashMapTest.java514 Random rnd = new Random(666); in test_putAllLjava_util_Map_Resize() local
519 Integer j = rnd.nextInt(); in test_putAllLjava_util_Map_Resize()
526 Integer j = rnd.nextInt(); in test_putAllLjava_util_Map_Resize()
532 rnd = new Random(666); in test_putAllLjava_util_Map_Resize()
534 Integer j = rnd.nextInt(); in test_putAllLjava_util_Map_Resize()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DThreadLocalRandomTest.java88 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in testNext() local
109 int q = (int) m.invoke(rnd, new Object[] { 2 }); in testNext()
116 int r = (int) m.invoke(rnd, new Object[] { 3 }); in testNext()
118 int q = (int) m.invoke(rnd, new Object[] { 3 }); in testNext()
196 ThreadLocalRandom rnd = ThreadLocalRandom.current();
199 rnd.nextInt(bound);
214 ThreadLocalRandom rnd = ThreadLocalRandom.current();
217 rnd.nextInt(badBounds[0], badBounds[1]);
268 ThreadLocalRandom rnd = ThreadLocalRandom.current();
271 rnd.nextLong(bound);
[all …]
DCollection8Test.java302 ThreadLocalRandom rnd = ThreadLocalRandom.current();
303 int n = rnd.nextInt(6);
306 List orig = rnd.nextBoolean()
311 Iterator it = rnd.nextBoolean() ? c.iterator() : null;
319 switch (rnd.nextInt(3)) {
347 switch (rnd.nextInt(4)) {
391 ThreadLocalRandom rnd = ThreadLocalRandom.current();
392 int n = rnd.nextInt(6);
403 for (int i = rnd.nextInt(n + 1); --i >= 0; ) {
405 if (rnd.nextBoolean()) assertTrue(it.hasNext());
[all …]
DTreeSetTest.java689 Random rnd = new Random(666); field in TreeSetTest
735 int element = rnd.nextInt(limit); in populate()
746 remove(set, min - 5 + rnd.nextInt(rangeSize + 10)); in mutateSet()
751 if (rnd.nextBoolean()) { in mutateSet()
759 int element = min + rnd.nextInt(rangeSize); in mutateSet()
771 remove(set, min - 5 + rnd.nextInt(rangeSize + 10)); in mutateSubSet()
776 if (rnd.nextBoolean()) { in mutateSubSet()
784 int element = min - 5 + rnd.nextInt(rangeSize + 10); in mutateSubSet()
821 boolean incl = rnd.nextBoolean(); in bashSubSet()
824 if (rnd.nextBoolean()) in bashSubSet()
[all …]
DConcurrentSkipListSetTest.java693 Random rnd = new Random(666); field in ConcurrentSkipListSetTest
738 int element = rnd.nextInt(limit); in populate()
749 remove(set, min - 5 + rnd.nextInt(rangeSize + 10), bs); in mutateSet()
754 if (rnd.nextBoolean()) { in mutateSet()
762 int element = min + rnd.nextInt(rangeSize); in mutateSet()
775 remove(set, min - 5 + rnd.nextInt(rangeSize + 10), bs); in mutateSubSet()
780 if (rnd.nextBoolean()) { in mutateSubSet()
788 int element = min - 5 + rnd.nextInt(rangeSize + 10); in mutateSubSet()
826 boolean incl = rnd.nextBoolean(); in bashSubSet()
829 if (rnd.nextBoolean()) in bashSubSet()
[all …]
DTreeMapTest.java807 Random rnd = new Random(666);
841 int key = rnd.nextInt(limit);
852 remove(map, min - 5 + rnd.nextInt(rangeSize + 10));
857 if (rnd.nextBoolean()) {
865 int key = min + rnd.nextInt(rangeSize);
877 remove(map, min - 5 + rnd.nextInt(rangeSize + 10));
882 if (rnd.nextBoolean()) {
890 int key = min - 5 + rnd.nextInt(rangeSize + 10);
927 boolean incl = rnd.nextBoolean();
930 if (rnd.nextBoolean())
[all …]
DConcurrentSkipListMapTest.java1002 Random rnd = new Random(666);
1036 int key = rnd.nextInt(limit);
1047 remove(map, min - 5 + rnd.nextInt(rangeSize + 10));
1052 if (rnd.nextBoolean()) {
1060 int key = min + rnd.nextInt(rangeSize);
1072 remove(map, min - 5 + rnd.nextInt(rangeSize + 10));
1077 if (rnd.nextBoolean()) {
1085 int key = min - 5 + rnd.nextInt(rangeSize + 10);
1122 boolean incl = rnd.nextBoolean();
1125 if (rnd.nextBoolean())
[all …]
DArrayBlockingQueueTest.java106 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in populatedQueue() local
107 int capacity = rnd.nextInt(minCapacity, maxCapacity + 1); in populatedQueue()
112 int n = rnd.nextInt(capacity); in populatedQueue()
708 final ThreadLocalRandom rnd = ThreadLocalRandom.current(); in testToArray() local
709 final int size = rnd.nextInt(6); in testToArray()
710 final int capacity = Math.max(1, size + rnd.nextInt(size + 1)); in testToArray()
DArrayDequeTest.java75 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in populatedDeque() local
76 switch (rnd.nextInt(6)) { in populatedDeque()
85 switch (rnd.nextInt(3)) { in populatedDeque()
98 if (rnd.nextBoolean()) in populatedDeque()
DRecursiveActionTest.java1252 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in testSortTaskDemo() local
1255 array[i] = rnd.nextLong(); in testSortTaskDemo()
/libcore/jsr166-tests/src/test/java/jsr166/
DThreadLocalRandomTest.java129 ThreadLocalRandom rnd = ThreadLocalRandom.current();
132 rnd.nextInt(bound);
147 ThreadLocalRandom rnd = ThreadLocalRandom.current();
150 rnd.nextInt(badBounds[0], badBounds[1]);
201 ThreadLocalRandom rnd = ThreadLocalRandom.current();
204 rnd.nextLong(bound);
219 ThreadLocalRandom rnd = ThreadLocalRandom.current();
222 rnd.nextLong(badBounds[0], badBounds[1]);
272 ThreadLocalRandom rnd = ThreadLocalRandom.current();
282 rnd.nextDouble(bound);
DTreeSetTest.java666 Random rnd = new Random(666); field in TreeSetTest
711 int element = rnd.nextInt(limit); in populate()
722 remove(set, min - 5 + rnd.nextInt(rangeSize + 10)); in mutateSet()
727 if (rnd.nextBoolean()) { in mutateSet()
735 int element = min + rnd.nextInt(rangeSize); in mutateSet()
747 remove(set, min - 5 + rnd.nextInt(rangeSize + 10)); in mutateSubSet()
752 if (rnd.nextBoolean()) { in mutateSubSet()
760 int element = min - 5 + rnd.nextInt(rangeSize + 10); in mutateSubSet()
797 boolean incl = rnd.nextBoolean(); in bashSubSet()
800 if (rnd.nextBoolean()) in bashSubSet()
[all …]
DConcurrentSkipListSetTest.java663 Random rnd = new Random(666); field in ConcurrentSkipListSetTest
707 int element = rnd.nextInt(limit); in populate()
718 remove(set, min - 5 + rnd.nextInt(rangeSize + 10), bs); in mutateSet()
723 if (rnd.nextBoolean()) { in mutateSet()
731 int element = min + rnd.nextInt(rangeSize); in mutateSet()
744 remove(set, min - 5 + rnd.nextInt(rangeSize + 10), bs); in mutateSubSet()
749 if (rnd.nextBoolean()) { in mutateSubSet()
757 int element = min - 5 + rnd.nextInt(rangeSize + 10); in mutateSubSet()
795 boolean incl = rnd.nextBoolean(); in bashSubSet()
798 if (rnd.nextBoolean()) in bashSubSet()
[all …]
DTreeMapTest.java784 Random rnd = new Random(666);
818 int key = rnd.nextInt(limit);
829 remove(map, min - 5 + rnd.nextInt(rangeSize + 10));
834 if (rnd.nextBoolean()) {
842 int key = min + rnd.nextInt(rangeSize);
854 remove(map, min - 5 + rnd.nextInt(rangeSize + 10));
859 if (rnd.nextBoolean()) {
867 int key = min - 5 + rnd.nextInt(rangeSize + 10);
904 boolean incl = rnd.nextBoolean();
907 if (rnd.nextBoolean())
[all …]
DConcurrentSkipListMapTest.java979 Random rnd = new Random(666);
1013 int key = rnd.nextInt(limit);
1024 remove(map, min - 5 + rnd.nextInt(rangeSize + 10));
1029 if (rnd.nextBoolean()) {
1037 int key = min + rnd.nextInt(rangeSize);
1049 remove(map, min - 5 + rnd.nextInt(rangeSize + 10));
1054 if (rnd.nextBoolean()) {
1062 int key = min - 5 + rnd.nextInt(rangeSize + 10);
1099 boolean incl = rnd.nextBoolean();
1102 if (rnd.nextBoolean())
[all …]
DRecursiveActionTest.java1240 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in testSortTaskDemo() local
1243 array[i] = rnd.nextLong(); in testSortTaskDemo()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerConstructorsTest.java743 Random rnd = new Random(); in testConstructorRandom() local
744 BigInteger aNumber = new BigInteger(bitLen, rnd); in testConstructorRandom()
750 Random rnd = new Random(); in testConstructorPrime() local
756 b = new BigInteger(bits, 10, rnd); in testConstructorPrime()
761 b = new BigInteger(bits, 10, rnd); in testConstructorPrime()
766 b = new BigInteger(bits, 10, rnd); in testConstructorPrime()
772 b = new BigInteger(bits, 10, rnd); in testConstructorPrime()
777 b = new BigInteger(bits, rnd); in testConstructorPrime()
782 b = new BigInteger(bits, rnd); in testConstructorPrime()
/libcore/ojluni/src/main/java/java/util/prefs/
DBase64.java242 java.util.Random rnd = new java.util.Random(); in main() local
247 arr[k] = (byte)rnd.nextInt(); in main()
/libcore/ojluni/src/main/java/java/math/
DBigInteger.java626 public BigInteger(int numBits, @NonNull Random rnd) { in BigInteger() argument
627 this(1, randomBits(numBits, rnd)); in BigInteger()
630 private static byte[] randomBits(int numBits, Random rnd) { in randomBits() argument
638 rnd.nextBytes(randomBits); in randomBits()
664 public BigInteger(int bitLength, int certainty, @NonNull Random rnd) { in BigInteger() argument
670 ? smallPrime(bitLength, certainty, rnd) in BigInteger()
671 : largePrime(bitLength, certainty, rnd)); in BigInteger()
697 @NonNull public static BigInteger probablePrime(int bitLength, @NonNull Random rnd) { in probablePrime() argument
702 smallPrime(bitLength, DEFAULT_PRIME_CERTAINTY, rnd) : in probablePrime()
703 largePrime(bitLength, DEFAULT_PRIME_CERTAINTY, rnd)); in probablePrime()
[all …]
/libcore/ojluni/src/main/java/java/util/
DRandom.java229 for (int rnd = nextInt(), in nextBytes()
231 n-- > 0; rnd >>= Byte.SIZE) in nextBytes()
232 bytes[i++] = (byte)rnd; in nextBytes()
DCollections.java469 Random rnd = r; in shuffle() local
470 if (rnd == null) in shuffle()
471 r = rnd = new Random(); // harmless race. in shuffle()
472 shuffle(list, rnd); in shuffle()
501 public static void shuffle(List<?> list, Random rnd) { in shuffle() argument
505 swap(list, i-1, rnd.nextInt(i)); in shuffle()
511 swap(arr, i-1, rnd.nextInt(i)); in shuffle()
/libcore/ojluni/src/main/java/java/util/concurrent/
DConcurrentSkipListMap.java852 int rnd = ThreadLocalRandom.nextSecondarySeed(); in doPut() local
853 if ((rnd & 0x80000001) == 0) { // test highest and lowest bits in doPut()
855 while (((rnd >>>= 1) & 1) != 0) in doPut()
1376 int rnd = ThreadLocalRandom.current().nextInt(); in buildFromSorted() local
1378 if ((rnd & 0x80000001) == 0) { in buildFromSorted()
1381 } while (((rnd >>>= 1) & 1) != 0); in buildFromSorted()
1481 int rnd = ThreadLocalRandom.current().nextInt(); in readObject() local
1483 if ((rnd & 0x80000001) == 0) { in readObject()
1486 } while (((rnd >>>= 1) & 1) != 0); in readObject()
/libcore/support/src/test/java/tests/resources/x509/
Ddefault.cnf57 RANDFILE = $ENV::HOME/.rnd
/libcore/ojluni/annotations/sdk/nullability/java/util/
DCollections.annotated.java50 …til.NonNull java.util.List<?> list, @libcore.util.NonNull java.util.Random rnd) { throw new Runtim… in shuffle() argument

12