Home
last modified time | relevance | path

Searched refs:contents (Results 1 – 25 of 108) sorted by relevance

12345

/tools/tradefederation/core/javatests/com/android/tradefed/testtype/
DGTestXmlResultParserTest.java85 File contents = readInFile(GTEST_OUTPUT_FILE_1); in testParseSimpleFile() local
92 resultParser.parseResult(contents, null); in testParseSimpleFile()
107 FileUtil.deleteFile(contents); in testParseSimpleFile()
115 File contents = readInFile(GTEST_OUTPUT_FILE_2); in testParseLargerFile() local
121 resultParser.parseResult(contents, null); in testParseLargerFile()
135 FileUtil.deleteFile(contents); in testParseLargerFile()
145 File contents = readInFile(GTEST_OUTPUT_FILE_3); in testParseWithFailures() local
151 resultParser.parseResult(contents, null); in testParseWithFailures()
167 FileUtil.deleteFile(contents); in testParseWithFailures()
177 File contents = FileUtil.createTempFile("test", ".xml"); in testParseWithEmptyFile() local
[all …]
DGTestResultParserTest.java44 String[] contents = readInFile(GTEST_OUTPUT_FILE_1); in testParseSimpleFile() local
47 resultParser.processNewLines(contents); in testParseSimpleFile()
64 String[] contents = readInFile(GTEST_OUTPUT_FILE_2); in testParseSimpleFileNoTimes() local
68 resultParser.processNewLines(contents); in testParseSimpleFileNoTimes()
85 String[] contents = readInFile(GTEST_OUTPUT_FILE_3); in testParseNoTests() local
90 resultParser.processNewLines(contents); in testParseNoTests()
100 String[] contents = readInFile(GTEST_OUTPUT_FILE_4); in testParseLargerFile() local
104 resultParser.processNewLines(contents); in testParseLargerFile()
122 String[] contents = readInFile(GTEST_OUTPUT_FILE_5); in testParseWithFailures() local
126 resultParser.processNewLines(contents); in testParseWithFailures()
[all …]
DGTestListTestParserTest.java46 String[] contents = readInFile(GTEST_LIST_FILE_1); in testParseSimpleList() local
50 parser.processNewLines(contents); in testParseSimpleList()
67 String[] contents = readInFile(GTEST_LIST_FILE_2); in testParseMultiClassList() local
71 parser.processNewLines(contents); in testParseMultiClassList()
87 String[] contents = readInFile(GTEST_LIST_FILE_3); in testParseMalformedList() local
91 parser.processNewLines(contents); in testParseMalformedList()
102 String[] contents = readInFile(GTEST_LIST_FILE_4); in testParseSimpleList_withSpecialChar() local
116 parser.processNewLines(contents); in testParseSimpleList_withSpecialChar()
138 String[] contents = readInFile(GTEST_LIST_FILE_5); in testParseParameterized() local
142 parser.processNewLines(contents); in testParseParameterized()
/tools/metalava/metalava/src/test/java/com/android/tools/metalava/cli/signature/
DUpdateSignatureHeaderCommandTest.kt29 contents: String, in checkUpdateSignatures()
40 val input = inputFile("api.txt", contents.trimIndent()) in checkUpdateSignatures()
46 assertEquals(contents.trimIndent(), input.readText()) in checkUpdateSignatures()
111 contents = """ in Update signature (blank to v2)()
124 contents = "", in Update signature (empty to v2)()
133 contents = in Update signature (v2 to v3)()
152 contents = """ in Update signature (wrong file to v3)()
164 contents = in Update signature (v2 to v2 + kotlin-style-nulls=true but no migrating)()
183 contents = in Update signature (v2 to v2 + kotlin-style-nulls=true,migrating=test)()
204 contents = in Update signature (v2 to v3 + kotlin-style-nulls=false,migrating=test)()
/tools/tradefederation/core/javatests/com/android/tradefed/util/
DStreamUtilTest.java47 final String contents = "this is a string"; in testGetByteArrayListFromSource() local
48 final byte[] contentBytes = contents.getBytes(); in testGetByteArrayListFromSource()
67 final String contents = "this is a string"; in testGetByteArrayListFromStream() local
68 final byte[] contentBytes = contents.getBytes(); in testGetByteArrayListFromStream()
85 final String contents = "this is a string"; in testGetStringFromSource() local
86 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetStringFromSource()
89 assertEquals(contents, output); in testGetStringFromSource()
99 final String contents = "this is a string"; in testGetBufferedReaderFromInputStream() local
101 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetBufferedReaderFromInputStream()
103 assertEquals(contents, output.readLine()); in testGetBufferedReaderFromInputStream()
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/rust/
DRustTestResultParserTest.java168 String[] contents = readInFile(RUST_OUTPUT_FILE_1); in testParseRealOutput() local
170 mParser.processNewLines(contents); in testParseRealOutput()
181 String[] contents = readInFile(RUST_OUTPUT_FILE_2); in testParseRealOutput2() local
196 mParser.processNewLines(contents); in testParseRealOutput2()
214 String[] contents = readInFile(RUST_OUTPUT_FILE_3); in testParseRealOutput3() local
216 mParser.processNewLines(contents); in testParseRealOutput3()
231 String[] contents = readInFile(RUST_OUTPUT_FILE_1); in testParsePartialOutput() local
233 mParser.processNewLines(Arrays.copyOfRange(contents, 0, 4)); in testParsePartialOutput()
234 mParser.processNewLines(Arrays.copyOfRange(contents, 4, 7)); in testParsePartialOutput()
235 mParser.processNewLines(Arrays.copyOfRange(contents, 4, contents.length)); in testParsePartialOutput()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DAndroidBinXmlParser.java298 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/tradefederation/core/javatests/com/android/tradefed/device/
DTestDeviceShellFuncTest.java68 String contents = generateRandomString(64); in testExecuteShellCommand_basic() local
69 mTestDevice.pushString(contents, devicePath); in testExecuteShellCommand_basic()
86 assertEquals(contents.trim(), contentsOutput.trim()); in testExecuteShellCommand_basic()
109 String contents = generateRandomString(64); in testExecuteShellCommandV2_basic() local
110 mTestDevice.pushString(contents, devicePath); in testExecuteShellCommandV2_basic()
134 assertEquals(contents.trim(), contentsOutputResult.getStdout().trim()); in testExecuteShellCommandV2_basic()
146 final String contents = generateRandomString(64); in testExecuteShellCommand_pipeStdin() local
148 FileUtil.writeToFile(contents, input); in testExecuteShellCommand_pipeStdin()
154 assertEquals(contents, result.getStdout()); in testExecuteShellCommand_pipeStdin()
/tools/asuite/atest/
Djava_test_filter_generator_test.py32 test_a, contents='package android.test;\npublic class TestA {\n'
39 contents=(
49 test_c, contents='package android.test\nclass TestC : TestBase() {\n'
56 contents=(
/tools/apksig/src/test/java/com/android/apksig/util/
DDataSourceFromRAFChunkTest.java73 protected CloseableWithDataSource createDataSource(byte[] contents) throws IOException { in createDataSource() argument
75 byte[] fullContents = new byte[2 + contents.length + 1]; in createDataSource()
78 System.arraycopy(contents, 0, fullContents, 2, contents.length); in createDataSource()
93 factory.create(f, 2, contents.length), in createDataSource()
DInMemoryDataSinkDataSourceTest.java29 protected CloseableWithDataSource createDataSource(byte[] contents) throws IOException { in createDataSource() argument
31 sink.consume(contents, 0, contents.length); in createDataSource()
DDataSinkFromRAFTest.java56 byte[] contents = new byte[(int) f.length()]; in getContents()
58 f.readFully(contents); in getContents()
59 return ByteBuffer.wrap(contents); in getContents()
/tools/asuite/atest/integration_tests/
Dsnapshot_unittest.py50 self.fs.create_file(workspace.joinpath('dir1', 'file1'), contents='test')
107 self.fs.create_file(workspace.joinpath('dir1', 'file1'), contents='test')
127 self.fs.create_file(workspace.joinpath('dir1', 'file1'), contents='test')
129 self.fs.create_file(workspace.joinpath('dir2', 'file2'), contents='test')
149 self.fs.create_file(workspace.joinpath('dir1', 'file1'), contents='test')
151 self.fs.create_file(workspace.joinpath('dir2', 'file2'), contents='test')
173 self.fs.create_file(workspace.joinpath('dir1', 'file1'), contents='test')
175 self.fs.create_file(workspace.joinpath('dir2', 'file2'), contents='test')
270 self.fs.create_file(workspace.joinpath('dir1', 'file1'), contents='test')
285 self.fs.create_file(workspace.joinpath('dir1', 'file1'), contents='test')
[all …]
/tools/metalava/metalava-model-testsuite-cli/src/test/java/com/android/tools/metalava/model/testsuite/cli/
DUpdateBaselineCommandTest.kt55 fun writeFile(file: File, contents: String) { in writeFile()
57 file.writeText(contents) in writeFile()
64 val contents = in Test update file() constant
73 writeFile(file, contents) in Test update file()
/tools/metalava/metalava-testing/src/main/java/com/android/tools/metalava/testing/
DTestUtils.kt51 fun signature(contents: String): TestFile { in signature()
52 return signature("api.txt", contents) in signature()
56 fun signature(to: String, contents: String): TestFile { in signature()
57 return source(to, contents.trimIndent()) in signature()
/tools/netsim/rust/daemon/src/
Dconfig_file.rs23 let contents = fs::read_to_string(filename) in new_from_file() localVariable
25 from_str(&contents) in new_from_file()
28 pub fn from_str(contents: &str) -> Result<Config, String> { in from_str()
30 merge_from_str(&mut config, contents).map_err(|e| format!("Failed to parse config: {}", e))?; in from_str()
/tools/platform-compat/java/com/android/class2nonsdklist/
DAnnotationPropertyWriter.java41 Map<String, String> contents = new HashMap<>(annotationProperties); in consume() local
44 contents.put(SIGNATURE_COLUMN, apiSignature); in consume()
47 mColumns.addAll(contents.keySet()); in consume()
48 mContents.add(contents); in consume()
/tools/security/fuzzing/orphans/libskia/
Dlibskia_image_processor_fuzzer.cpp37 static int getAndroidPixels(std::string& contents, bool requestPremul) { in getAndroidPixels() argument
39 …std::unique_ptr<SkMemoryStream> stream = SkMemoryStream::MakeDirect(contents.data(), contents.size… in getAndroidPixels()
/tools/platform-compat/javatest/android/processor/compat/unsupportedappusage/
DCsvReader.java43 List<String> contents = mSplitter.splitToList(line); in CsvReader() local
45 for (int i = 0; i < Math.min(contents.size(), mColumns.size()); ++i) { in CsvReader()
46 contentMap.put(mColumns.get(i), contents.get(i)); in CsvReader()
/tools/acloud/internal/lib/
Dota_tools_test.py64 self.contents = None
72 self.contents = f.read()
91 def _CreateFile(path, contents): argument
97 f.write(contents)
206 self.assertEqual(rewritten_misc_info.contents,
288 self.assertEqual(rewritten_config.contents,
/tools/metalava/metalava-testing/src/test/java/com/android/tools/metalava/testing/
DMutableBaselineFileTest.kt34 val contents = in Update file() constant
47 file.writeText(contents) in Update file()
57 assertEquals(contents, file.readText(), message = "round trip") in Update file()
/tools/metalava/metalava-model-testsuite/src/main/java/com/android/tools/metalava/model/testsuite/
DBaseModelTest.kt177 val mainSourceDir = ModelSuiteRunner.SourceDir(dir = tempDir, contents = inputSet.testFiles) in <lambda>()
305 fun signature(contents: String): TestFile = signature("api.txt", contents) in <lambda>()
308 fun signature(to: String, contents: String): TestFile = in <lambda>()
309 TestFiles.source(to, contents.trimIndent()) in <lambda>()
/tools/netsim/rust/common/src/util/
Dini_file.rs272 let mut contents = String::new(); in test_write() localVariable
273 file.read_to_string(&mut contents).unwrap(); in test_write()
275 assert_eq!(contents, "port=123\n"); in test_write()
333 let mut contents = String::new(); in test_overwrite() localVariable
334 file.read_to_string(&mut contents).unwrap(); in test_overwrite()
336 assert_eq!(contents, "port3=789\n"); in test_overwrite()
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DStreamUtil.java65 final String contents; in getStringFromSource() local
67 contents = getStringFromStream(stream); in getStringFromSource()
71 return contents; in getStringFromSource()
101 final ByteArrayList contents; in getByteArrayListFromSource() local
103 contents = getByteArrayListFromStream(stream); in getByteArrayListFromSource()
107 return contents; in getByteArrayListFromSource()
DByteArrayList.java129 byte[] contents = new byte[mCurBytes]; in getContents()
130 System.arraycopy(mStorage, 0, contents, 0, mCurBytes); in getContents()
131 return contents; in getContents()

12345