Home
last modified time | relevance | path

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

123

/cts/hostsidetests/compilation/app/src/android/cts/compilation/
DCompilationTargetActivity.java82 int v = dispatch(random.nextInt()); in makeValues()
199 public int m0() { return new Random(0).nextInt(); } in m0()
200 public int m1() { return new Random(1).nextInt(); } in m1()
201 public int m2() { return new Random(2).nextInt(); } in m2()
202 public int m3() { return new Random(3).nextInt(); } in m3()
203 public int m4() { return new Random(4).nextInt(); } in m4()
204 public int m5() { return new Random(5).nextInt(); } in m5()
205 public int m6() { return new Random(6).nextInt(); } in m6()
206 public int m7() { return new Random(7).nextInt(); } in m7()
207 public int m8() { return new Random(8).nextInt(); } in m8()
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/
DRSUtils.java80 int exponent = minExponent + r.nextInt(maxExponent - minExponent); in genRandomDoubles()
81 int sign = (min >= 0) ? 1 : 1 - r.nextInt(2) * 2; // -1 or 1 in genRandomDoubles()
99 array[r.nextInt(array.length)] = d; in genRandomDoubles()
102 array[r.nextInt(array.length)] = min; in genRandomDoubles()
103 array[r.nextInt(array.length)] = max; in genRandomDoubles()
105 array[r.nextInt(array.length)] = Double.NaN; in genRandomDoubles()
106 array[r.nextInt(array.length)] = Double.POSITIVE_INFINITY; in genRandomDoubles()
107 array[r.nextInt(array.length)] = Double.NEGATIVE_INFINITY; in genRandomDoubles()
108 array[r.nextInt(array.length)] = Double.MIN_VALUE; in genRandomDoubles()
109 array[r.nextInt(array.length)] = Double.MIN_NORMAL; in genRandomDoubles()
[all …]
DAtomicTest.java267 mSrcData[r.nextInt(mSrcData.length)] = ~0x40000000; in testAnd()
268 mSrcData[r.nextInt(mSrcData.length)] = ~0x10000000; in testAnd()
269 mSrcData[r.nextInt(mSrcData.length)] = ~0x02000000; in testAnd()
270 mSrcData[r.nextInt(mSrcData.length)] = ~0x00c00000; in testAnd()
271 mSrcData[r.nextInt(mSrcData.length)] = ~0x00010000; in testAnd()
272 mSrcData[r.nextInt(mSrcData.length)] = ~0x00080000; in testAnd()
273 mSrcData[r.nextInt(mSrcData.length)] = ~0x00001000; in testAnd()
274 mSrcData[r.nextInt(mSrcData.length)] = ~0x00000200; in testAnd()
275 mSrcData[r.nextInt(mSrcData.length)] = ~0x0000000f; in testAnd()
300 mSrcData[r.nextInt(mSrcData.length)] = ~0x40000000; in testUAnd()
[all …]
DAllocationCopyToTest.java29 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Byte()
39 int offset = random.nextInt(arr_len); in test_Allocationcopy1DRangeTo_Byte()
63 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Short_Helper()
70 inArray[i] = (short)random.nextInt(); in test_Allocationcopy1DRangeTo_Short_Helper()
76 int offset = random.nextInt(arr_len); in test_Allocationcopy1DRangeTo_Short_Helper()
111 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Int()
118 inArray[i] = random.nextInt(); in test_Allocationcopy1DRangeTo_Int()
124 int offset = random.nextInt(arr_len); in test_Allocationcopy1DRangeTo_Int()
148 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Float()
161 int offset = random.nextInt(arr_len); in test_Allocationcopy1DRangeTo_Float()
[all …]
DrsAllocationCopyTest.java29 int width = random.nextInt(512); in test_rsAllocationCopy1D_Byte()
31 int offset = random.nextInt(arr_len); in test_rsAllocationCopy1D_Byte()
32 int count = random.nextInt(arr_len - offset); in test_rsAllocationCopy1D_Byte()
74 int width = random.nextInt(512); in test_rsAllocationCopy1D_Short()
76 int offset = random.nextInt(arr_len); in test_rsAllocationCopy1D_Short()
77 int count = random.nextInt(arr_len - offset); in test_rsAllocationCopy1D_Short()
82 inArray[i] = (short)random.nextInt(); in test_rsAllocationCopy1D_Short()
121 int width = random.nextInt(512); in test_rsAllocationCopy1D_Int()
123 int offset = random.nextInt(arr_len); in test_rsAllocationCopy1D_Int()
124 int count = random.nextInt(arr_len - offset); in test_rsAllocationCopy1D_Int()
[all …]
DAllocationCopyPaddedTest.java27 int width = random.nextInt(128);; in test_AllocationPadded_Byte3_1D()
54 int width = random.nextInt(128); in test_AllocationPadded_Byte3_2D()
55 int height = random.nextInt(128); in test_AllocationPadded_Byte3_2D()
82 int w = random.nextInt(32); in test_AllocationPadded_Byte3_3D()
83 int h = random.nextInt(32); in test_AllocationPadded_Byte3_3D()
84 int d = random.nextInt(32); in test_AllocationPadded_Byte3_3D()
111 int width = random.nextInt(512); in test_AllocationPadded_Short3_1D_Helper()
118 inArray[i] = (short)random.nextInt(); in test_AllocationPadded_Short3_1D_Helper()
146 int width = random.nextInt(128); in test_AllocationPadded_Short3_2D_Helper()
147 int height = random.nextInt(128); in test_AllocationPadded_Short3_2D_Helper()
[all …]
DAllocationByteBufferTest.java62 int posX = r.nextInt(dimX); in testByteBufferHelper()
63 int posY = r.nextInt(dimY); in testByteBufferHelper()
73 int dimX = r.nextInt(MAX_DIM) + 1; in testByteBufferHelper1D()
79 int dimX = r.nextInt(MAX_DIM) + 1; in testByteBufferHelper2D()
80 int dimY = r.nextInt(MAX_DIM) + 2; //Make sure dimY is larger than 1; in testByteBufferHelper2D()
87 int dimX = r.nextInt(MAX_DIM) + 1; in test1DWrite()
106 int dimX = r.nextInt(MAX_DIM) + 1; in test2DWrite()
107 int dimY = r.nextInt(MAX_DIM) + 2; //Make sure dimY is larger than 1; in test2DWrite()
DIntrinsicLut.java40 mRed[ct] = (short)r.nextInt(256); in createTest()
41 mGreen[ct] = (short)r.nextInt(256); in createTest()
42 mBlue[ct] = (short)r.nextInt(256); in createTest()
43 mAlpha[ct] = (short)r.nextInt(256); in createTest()
DSendToClientBlockingTest.java57 int id = random.nextInt(10); in testSendToClientBlocking1Params()
75 int id = random.nextInt(10); in testSendToClientBlocking3Params()
76 int data = random.nextInt(); in testSendToClientBlocking3Params()
DAllocationCopy2DRangeTest.java32 int width = random.nextInt(512); in testAllocationCopy2DRange()
33 int height = random.nextInt(512); in testAllocationCopy2DRange()
39 inArray[i] = random.nextInt(); in testAllocationCopy2DRange()
DIntrinsic3DLut.java54 v |= r.nextInt(0x100); in genCubeRand()
55 v |= r.nextInt(0x100) << 8; in genCubeRand()
56 v |= r.nextInt(0x100) << 16; in genCubeRand()
DSendToClient.java55 inArray[i] = random.nextInt(1000); in testSendToClient()
80 int Id = random.nextInt(100); in testSendToClient1()
DGetAllocationTest.java30 tempArray[i] = random.nextInt(); in testGetAllocation()
DAllocationResize.java50 inArray[i] = random.nextInt(); in testResize()
/cts/tests/tests/renderscriptlegacy/src/android/renderscriptlegacy/cts/
DRSUtils.java58 int exponent = minExponent + r.nextInt(maxExponent - minExponent); in genRandomDoubles()
59 int sign = (min >= 0) ? 1 : 1 - r.nextInt(2) * 2; // -1 or 1 in genRandomDoubles()
77 array[r.nextInt(array.length)] = d; in genRandomDoubles()
80 array[r.nextInt(array.length)] = min; in genRandomDoubles()
81 array[r.nextInt(array.length)] = max; in genRandomDoubles()
83 array[r.nextInt(array.length)] = Double.NaN; in genRandomDoubles()
84 array[r.nextInt(array.length)] = Double.POSITIVE_INFINITY; in genRandomDoubles()
85 array[r.nextInt(array.length)] = Double.NEGATIVE_INFINITY; in genRandomDoubles()
86 array[r.nextInt(array.length)] = Double.MIN_VALUE; in genRandomDoubles()
87 array[r.nextInt(array.length)] = Double.MIN_NORMAL; in genRandomDoubles()
[all …]
/cts/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/
DRootProcessScanner.java112 if (scanner.nextInt() != 0) { in isKernelProcess()
208 int realUid = scanner.nextInt(); in hasRootId()
209 int effectiveUid = scanner.nextInt(); in hasRootId()
210 int savedSetUid = scanner.nextInt(); in hasRootId()
211 int fileSystemUid = scanner.nextInt(); in hasRootId()
/cts/tests/tests/rscpp/src/android/cts/rscpp/
DRSUtils.java52 array[i] = (r.nextInt(max) * factor + offset); in genRandom()
64 array[i * stride + j] = r.nextInt() * factor + offset; in genRandom()
77 array[i * stride + j] = r.nextInt(max) * factor + offset; in genRandom()
DRSYuvTest.java57 by[i] = (byte)r.nextInt(256); in makeYuvBuffer()
60 bu[i] = (byte)r.nextInt(256); in makeYuvBuffer()
63 bv[i] = (byte)r.nextInt(256); in makeYuvBuffer()
/cts/tests/tests/media/src/android/media/cts/
DMediaPlayerFlakyNetworkTest.java128 return videos[random.nextInt(videos.length)]; in getRandomTestVideo()
152 Thread.sleep(random.nextInt(500)); in doAsyncPrepareAndRelease()
165 Thread.sleep(random.nextInt(100)); in doRandomOperations()
166 switch (random.nextInt(3)) { in doRandomOperations()
176 mMediaPlayer.seekTo(random.nextInt(10000)); in doRandomOperations()
331 int sleepTimeMs = 1000 + mRandom.nextInt(5000); in createSessionOutputBuffer()
DMediaRandomTest.java207 mAction = (int)(r.nextInt() % 12); in testPlayerRandomAction()
208 mParam = (int)(r.nextInt() % 1000000); in testPlayerRandomAction()
296 mAction = (int)(r.nextInt(14)); in testRecorderRandomAction()
297 mParam = (int)(r.nextInt(1000000)); in testRecorderRandomAction()
/cts/tests/tests/keystore/src/android/keystore/cts/
DCountingSecureRandom.java92 public int nextInt() { in nextInt() method in CountingSecureRandom
97 public int nextInt(int n) { in nextInt() method in CountingSecureRandom
/cts/tests/tests/util/src/android/util/cts/
DJsonReaderTest.java206 assertEquals(1, reader.nextInt()); in testIntegersWithFractionalPartSpecified()
287 assertEquals(33333, reader.nextInt()); in testBufferBoundary()
300 assertEquals(33333, reader.nextInt()); in testTruncatedBufferBoundary()
346 assertEquals(0, reader.nextInt()); in testLongs()
349 assertEquals(1, reader.nextInt()); in testLongs()
352 assertEquals(-1, reader.nextInt()); in testLongs()
355 reader.nextInt(); in testLongs()
361 reader.nextInt(); in testLongs()
447 reader.nextInt(); in testNumberWithOctalPrefix()
941 reader.nextInt(); in testFailWithPosition()
/cts/tests/tests/hardware/src/android/hardware/cts/
DSensorIntegrationTests.java265 switch(mGenerator.nextInt(5)) { in generateSamplingRateInUs()
272 rate = maxSamplingRate * mGenerator.nextInt(10); in generateSamplingRateInUs()
278 long reportLatencyUs = TimeUnit.SECONDS.toMicros(mGenerator.nextInt(5) + 1); in generateReportLatencyInUs()
/cts/tests/tests/content/src/android/content/cts/
DSharedPreferencesTest.java249 String key = new Integer(rand.nextInt(25)).toString(); in testTorture()
253 if (rand.nextInt(100) < 85) { in testTorture()
264 if (rand.nextInt(100) < 85) { in testTorture()
290 String key = new Integer(rand.nextInt(25)).toString(); in testTorture2()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/
DPolicySerializationTestActivity.java403 int index = random.nextInt(passwordQualities.length); in getRandomExpectedValue()
443 return random.nextInt(50); in getRandomExpectedValue()
467 return random.nextInt(50); in getRandomExpectedValue()
490 return (long)(1000 + random.nextInt(60 * 60 * 1000)); in getRandomExpectedValue()

123