Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 734) sorted by relevance

12345678910>>...30

/cts/tests/tests/renderscript/src/android/renderscript/cts/
DRSUtils.java78 for (int i = 0; i < array.length; i++) { in genRandomDoubles()
90 for (int i = 0; i < array.length; i++) { in genRandomDoubles()
96 for (int i = 0; i < sInterestingDoubles.length; i++) { 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()
[all …]
DAtomicTest.java114 for (int i=0; i < mSrcData.length; i++) { in testAdd()
128 for (int i=0; i < mSrcData.length; i++) { in testUAdd()
142 for (int i=0; i < mSrcData.length; i++) { in testSub()
156 for (int i=0; i < mSrcData.length; i++) { in testUSub()
170 for (int i=0; i < mSrcData.length; i++) { in testXor()
184 for (int i=0; i < mSrcData.length; i++) { in testUXor()
264 for (int j = 0; j < mSrcData.length; j++) { in testAnd()
267 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()
[all …]
/cts/tests/tests/renderscriptlegacy/src/android/renderscriptlegacy/cts/
DRSUtils.java56 for (int i = 0; i < array.length; i++) { in genRandomDoubles()
68 for (int i = 0; i < array.length; i++) { in genRandomDoubles()
74 for (int i = 0; i < sInterestingDoubles.length; i++) { 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()
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DDigitsKeyListenerTest.java62 assertNull(digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
63 dest, 0, dest.length())); in testFilter1()
67 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
68 dest, 0, dest.length())).toString()); in testFilter1()
72 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
73 dest, 0, dest.length())).toString()); in testFilter1()
77 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
78 dest, 0, dest.length())).toString()); in testFilter1()
83 spannableSource.setSpan(what, 0, spannableSource.length(), Spanned.SPAN_POINT_POINT); in testFilter1()
85 0, spannableSource.length(), dest, 0, dest.length()); in testFilter1()
[all …]
/cts/tests/tests/text/src/android/text/cts/
DLoginFilterTest.java45 assertNull(loginFilter.filter(source1, 0, source1.length(), dest1, 0, dest1.length())); in testFilter()
51 assertNull(loginFilter.filter(source1, 0, source1.length(), dest2, 5, 6)); in testFilter()
57 assertNull(loginFilter.filter(source2, 0, source2.length(), in testFilter()
58 dest1, 0, dest1.length())); in testFilter()
64 assertNull(loginFilter.filter(spannedSource, 0, spannedSource.length(), in testFilter()
65 dest1, 0, dest1.length())); in testFilter()
71 result = loginFilter.filter(source2, 0, source2.length(), dest1, 0, dest1.length()); in testFilter()
79 result = loginFilter.filter(spannedSource, 0, spannedSource.length(), in testFilter()
80 dest1, 0, dest1.length()); in testFilter()
87 loginFilter.filter(null, 0, source1.length(), dest1, 0, dest1.length()); in testFilter()
[all …]
DTextUtilsTest.java148 string1.setSpan(urlSpan, 0, string1.length() - 1, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testConcat()
150 string2.setSpan(bgColorSpan, 0, string2.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testConcat()
155 Object spans[] = strResult.getSpans(0, strResult.length(), Object.class); in testConcat()
156 assertEquals(2, spans.length); in testConcat()
162 assertEquals(string1.length() - 1, strResult.getSpanEnd(urlSpan)); in testConcat()
163 assertEquals(string1.length() + comma.length(), strResult.getSpanStart(bgColorSpan)); in testConcat()
164 assertEquals(strResult.length() - 1, strResult.getSpanEnd(bgColorSpan)); in testConcat()
184 int midPos = source1.length() / 2; in testCopySpansFrom()
190 source1.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCopySpansFrom()
194 TextUtils.copySpansFrom(source1, 0, source1.length(), Object.class, dest1, 0); in testCopySpansFrom()
[all …]
DHtmlTest.java65 assertEquals(expectLen, spans.length); in assertSingleTagOnWhileString()
85 assertEquals(spansLen, spans.length); in assertBadHtml()
102 ForegroundColorSpan[] colors = s.getSpans(0, s.length(), type); in testColor()
106 colors = s.getSpans(0, s.length(), type); in testColor()
110 colors = s.getSpans(0, s.length(), type); in testColor()
111 assertEquals(0, colors.length); in testColor()
115 colors = s.getSpans(0, s.length(), type); in testColor()
119 colors = s.getSpans(0, s.length(), type); in testColor()
123 colors = s.getSpans(0, s.length(), type); in testColor()
127 colors = s.getSpans(0, s.length(), type); in testColor()
[all …]
DSpannableStringBuilderSpanTest.java58 positionSet.addPosition(original.length() / 3); in replace()
59 positionSet.addPosition(2 * original.length() / 3); in replace()
60 positionSet.addPosition(original.length()); in replace()
64 replPositionSet.addPosition(replacement.length() / 3); in replace()
65 replPositionSet.addPosition(2 * replacement.length() / 3); in replace()
66 replPositionSet.addPosition(replacement.length()); in replace()
103 subReplacement + original.substring(replaceEnd, original.length()); in replaceWithSpanFlag()
119 checkSpanPositions(originalSpannable, replaceStart, replaceEnd, subReplacement.length(), in replaceWithSpanFlag()
263 for (int i = 0; i < addedSpans.length; i++) { in checkReplacementSpanPositions()
365 mPositionSet.addPosition((rangeEnd + spannable.length()) / 2); in initSpans()
[all …]
DAlteredCharSequenceTest.java32 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testCharAt()
48 mAlteredCharSequence.charAt(mAlteredCharSequence.length() + 1); in testCharAt()
62 mAlteredCharSequence = AlteredCharSequence.make(SOURCE_STR, sub, 0, sub.length); in testGetChars()
93 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testLength()
94 assertEquals(source.length(), mAlteredCharSequence.length()); in testLength()
103 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testMake()
109 mAlteredCharSequence = AlteredCharSequence.make(spanned, sub, 0, sub.length); in testMake()
111 assertEquals(0, mAlteredCharSequence.length()); in testMake()
121 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testSubSequence()
136 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testToString()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DUtil.java50 public static Complex[] padZeros(Complex[] data, int length) { in padZeros() argument
51 Complex[] result = new Complex[length]; in padZeros()
52 if (length < data.length) { in padZeros()
53 System.arraycopy(data, 0, result, 0, length); in padZeros()
55 System.arraycopy(data, 0, result, 0, data.length); in padZeros()
56 for (int i = data.length; i < result.length; i++) { in padZeros()
68 int n = nextPowerOfTwo(Math.max(data1.length, data2.length)); in computeCrossCorrelation()
76 double[] resultDouble = new double[resultComplex.length]; in computeCrossCorrelation()
77 for (int i = 0; i < resultComplex.length; i++) { in computeCrossCorrelation()
87 double[] result = new double[data.length]; in toDouble()
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/
DXmpDepthDecode.java47 XMP_EXTENSION_HEADER.length() + 32 + 1; // 32 byte GUID + 1 byte null termination.
139 public int length; field in XmpDepthDecode.Section
235 section.length = -1; in parse()
237 is.read(section.data, 0, section.data.length); in parse()
247 int length = lh << 8 | ll; in parse() local
249 sections.add(readSection(is, length, marker, skipExtendedContent)); in parse()
253 is.skip(length - 2); in parse()
279 if (data.length < header.length()) { in hasHeader()
283 byte[] buffer = new byte[header.length()]; in hasHeader()
284 System.arraycopy(data, 0, buffer, 0, header.length()); in hasHeader()
[all …]
/cts/hostsidetests/dumpsys/src/android/dumpsys/cts/
DDumpsysHostTest.java61 assertTrue(procstats.length() > 0); in testProcstatsOutput()
84 assertEquals(2, parts.length); in testProcstatsOutput()
131 assertTrue("Expected 5 or 6, found: " + parts.length, in checkPeriod()
132 parts.length == 5 || parts.length == 6); in checkPeriod()
137 if (parts.length == 6) { in checkPeriod()
146 assertTrue(parts.length >= 4); in checkPkgProc()
152 assertTrue(parts.length >= 5); in checkPkgProc()
160 for (int i = statesStartIndex; i < parts.length; i++) { in checkPkgProc()
162 assertEquals(2, subparts.length); in checkPkgProc()
169 assertEquals(hasProcess ? 3 : 2, tag.length()); in checkTag()
[all …]
/cts/common/util/src/com/android/compatibility/common/util/
DStat.java55 for (int i = 1; i < data.length; i++) { in getStat()
64 average /= data.length; in getStat()
66 for (int i = 0; i < data.length; i++) { in getStat()
70 double variance = sumOfSquares / (data.length - 1); in getStat()
72 return new StatResult(average, min, max, stddev, data.length); in getStat()
81 double[] dataCopied = Arrays.copyOf(data, data.length); in getStatWithOutlierRejection()
83 int medianIndex = dataCopied.length / 2; in getStatWithOutlierRejection()
85 if (dataCopied.length % 2 == 1) { in getStatWithOutlierRejection()
93 double[] validData = new double[data.length]; in getStatWithOutlierRejection()
95 for (int i = 0; i < data.length; i++) { in getStatWithOutlierRejection()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hcef/
DHceFReaderActivity.java59 byte length = (byte) (2 + nfcid2.length + payload.length); in createEchoCommand()
61 byte[] echo_cmd = new byte[length]; in createEchoCommand()
62 echo_cmd[0] = length; in createEchoCommand()
64 System.arraycopy(nfcid2, 0, echo_cmd, 2, nfcid2.length); in createEchoCommand()
65 System.arraycopy(payload, 0, echo_cmd, 2 + nfcid2.length, payload.length); in createEchoCommand()
70 byte[] cmd = new byte[2 + nfcid2.length]; in createSuccessCommand()
71 cmd[0] = (byte) (2 + nfcid2.length); in createSuccessCommand()
73 System.arraycopy(nfcid2, 0, cmd, 2, nfcid2.length); in createSuccessCommand()
81 if (resp[0] != resp.length) return false; in verifyResponse()
82 if (resp.length != cmd.length) return false; in verifyResponse()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DPaintTest.java74 float[] widths = new float[text.length()]; in testBreakText()
75 assertEquals(text.length(), p.getTextWidths(text, widths)); in testBreakText()
78 for (int i = 0; i < text.length(); i++) { in testBreakText()
83 for (int i = 0; i < text.length(); i++) { in testBreakText()
127 float[] emojiWidths = new float[emoji.length()]; in testBreakText()
128 assertEquals(emoji.length(), p.getTextWidths(emoji, emojiWidths)); in testBreakText()
171 for (int i = 0; i < measured.length; i++) { in assertBreakText()
860 float[] widths = new float[text.length()];
884 p.getTextBounds(text1, 0, text1.length(), bounds1); in testGetTextBounds()
886 p.getTextBounds(textChars1, 0, textChars1.length, bounds2); in testGetTextBounds()
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/generated/
DTestLength.rs24 return length(inV);
28 return length(inV);
32 return length(inV);
36 return length(inV);
40 return length(inV);
44 return length(inV);
48 return length(inV);
52 return length(inV);
/cts/tests/tests/text/src/android/text/util/cts/
DLinkifyTest.java61 for (int i = 0, size = matchingRegion.length(); i < size; i++) {
92 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1()
93 assertEquals(4, spans.length); in testAddLinks1()
100 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1()
101 assertEquals(1, spans.length); in testAddLinks1()
120 URLSpan[] spans = ((Spannable)tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinks2()
121 assertEquals(1, spans.length); in testAddLinks2()
127 spans = ((Spannable)tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinks2()
128 assertEquals(1, spans.length); in testAddLinks2()
147 URLSpan[] spans = ((Spannable) tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinks3()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/
DDualNonPaymentEmulatorActivity.java34 … CommandApdu[] commandSequences = new CommandApdu[TransportService2.APDU_COMMAND_SEQUENCE.length + in buildReaderIntent()
35 AccessService.APDU_COMMAND_SEQUENCE.length]; in buildReaderIntent()
37 TransportService2.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
39 TransportService2.APDU_COMMAND_SEQUENCE.length, in buildReaderIntent()
40 AccessService.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
42 String[] responseSequences = new String[TransportService2.APDU_RESPOND_SEQUENCE.length + in buildReaderIntent()
43 AccessService.APDU_RESPOND_SEQUENCE.length]; in buildReaderIntent()
45 TransportService2.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
47 TransportService2.APDU_RESPOND_SEQUENCE.length, in buildReaderIntent()
48 AccessService.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
DOnAndOffHostEmulatorActivity.java35 … CommandApdu[] commandSequences = new CommandApdu[OffHostService.APDU_COMMAND_SEQUENCE.length + in buildReaderIntent()
36 AccessService.APDU_COMMAND_SEQUENCE.length]; in buildReaderIntent()
38 OffHostService.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
40 OffHostService.APDU_COMMAND_SEQUENCE.length, in buildReaderIntent()
41 AccessService.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
43 String[] responseSequences = new String[OffHostService.APDU_RESPOND_SEQUENCE.length + in buildReaderIntent()
44 AccessService.APDU_RESPOND_SEQUENCE.length]; in buildReaderIntent()
46 OffHostService.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
48 OffHostService.APDU_RESPOND_SEQUENCE.length, in buildReaderIntent()
49 AccessService.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
DDualNonPaymentPrefixEmulatorActivity.java44 …andApdu[] commandSequences = new CommandApdu[PrefixTransportService1.APDU_COMMAND_SEQUENCE.length + in buildReaderIntent()
45 PrefixAccessService.APDU_COMMAND_SEQUENCE.length]; in buildReaderIntent()
47 PrefixTransportService1.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
49 PrefixTransportService1.APDU_COMMAND_SEQUENCE.length, in buildReaderIntent()
50 PrefixAccessService.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
52 … String[] responseSequences = new String[PrefixTransportService1.APDU_RESPOND_SEQUENCE.length + in buildReaderIntent()
53 PrefixAccessService.APDU_RESPOND_SEQUENCE.length]; in buildReaderIntent()
55 PrefixTransportService1.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
57 PrefixTransportService1.APDU_RESPOND_SEQUENCE.length, in buildReaderIntent()
58 PrefixAccessService.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
/cts/tools/cfassembler/src/dxconvext/util/
DFileUtils.java66 long longLength = file.length(); in readFile()
67 int length = (int) longLength; in readFile() local
68 if (length != longLength) { in readFile()
72 byte[] result = new byte[length]; in readFile()
77 while (length > 0) { in readFile()
78 int amt = in.read(result, at, length); in readFile()
83 length -= amt; in readFile()
/cts/tests/tests/security/jni/
Dandroid_security_cts_CharDeviceTest.cpp36 int length = page_size * page_size; in android_security_cts_CharDeviceTest_doExynosWriteTest() local
43 mmap(NULL, length, PROT_READ|PROT_WRITE, MAP_SHARED, fd, PHYS_OFFSET); in android_security_cts_CharDeviceTest_doExynosWriteTest()
56 for (i = 0; i < length; i++) { in android_security_cts_CharDeviceTest_doExynosWriteTest()
62 munmap(addr, length); in android_security_cts_CharDeviceTest_doExynosWriteTest()
74 int length = page_size * page_size; in android_security_cts_CharDeviceTest_doExynosReadTest() local
81 mmap(NULL, length, PROT_READ, MAP_SHARED, fd, PHYS_OFFSET); in android_security_cts_CharDeviceTest_doExynosReadTest()
94 for (i = 0; i < (length - strlen(MAGIC_STRING)); i++) { in android_security_cts_CharDeviceTest_doExynosReadTest()
102 munmap(addr, length); in android_security_cts_CharDeviceTest_doExynosReadTest()
/cts/tests/tests/content/src/android/content/res/cts/
DArrayTest.java42 assertEquals(res.length, expected.length); in checkStringArray()
43 for (int i = 0; i < expected.length; i++) { in checkStringArray()
50 assertEquals(res.length, expected.length); in checkTextArray()
51 for (int i = 0; i < expected.length; i++) { in checkTextArray()
58 assertEquals(res.length, expected.length); in checkIntArray()
59 for (int i = 0; i < expected.length; i++) { in checkIntArray()
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensorverification/
DAbstractMeanVerification.java36 mSums = new float[event.values.length]; in addSensorEventInternal()
38 Assert.assertEquals(mSums.length, event.values.length); in addSensorEventInternal()
39 for (int i = 0; i < mSums.length; i++) { in addSensorEventInternal()
60 float[] means = new float[mSums.length]; in getMeans()
61 for (int i = 0; i < mSums.length; i++) { in getMeans()
/cts/tests/tests/content/src/android/content/pm/cts/
DPackageInfoTest.java106 if (expected != null && expected.length > 0) { in checkInfoArray()
108 assertEquals(expected.length, actual.length); in checkInfoArray()
109 for (int i = 0; i < expected.length; i++) { in checkInfoArray()
115 assertEquals(0, actual.length); in checkInfoArray()
120 if (expected != null && expected.length > 0) { in checkSignatureInfo()
122 assertEquals(expected.length, actual.length); in checkSignatureInfo()
123 for (int i = 0; i < expected.length; i++) { in checkSignatureInfo()
129 assertEquals(0, actual.length); in checkSignatureInfo()
134 if (expected != null && expected.length > 0) { in checkConfigInfo()
136 assertEquals(expected.length, actual.length); in checkConfigInfo()
[all …]

12345678910>>...30