Home
last modified time | relevance | path

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

123

/cts/hostsidetests/compilation/app/src/android/compilation/cts/
DCompilationTargetActivity.java82 int v = dispatch(random.nextInt()); in makeValues()
299 public int m0() { return new Random(0).nextInt(); } in m0()
300 public int m1() { return new Random(1).nextInt(); } in m1()
301 public int m2() { return new Random(2).nextInt(); } in m2()
302 public int m3() { return new Random(3).nextInt(); } in m3()
303 public int m4() { return new Random(4).nextInt(); } in m4()
304 public int m5() { return new Random(5).nextInt(); } in m5()
305 public int m6() { return new Random(6).nextInt(); } in m6()
306 public int m7() { return new Random(7).nextInt(); } in m7()
307 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 …]
DAllocationCopyToTest.java37 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Byte()
47 int offset = random.nextInt(arr_len); in test_Allocationcopy1DRangeTo_Byte()
71 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Short_Helper()
78 inArray[i] = (short)random.nextInt(); in test_Allocationcopy1DRangeTo_Short_Helper()
84 int offset = random.nextInt(arr_len); in test_Allocationcopy1DRangeTo_Short_Helper()
119 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Int()
126 inArray[i] = random.nextInt(); in test_Allocationcopy1DRangeTo_Int()
132 int offset = random.nextInt(arr_len); in test_Allocationcopy1DRangeTo_Int()
156 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Float()
169 int offset = random.nextInt(arr_len); in test_Allocationcopy1DRangeTo_Float()
[all …]
DAtomicTest.java281 mSrcData[r.nextInt(mSrcData.length)] = ~0x40000000; in testAnd()
282 mSrcData[r.nextInt(mSrcData.length)] = ~0x10000000; in testAnd()
283 mSrcData[r.nextInt(mSrcData.length)] = ~0x02000000; in testAnd()
284 mSrcData[r.nextInt(mSrcData.length)] = ~0x00c00000; in testAnd()
285 mSrcData[r.nextInt(mSrcData.length)] = ~0x00010000; in testAnd()
286 mSrcData[r.nextInt(mSrcData.length)] = ~0x00080000; in testAnd()
287 mSrcData[r.nextInt(mSrcData.length)] = ~0x00001000; in testAnd()
288 mSrcData[r.nextInt(mSrcData.length)] = ~0x00000200; in testAnd()
289 mSrcData[r.nextInt(mSrcData.length)] = ~0x0000000f; in testAnd()
314 mSrcData[r.nextInt(mSrcData.length)] = ~0x40000000; in testUAnd()
[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()
55 int width = random.nextInt(128); in test_AllocationPadded_Byte3_2D()
56 int height = random.nextInt(128); in test_AllocationPadded_Byte3_2D()
84 int w = random.nextInt(32); in test_AllocationPadded_Byte3_3D()
85 int h = random.nextInt(32); in test_AllocationPadded_Byte3_3D()
86 int d = random.nextInt(32); in test_AllocationPadded_Byte3_3D()
114 int width = random.nextInt(512); in test_AllocationPadded_Short3_1D_Helper()
121 inArray[i] = (short)random.nextInt(); in test_AllocationPadded_Short3_1D_Helper()
150 int width = random.nextInt(128); in test_AllocationPadded_Short3_2D_Helper()
151 int height = random.nextInt(128); in test_AllocationPadded_Short3_2D_Helper()
[all …]
DDebugContext.java121 Width = RN.nextInt(size/2)+size/2; in SetupAllocationCopyTests()
122 Height = RN.nextInt(size/2); in SetupAllocationCopyTests()
151 inArray[i] = (short)RN.nextInt(); in SetupAllocationCopyTests()
186 int Offset = AC.RN.nextInt(AC.Width); in testDebugContextRsAllocationCopy1D_Byte_Normal()
187 int Count = AC.RN.nextInt(AC.Width - Offset); in testDebugContextRsAllocationCopy1D_Byte_Normal()
230 int xOff = AC.RN.nextInt(AC.Width-AC.Height) + AC.Height; in testDebugContextRsAllocationCopy2D_Short_Normal()
231 int yOff = AC.RN.nextInt(AC.Height); in testDebugContextRsAllocationCopy2D_Short_Normal()
232 int xCount = AC.RN.nextInt(AC.Width - xOff); in testDebugContextRsAllocationCopy2D_Short_Normal()
233 int yCount = AC.RN.nextInt(AC.Height - yOff); in testDebugContextRsAllocationCopy2D_Short_Normal()
283 int Offset = AC.RN.nextInt(AC.Width); in testDebugContextRsAllocationCopy1D_Byte_BadSrcLOD()
[all …]
DAllocationByteBufferTest.java62 int posX = r.nextInt(dimX); in testByteBufferHelper()
63 int posY = r.nextInt(dimY); in testByteBufferHelper()
74 int dimX = r.nextInt(MAX_DIM) + 1; in testByteBufferHelper1D()
80 int dimX = r.nextInt(MAX_DIM) + 1; in testByteBufferHelper2D()
81 int dimY = r.nextInt(MAX_DIM) + 2; //Make sure dimY is larger than 1; in testByteBufferHelper2D()
88 int dimX = r.nextInt(MAX_DIM) + 1; in test1DWrite()
107 int dimX = r.nextInt(MAX_DIM) + 1; in test2DWrite()
108 int dimY = r.nextInt(MAX_DIM) + 2; //Make sure dimY is larger than 1; in test2DWrite()
DIntrinsicLut.java49 mRed[ct] = (short)r.nextInt(256); in createTest()
50 mGreen[ct] = (short)r.nextInt(256); in createTest()
51 mBlue[ct] = (short)r.nextInt(256); in createTest()
52 mAlpha[ct] = (short)r.nextInt(256); in createTest()
DSendToClientBlockingTest.java65 int id = random.nextInt(10); in testSendToClientBlocking1Params()
83 int id = random.nextInt(10); in testSendToClientBlocking3Params()
84 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()
DStructFieldTest.java34 innerOne.x = r.nextInt(); in makeInnerOne()
35 innerOne.y = r.nextInt(); in makeInnerOne()
42 innerTwo.z = (byte)r.nextInt(); in makeInnerTwo()
DIntrinsic3DLut.java68 v |= r.nextInt(0x100); in genCubeRand()
69 v |= r.nextInt(0x100) << 8; in genCubeRand()
70 v |= r.nextInt(0x100) << 16; in genCubeRand()
DSendToClient.java63 inArray[i] = random.nextInt(1000); in testSendToClient()
88 int Id = random.nextInt(100); in testSendToClient1()
/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/tests/tests/tools/processors/view_inspector/src/android/processor/view/inspector/cts/
DPlatformInspectableProcessorTest.java89 mValue = seed.nextInt(); in IntPropertyTest()
121 mValue = seed.nextInt(); in NamedPropertyTest()
170 mValueA = seed.nextInt(); in InferredPropertyNameTest()
171 mValueB = seed.nextInt(); in InferredPropertyNameTest()
172 mValueC = seed.nextInt(); in InferredPropertyNameTest()
243 mColorInt = seed.nextInt(); in ColorTest()
244 mColorLong = Color.pack(seed.nextInt()); in ColorTest()
245 mColorObject = Color.valueOf(seed.nextInt()); in ColorTest()
284 mColor = seed.nextInt(); in ValueTypeTest()
285 mGravity = seed.nextInt(); in ValueTypeTest()
[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/media/src/android/media/cts/
DMediaPlayerFlakyNetworkTest.java133 return videos[random.nextInt(videos.length)]; in getRandomTestVideo()
157 Thread.sleep(random.nextInt(500)); in doAsyncPrepareAndRelease()
170 Thread.sleep(random.nextInt(100)); in doRandomOperations()
171 switch (random.nextInt(3)) { in doRandomOperations()
181 mMediaPlayer.seekTo(random.nextInt(10000)); in doRandomOperations()
336 int sleepTimeMs = 1000 + mRandom.nextInt(5000); in createSessionOutputBuffer()
DMediaRandomTest.java214 mAction = (int)(r.nextInt() % 12); in testPlayerRandomAction()
215 mParam = (int)(r.nextInt() % 1000000); in testPlayerRandomAction()
303 mAction = (int)(r.nextInt(14)); in testRecorderRandomAction()
304 mParam = (int)(r.nextInt(1000000)); in testRecorderRandomAction()
/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/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.java217 assertEquals(1, reader.nextInt()); in testIntegersWithFractionalPartSpecified()
301 assertEquals(33333, reader.nextInt()); in testBufferBoundary()
315 assertEquals(33333, reader.nextInt()); in testTruncatedBufferBoundary()
364 assertEquals(0, reader.nextInt()); in testLongs()
367 assertEquals(1, reader.nextInt()); in testLongs()
370 assertEquals(-1, reader.nextInt()); in testLongs()
373 reader.nextInt(); in testLongs()
379 reader.nextInt(); in testLongs()
471 reader.nextInt(); in testNumberWithOctalPrefix()
989 reader.nextInt(); in verifyFailWithPosition()
/cts/tests/tests/content/src/android/content/cts/
DSharedPreferencesTest.java255 String key = new Integer(rand.nextInt(25)).toString(); in testTorture()
259 if (rand.nextInt(100) < 85) { in testTorture()
270 if (rand.nextInt(100) < 85) { in testTorture()
296 String key = new Integer(rand.nextInt(25)).toString(); in testTorture2()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/biometrics/
DBiometricTest.java280 mRandomTitle = String.valueOf(random.nextInt(1000)); in showInstructionDialogForStringsTest()
281 mRandomSubtitle = String.valueOf(random.nextInt(1000)); in showInstructionDialogForStringsTest()
282 mRandomDescription = String.valueOf(random.nextInt(1000)); in showInstructionDialogForStringsTest()
283 mRandomNegativeButtonText = String.valueOf(random.nextInt(1000)); in showInstructionDialogForStringsTest()

123