Home
last modified time | relevance | path

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

1234567

/external/guava/guava-tests/test/com/google/common/hash/
DHashTestUtils.java101 int value = random.nextInt(); in PUT_BYTE()
109 short value = (short) random.nextInt(); in PUT_SHORT()
117 char value = (char) random.nextInt(); in PUT_CHAR()
125 int value = random.nextInt(); in PUT_INT()
157 byte[] value = new byte[random.nextInt(128)]; in PUT_BYTES()
166 byte[] value = new byte[random.nextInt(128)]; in PUT_BYTES_INT_INT()
168 int off = random.nextInt(value.length + 1); in PUT_BYTES_INT_INT()
169 int len = random.nextInt(value.length - off + 1); in PUT_BYTES_INT_INT()
177 char[] value = new char[random.nextInt(128)]; in PUT_STRING()
179 value[i] = (char) random.nextInt(); in PUT_STRING()
[all …]
/external/smali/smalidea/src/test/java/org/jf/smalidea/
DSmaliLexerTest.java179 int type = random.nextInt(10); in randomString()
184 randomCodepoint = random.nextInt(); in randomString()
190 randomChar = (char)random.nextInt(2^16); in randomString()
194 sb.append((char)random.nextInt(256)); in randomString()
198 sb.append((char)random.nextInt(128)); in randomString()
/external/owasp/sanitizer/src/tests/org/owasp/html/
DHtmlSanitizerFuzzerTest.java80 for (int fuzz = 1 + rnd.nextInt(25); --fuzz >= 0;) { in testFuzzHtmlParser()
82 fuzzyHtml0[rnd.nextInt(length)] = (char) rnd.nextInt(0x10000); in testFuzzHtmlParser()
85 int s0 = rnd.nextInt(length - 1); in testFuzzHtmlParser()
87 int e0 = s0 + (int) (rnd.nextInt(length - s0) * d); in testFuzzHtmlParser()
90 int s1 = rnd.nextInt(length - 1); in testFuzzHtmlParser()
92 int e1 = s1 + (int) (rnd.nextInt(length - s1) * d); in testFuzzHtmlParser()
DHtmlPolicyBuilderFuzzerTest.java97 int r = rnd.nextInt(3); in testFuzzedOutput()
102 for (int k = rnd.nextInt(4); --k >= 0;) { in testFuzzedOutput()
163 return choices[rnd.nextInt(choices.length)]; in pick()
171 start = rnd.nextInt(end - 1); in pickChunk()
174 end = start + rnd.nextInt(end - start); in pickChunk()
/external/guava/guava-tests/test/com/google/common/collect/
DConcurrentHashMultisetBasherTest.java118 int keyIndex = random.nextInt(nKeys); in call()
120 Operation op = operations[random.nextInt(operations.length)]; in call()
123 int delta = random.nextInt(10); in call()
129 int newValue = random.nextInt(3); in call()
135 int newValue = random.nextInt(3); in call()
143 int delta = random.nextInt(6); // [0, 5] in call()
149 int delta = random.nextInt(5); // [0, 4] in call()
/external/slf4j/slf4j-migrator/src/test/java/org/slf4j/migrator/helper/
DRandomHelper.java41 int offset = random.nextInt(26); in randomString()
48 int nextInt(int n) { in nextInt() method in RandomHelper
49 return random.nextInt(n); in nextInt()
59 currentNodeLength = random.nextInt(MAX_NODE_LENGTH) + 1; in buildRandomFileName()
DAbbreviatorTest.java101 int fixedLen = rh.nextInt(MAX_RANDOM_FIXED_LEN); in testTheories()
103 int averageLen = rh.nextInt(MAX_RANDOM_AVG_LEN) + 3; in testTheories()
106 int maxLen = rh.nextInt(MAX_RANDOM_MAX_LEN) + fixedLen; in testTheories()
111 int targetLen = (maxLen / 2) + rh.nextInt(maxLen / 2) + 1; in testTheories()
/external/apache-commons-math/src/main/java/org/apache/commons/math/random/
DRandomAdaptor.java142 public int nextInt() { in nextInt() method in RandomAdaptor
143 return randomGenerator.nextInt(); in nextInt()
158 public int nextInt(int n) { in nextInt() method in RandomAdaptor
159 return randomGenerator.nextInt(n); in nextInt()
DAbstractRandomGenerator.java109 int randInt = nextInt(); in nextBytes()
136 public int nextInt() { in nextInt() method in AbstractRandomGenerator
156 public int nextInt(int n) { in nextInt() method in AbstractRandomGenerator
DRandomGenerator.java78 int nextInt(); in nextInt() method
91 int nextInt(int n); in nextInt() method
/external/icu/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/
DUnicodeMapTest.java113 switch(rand.nextInt(20)) { in TestAMonkey()
142 value = rand.nextInt(50)+50; in TestAMonkey()
160 max = rand.nextInt(max); in fillRandomMap()
162 test.put(getRandomKey(rand), rand.nextInt(50)+50); in fillRandomMap()
232 int r = rand.nextInt(30); in getRandomKey()
251 String value = values[random.nextInt(values.length)]; in TestModify()
252 int start = random.nextInt(MODIFY_TEST_LIMIT); // test limited range in TestModify()
253 int end = random.nextInt(MODIFY_TEST_LIMIT); in TestModify()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/translit/
DUnicodeMapTest.java117 switch(rand.nextInt(20)) { in TestAMonkey()
146 value = rand.nextInt(50)+50; in TestAMonkey()
164 max = rand.nextInt(max); in fillRandomMap()
166 test.put(getRandomKey(rand), rand.nextInt(50)+50); in fillRandomMap()
236 int r = rand.nextInt(30); in getRandomKey()
255 String value = values[random.nextInt(values.length)]; in TestModify()
256 int start = random.nextInt(MODIFY_TEST_LIMIT); // test limited range in TestModify()
257 int end = random.nextInt(MODIFY_TEST_LIMIT); in TestModify()
/external/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/
DCollationMonkeyTest.java52 int s = rand.nextInt(0x7fff) % source.length(); in TestCollationKey()
53 int t = rand.nextInt(0x7fff) % source.length(); in TestCollationKey()
54 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
55 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
129 int s = rand.nextInt(0x7fff) % source.length(); in TestCompare()
130 int t = rand.nextInt(0x7fff) % source.length(); in TestCompare()
131 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
132 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
DCollationFrozenMonkeyTest.java67 int s = rand.nextInt(0x7fff) % source.length(); in TestCollationKey()
68 int t = rand.nextInt(0x7fff) % source.length(); in TestCollationKey()
69 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
70 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
157 int s = rand.nextInt(0x7fff) % source.length(); in TestCompare()
158 int t = rand.nextInt(0x7fff) % source.length(); in TestCompare()
159 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
160 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
DCollationCreationMethodTest.java55 x = r.nextInt(locales.length); in TestRuleVsLocaleCreationMonkey()
89 byte[] c = new byte[r.nextInt(maxCodePoints)*2]; //two bytes for each code point in generateNewString()
96 z = r.nextInt(0x7fff); //the code point... in generateNewString()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/collator/
DCollationMonkeyTest.java56 int s = rand.nextInt(0x7fff) % source.length(); in TestCollationKey()
57 int t = rand.nextInt(0x7fff) % source.length(); in TestCollationKey()
58 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
59 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
133 int s = rand.nextInt(0x7fff) % source.length(); in TestCompare()
134 int t = rand.nextInt(0x7fff) % source.length(); in TestCompare()
135 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
136 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
DCollationFrozenMonkeyTest.java71 int s = rand.nextInt(0x7fff) % source.length(); in TestCollationKey()
72 int t = rand.nextInt(0x7fff) % source.length(); in TestCollationKey()
73 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
74 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
161 int s = rand.nextInt(0x7fff) % source.length(); in TestCompare()
162 int t = rand.nextInt(0x7fff) % source.length(); in TestCompare()
163 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
164 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
DCollationCreationMethodTest.java59 x = r.nextInt(locales.length); in TestRuleVsLocaleCreationMonkey()
93 byte[] c = new byte[r.nextInt(maxCodePoints)*2]; //two bytes for each code point in generateNewString()
100 z = r.nextInt(0x7fff); //the code point... in generateNewString()
/external/guava/guava-tests/test/com/google/common/math/
DMathBenchmarking.java67 int digits = RANDOM_SOURCE.nextInt(numBits); in randomNonNegativeBigInteger()
111 result = Math.scalb(result, RANDOM_SOURCE.nextInt(maxExponent + 1)); in randomDouble()
119 return RANDOM_SOURCE.nextInt(MAX_EXPONENT + 1); in randomExponent()
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DAtomicLongMapTest.java204 long addend = random.nextInt(MAX_ADDEND); in testAddAndGet()
221 long value = random.nextInt(MAX_ADDEND); in testAddAndGet_zero()
239 long addend = random.nextInt(MAX_ADDEND); in testGetAndAdd()
256 long value = random.nextInt(MAX_ADDEND); in testGetAndAdd_zero()
274 long newValue = random.nextInt(MAX_ADDEND); in testPut()
291 long value = random.nextInt(MAX_ADDEND); in testPut_zero()
332 long newValue = random.nextInt(MAX_ADDEND); in testPutIfAbsent()
366 long value = random.nextInt(MAX_ADDEND); in testPutIfAbsent_zero()
384 long newValue = random.nextInt(MAX_ADDEND); in testReplace()
402 long value = random.nextInt(MAX_ADDEND); in testReplace_zero()
[all …]
/external/guava/guava-gwt/test-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/
DAtomicLongMapTest.java189 long addend = random.nextInt(MAX_ADDEND); in testAddAndGet()
206 long value = random.nextInt(MAX_ADDEND); in testAddAndGet_zero()
224 long addend = random.nextInt(MAX_ADDEND); in testGetAndAdd()
241 long value = random.nextInt(MAX_ADDEND); in testGetAndAdd_zero()
259 long newValue = random.nextInt(MAX_ADDEND); in testPut()
276 long value = random.nextInt(MAX_ADDEND); in testPut_zero()
317 long newValue = random.nextInt(MAX_ADDEND); in testPutIfAbsent()
351 long value = random.nextInt(MAX_ADDEND); in testPutIfAbsent_zero()
369 long newValue = random.nextInt(MAX_ADDEND); in testReplace()
387 long value = random.nextInt(MAX_ADDEND); in testReplace_zero()
[all …]
/external/apache-http/android/src/android/net/http/
DRequestHandle.java442 int nextInt = rand.nextInt(); in computeCnonce() local
443 nextInt = (nextInt == Integer.MIN_VALUE) ? in computeCnonce()
444 Integer.MAX_VALUE : Math.abs(nextInt); in computeCnonce()
445 return Integer.toString(nextInt, 16); in computeCnonce()
/external/guava/guava-tests/benchmark/com/google/common/math/
DBigIntegerMathBenchmark.java49 factorials[i] = RANDOM_SOURCE.nextInt(factorialBound); in setUp()
50 slowFactorials[i] = RANDOM_SOURCE.nextInt(factorialBound); in setUp()
51 binomials[i] = RANDOM_SOURCE.nextInt(factorials[i] + 1); in setUp()
DIntMathBenchmark.java47 factorial[i] = RANDOM_SOURCE.nextInt(50); in setUp()
48 binomial[i] = RANDOM_SOURCE.nextInt(factorial[i] + 1); in setUp()
51 ints[i] = RANDOM_SOURCE.nextInt(); in setUp()
/external/guava/guava-tests/benchmark/com/google/common/collect/
DBinaryTreeTraverserBenchmark.java55 rng.nextInt(), createTree(leftChildSize, rng), createTree(rightChildSize, rng))); in createTree()
64 root = Optional.of(new BinaryNode(rng.nextInt(), root, Optional.<BinaryNode>absent())); in createTree()
74 root = Optional.of(new BinaryNode(rng.nextInt(), Optional.<BinaryNode>absent(), root)); in createTree()
88 keys[i] = rng.nextInt(); in createTree()

1234567