/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | StreamUtilTest.java | 41 final String contents = "this is a string"; in testGetByteArrayListFromSource() local 42 final byte[] contentBytes = contents.getBytes(); in testGetByteArrayListFromSource() 59 final String contents = "this is a string"; in testGetByteArrayListFromStream() local 60 final byte[] contentBytes = contents.getBytes(); in testGetByteArrayListFromStream() 75 final String contents = "this is a string"; in testGetStringFromSource() local 76 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetStringFromSource() 79 assertEquals(contents, output); in testGetStringFromSource() 87 final String contents = "this is a string"; in testGetBufferedReaderFromInputStream() local 89 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetBufferedReaderFromInputStream() 91 assertEquals(contents, output.readLine()); in testGetBufferedReaderFromInputStream() [all …]
|
D | SubprocessTestResultsParserTest.java | 86 String[] contents = readInFile(SUBPROC_OUTPUT_FILE_1); in testParse_randomEvents() local 114 resultParser.processNewLines(contents); in testParse_randomEvents() 125 String[] contents = readInFile(SUBPROC_OUTPUT_FILE_2); in testParse_invalidEventOrder() local 152 resultParser.processNewLines(contents); in testParse_invalidEventOrder()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/ |
D | GTestXmlResultParserTest.java | 78 File contents = readInFile(GTEST_OUTPUT_FILE_1); in testParseSimpleFile() local 95 resultParser.parseResult(contents, null); in testParseSimpleFile() 98 FileUtil.deleteFile(contents); in testParseSimpleFile() 107 File contents = readInFile(GTEST_OUTPUT_FILE_2); in testParseLargerFile() local 124 resultParser.parseResult(contents, null); in testParseLargerFile() 127 FileUtil.deleteFile(contents); in testParseLargerFile() 138 File contents = readInFile(GTEST_OUTPUT_FILE_3); in testParseWithFailures() local 162 resultParser.parseResult(contents, null); in testParseWithFailures() 165 FileUtil.deleteFile(contents); in testParseWithFailures() 176 File contents = FileUtil.createTempFile("test", ".xml"); in testParseWithEmptyFile() local [all …]
|
D | GTestResultParserTest.java | 37 String[] contents = readInFile(GTEST_OUTPUT_FILE_1); in testParseSimpleFile() local 53 resultParser.processNewLines(contents); in testParseSimpleFile() 63 String[] contents = readInFile(GTEST_OUTPUT_FILE_2); in testParseSimpleFileNoTimes() local 79 resultParser.processNewLines(contents); in testParseSimpleFileNoTimes() 88 String[] contents = readInFile(GTEST_OUTPUT_FILE_3); in testParseNoTests() local 96 resultParser.processNewLines(contents); in testParseNoTests() 106 String[] contents = readInFile(GTEST_OUTPUT_FILE_4); in testParseLargerFile() local 122 resultParser.processNewLines(contents); in testParseLargerFile() 134 String[] contents = readInFile(GTEST_OUTPUT_FILE_5); in testParseWithFailures() local 185 resultParser.processNewLines(contents); in testParseWithFailures() [all …]
|
D | GTestListTestParserTest.java | 37 String[] contents = readInFile(GTEST_LIST_FILE_1); in testParseSimpleList() local 52 parser.processNewLines(contents); in testParseSimpleList() 63 String[] contents = readInFile(GTEST_LIST_FILE_2); in testParseMultiClassList() local 78 parser.processNewLines(contents); in testParseMultiClassList() 88 String[] contents = readInFile(GTEST_LIST_FILE_3); in testParseMalformedList() local 93 parser.processNewLines(contents); in testParseMalformedList() 103 String[] contents = readInFile(GTEST_LIST_FILE_4); in testParseSimpleList_withSpecialChar() local 127 parser.processNewLines(contents); in testParseSimpleList_withSpecialChar()
|
D | GoogleBenchmarkResultParserTest.java | 99 CollectingOutputReceiver contents = readInFile(GBENCH_OUTPUT_FILE_1); in testParseSimpleFile() local 102 Map<String, String> results = resultParser.parse(contents); in testParseSimpleFile() 157 CollectingOutputReceiver contents = readInFile(GBENCH_OUTPUT_FILE_2); in testParseSimpleFile_twoTests() local 160 resultParser.parse(contents); in testParseSimpleFile_twoTests() 181 CollectingOutputReceiver contents = readInFile(GBENCH_OUTPUT_FILE_3); in testParse_contextError() local 184 resultParser.parse(contents); in testParse_contextError() 195 CollectingOutputReceiver contents = readInFile(GBENCH_OUTPUT_FILE_4); in testParse_noBenchmarkResults() local 198 resultParser.parse(contents); in testParse_noBenchmarkResults() 230 CollectingOutputReceiver contents = readInFile(GBENCH_OUTPUT_FILE_5); in testParseSimpleFile_withWarning() local 233 resultParser.parse(contents); in testParseSimpleFile_withWarning()
|
/tools/apksig/src/main/java/com/android/apksig/internal/apk/ |
D | AndroidBinXmlParser.java | 298 ByteBuffer contents = chunk.getContents(); in next() local 299 if (contents.remaining() < 20) { in next() 302 + contents.remaining() + " bytes"); in next() 304 long nsId = getUnsignedInt32(contents); in next() 305 long nameId = getUnsignedInt32(contents); in next() 306 int attrStartOffset = getUnsignedInt16(contents); in next() 307 int attrSizeBytes = getUnsignedInt16(contents); in next() 308 int attrCount = getUnsignedInt16(contents); in next() 310 contents.position(0); in next() 311 if (attrStartOffset > contents.remaining()) { in next() [all …]
|
/tools/apksig/src/test/java/com/android/apksig/util/ |
D | InMemoryDataSinkDataSourceTest.java | 29 protected CloseableWithDataSource createDataSource(byte[] contents) throws IOException { in createDataSource() argument 31 sink.consume(contents, 0, contents.length); in createDataSource()
|
D | DataSourceFromRAFChunkTest.java | 65 protected CloseableWithDataSource createDataSource(byte[] contents) throws IOException { in createDataSource() argument 67 byte[] fullContents = new byte[2 + contents.length + 1]; in createDataSource() 70 System.arraycopy(contents, 0, fullContents, 2, contents.length); in createDataSource() 85 DataSources.asDataSource(f, 2, contents.length), in createDataSource()
|
D | DataSinkFromRAFTest.java | 56 byte[] contents = new byte[(int) f.length()]; in getContents() 58 f.readFully(contents); in getContents() 59 return ByteBuffer.wrap(contents); in getContents()
|
D | DataSourceFromByteBufferTest.java | 47 protected CloseableWithDataSource createDataSource(byte[] contents) throws IOException { in createDataSource() argument 48 return CloseableWithDataSource.of(DataSources.asDataSource(ByteBuffer.wrap(contents))); in createDataSource()
|
D | DataSourceFromRAFTest.java | 68 protected CloseableWithDataSource createDataSource(byte[] contents) throws IOException { in createDataSource() argument 72 Files.write(tmp.toPath(), contents); in createDataSource() local
|
D | DataSourceTestBase.java | 41 protected abstract CloseableWithDataSource createDataSource(byte[] contents) throws IOException; in createDataSource() argument 43 protected CloseableWithDataSource createDataSource(String contents) throws IOException { in createDataSource() argument 44 return createDataSource(contents.getBytes(StandardCharsets.UTF_8)); in createDataSource()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | StreamUtil.java | 60 final String contents; in getStringFromSource() local 62 contents = getStringFromStream(stream); in getStringFromSource() 66 return contents; in getStringFromSource() 96 final ByteArrayList contents; in getByteArrayListFromSource() local 98 contents = getByteArrayListFromStream(stream); in getByteArrayListFromSource() 102 return contents; in getByteArrayListFromSource()
|
D | GCSFileDownloader.java | 45 String contents = bucket.pullContents(path); in downloadFile() local 46 return new ByteArrayInputStream(contents.getBytes()); in downloadFile()
|
D | ByteArrayList.java | 129 byte[] contents = new byte[mCurBytes]; in getContents() 130 System.arraycopy(mStorage, 0, contents, 0, mCurBytes); in getContents() 131 return contents; in getContents()
|
/tools/tradefederation/contrib/src/com/android/media/tests/ |
D | VideoEditingPerformanceTest.java | 206 String contents; in parseOutputFile() local 208 contents = StreamUtil.getStringFromStream(dataStream); in parseOutputFile() 215 List<String> lines = Arrays.asList(contents.split("\n")); in parseOutputFile()
|
D | MediaPlayerStressTest.java | 162 String contents; in parseOutputFile() local 164 contents = StreamUtil.getStringFromStream(dataStream); in parseOutputFile() 171 List<String> lines = Arrays.asList(contents.split("\n")); in parseOutputFile()
|
D | MediaStressTest.java | 138 String contents; in parseOutputFile() local 141 contents = StreamUtil.getStringFromStream(dataStream); in parseOutputFile() 148 List<String> lines = Arrays.asList(contents.split("\n")); in parseOutputFile()
|
D | VideoEditingMemoryTest.java | 217 String contents; in parseOutputFile() local 219 contents = StreamUtil.getStringFromStream(dataStream); in parseOutputFile() 226 List<String> lines = Arrays.asList(contents.split("\n")); in parseOutputFile()
|
D | MediaMemoryTest.java | 226 String contents; in parseOutputFile() local 228 contents = StreamUtil.getStringFromStream(dataStream); in parseOutputFile() 235 List<String> lines = Arrays.asList(contents.split("\n")); in parseOutputFile()
|
D | CameraLatencyTest.java | 234 String contents; in parseOutputFile() local 236 contents = StreamUtil.getStringFromStream(dataStream); in parseOutputFile() 243 List<String> lines = Arrays.asList(contents.split("\n")); in parseOutputFile()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/host/ |
D | CoverageMeasurementForwarderTest.java | 129 private File mockBuildArtifact(ByteString contents) throws IOException { in mockBuildArtifact() argument 132 contents.writeTo(out); in mockBuildArtifact()
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/ |
D | StoredEntry.java | 601 CloseableByteSource contents; in createSourcesFromRawContents() local 608 contents = new InflaterByteSource(rawContents); in createSourcesFromRawContents() 610 contents = rawContents; in createSourcesFromRawContents() 613 return new ProcessedAndRawByteSources(contents, rawContents); in createSourcesFromRawContents()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/ |
D | DeviceFileReporterTest.java | 360 final String contents = "these are file contents"; in testInferDataTypes() local 361 mDfrIss = new ByteArrayInputStreamSource(contents.getBytes()); in testInferDataTypes() 370 .andReturn(new FakeFile(filename, contents.length())); in testInferDataTypes()
|