/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | StreamUtilTest.java | 40 final byte[] contentBytes = contents.getBytes(); in testGetByteArrayListFromSource() 59 final byte[] contentBytes = contents.getBytes(); in testGetByteArrayListFromStream() 76 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetStringFromSource() 90 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetBufferedReaderFromInputStream() 106 final InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes()); in testCountLinesFromSource() 117 new ByteArrayInputStream(contents.getBytes())); in testGetStringFromStream() 130 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateMd5() 144 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateBase64Md5() 151 ByteArrayInputStream bais = new ByteArrayInputStream(text.getBytes()); in testCopyStreams() 161 ByteArrayInputStream bais = new ByteArrayInputStream(text.getBytes()); in testCopyStreamToWriter()
|
D | FixedByteArrayOutputStreamTest.java | 53 mOutStream.write(text.getBytes()); in writeTextIntoStreamAndReturn() 103 mOutStream.write(prefix.getBytes()); in testWriteWithWrap() 115 mOutStream.write(text.getBytes(), offset, text.length() - offset); in testLessThanBufferWithOffset() 133 mOutStream.write(prefix.getBytes()); in testWriteWithOffsetAndWrap() 134 mOutStream.write(followup.getBytes(), offset, followup.length() - offset); in testWriteWithOffsetAndWrap()
|
D | FileUtilTest.java | 186 FileUtil.writeToFile(new ByteArrayInputStream("write1".getBytes()), testFile, false); in testWriteToFile_overwrites_exists() 188 FileUtil.writeToFile(new ByteArrayInputStream("write2".getBytes()), testFile, false); in testWriteToFile_overwrites_exists() 204 FileUtil.writeToFile(new ByteArrayInputStream("write1".getBytes()), testFile, true); in testWriteToFile_appends_exists() 205 FileUtil.writeToFile(new ByteArrayInputStream("write2".getBytes()), testFile, true); in testWriteToFile_appends_exists() 222 FileUtil.writeToFile(new ByteArrayInputStream("write1".getBytes()), testFile, false); in testWriteToFile_overwrites_doesNotExist() 239 FileUtil.writeToFile(new ByteArrayInputStream("write1".getBytes()), testFile, true); in testWriteToFile_appends_doesNotExist() 252 FileUtil.writeToFile(new ByteArrayInputStream("write1".getBytes()), testFile); in testWriteToFile_stream_overwrites() 254 FileUtil.writeToFile(new ByteArrayInputStream("write2".getBytes()), testFile); in testWriteToFile_stream_overwrites()
|
D | BugreportTest.java | 57 InputStream name = new ByteArrayInputStream(bugreport.getName().getBytes()); in setUp() 59 InputStream content = new ByteArrayInputStream(BUGREPORT_CONTENT.getBytes()); in setUp() 163 InputStream content = new ByteArrayInputStream(BUGREPORT_CONTENT.getBytes()); in testBugreportz_noMainFile()
|
D | GCSFileUploaderFuncTest.java | 71 InputStream uploadFileStream = new ByteArrayInputStream(FILE_DATA.getBytes()); in testUploadFile_roundTrip() 84 InputStream uploadFileStream = new ByteArrayInputStream(FILE_DATA.getBytes()); in testUploadFile_overwrite()
|
D | LogcatEventParserTest.java | 184 receiver.addOutput(output.getBytes(), 0, output.getBytes().length); in testEndToEnd()
|
/tools/apksig/src/test/java/com/android/apksig/internal/util/ |
D | ChainedDataSourceTest.java | 42 DataSources.asDataSource(ByteBuffer.wrap("12".getBytes(US_ASCII))), in setUp() 43 DataSources.asDataSource(ByteBuffer.wrap("34567".getBytes(US_ASCII))), in setUp() 44 DataSources.asDataSource(ByteBuffer.wrap("".getBytes(US_ASCII))), in setUp() 45 DataSources.asDataSource(ByteBuffer.wrap("890".getBytes(US_ASCII))), in setUp() 46 DataSources.asDataSource(ByteBuffer.wrap("".getBytes(US_ASCII)))); in setUp() 57 ByteBuffer.wrap("1234567890".substring(begin, end).getBytes(US_ASCII)), in feedAllPossibleRanges() 74 ByteBuffer.wrap("1234567890".substring(begin, end).getBytes(US_ASCII)), in getByteBufferFromAllPossibleRanges() 96 ByteBuffer.wrap("1234567890".substring(begin, end).getBytes(US_ASCII)), in copyTo() 110 ByteBuffer.wrap("1234567890".substring(begin, end).getBytes(US_ASCII)), in slice()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/remote/ |
D | RemoteManagerTest.java | 75 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_invalidAction() 94 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_initHandover() 113 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_addCommand() 129 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_addCommand_fail() 147 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_addCommand_config() 165 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_allocateDevice_fail() 182 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_allocateDevice() 199 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_processFree_notFound() 220 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_processFree() 244 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_processFree_wildcard()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/ |
D | DeviceFileReporterTest.java | 92 mDfrIss = new ByteArrayInputStreamSource(tombstone.getBytes()); in testSimple() 118 mDfrIss = new ByteArrayInputStreamSource(tombstone.getBytes()); in testTrim() 148 mDfrIss = new ByteArrayInputStreamSource(tombstone.getBytes()); in testLine_containingSpace() 177 mDfrIss = new ByteArrayInputStreamSource(tombstone.getBytes()); in testLineEnding_LF() 205 mDfrIss = new ByteArrayInputStreamSource(tombstone.getBytes()); in testLineEnding_CRLF() 235 final InputStreamSource pngIss = new ByteArrayInputStreamSource(pngContents.getBytes()); in testRepeat_skip() 236 final InputStreamSource xmlIss = new ByteArrayInputStreamSource(xmlContents.getBytes()); in testRepeat_skip() 291 final InputStreamSource pngIss = new ByteArrayInputStreamSource(pngContents.getBytes()); in testRepeat_noSkip() 292 final InputStreamSource xmlIss = new ByteArrayInputStreamSource(xmlContents.getBytes()); in testRepeat_noSkip() 378 mDfrIss = new ByteArrayInputStreamSource(tombstone.getBytes()); in testTwoFiles() [all …]
|
D | LogcatCrashResultForwarderTest.java | 51 .andReturn(new ByteArrayInputStreamSource("".getBytes())); in testCaptureTestCrash_noCrashInLogcat() 87 .andReturn(new ByteArrayInputStreamSource(logcat.getBytes())); in testCaptureTestCrash_oneCrashingLogcat() 132 .andReturn(new ByteArrayInputStreamSource(logcat.getBytes())); in testCaptureTestCrash_oneCrashingLogcatAfterTestEnded() 176 .andReturn(new ByteArrayInputStreamSource(logcat.getBytes())); in testCaptureTestCrash_duplicateStack()
|
D | LogFileSaverTest.java | 157 ByteArrayInputStream mockInput = new ByteArrayInputStream(testData.getBytes()); in testSaveLogData() 184 ByteArrayInputStream mockInput = new ByteArrayInputStream(testData.getBytes()); in testSaveAndGZipLogData() 208 ByteArrayInputStream mockInput = new ByteArrayInputStream(testData.getBytes()); in testSaveAndZipLogData() 245 ByteArrayInputStream mockInput = new ByteArrayInputStream(testData.getBytes()); in testCreateAndGZipLogData() 267 ByteArrayInputStream mockInput = new ByteArrayInputStream(testData.getBytes()); in testSaveLogDataRaw()
|
D | FileSystemLogSaverTest.java | 177 ByteArrayInputStream mockInput = new ByteArrayInputStream(testData.getBytes()); in testSaveLogData_uncompressed() 211 ByteArrayInputStream mockInput = new ByteArrayInputStream(testData.getBytes()); in testSaveLogData_compressed() 239 ByteArrayInputStream mockInput = new ByteArrayInputStream(testData.getBytes()); in testSaveLogDataRaw()
|
/tools/test/graphicsbenchmark/performance_tests/helper/test/com/android/game/qualification/ |
D | GameCoreConfigurationXmlParserTest.java | 56 + "</game-core>\n").getBytes())) { in testSingleApkInfo() 96 + "</game-core>\n").getBytes())) { in testOptionalFields() 128 + " </game-core>\n").getBytes())) { in testMissingRequiredField() 155 + "</game-core>\n").getBytes())) { in testApkWithArguments() 193 + "</game-core>\n").getBytes())) { in testRequirements() 217 + " </game-core>\n").getBytes())) { in testRequirementNeedsMatchingApk()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | LogcatOnFailureCollectorTest.java | 110 .andReturn(new ByteArrayInputStreamSource("aaa".getBytes())); in testCollect() 113 .andReturn(new ByteArrayInputStreamSource("aaabbb".getBytes())); in testCollect() 162 .andReturn(new ByteArrayInputStreamSource("aaa".getBytes())); in testCollect_multiRun() 165 .andReturn(new ByteArrayInputStreamSource("aaabbb".getBytes())); in testCollect_multiRun() 181 .andReturn(new ByteArrayInputStreamSource("aaa".getBytes())); in testCollect_multiRun() 184 .andReturn(new ByteArrayInputStreamSource("aaabbb".getBytes())); in testCollect_multiRun()
|
D | DebugHostLogOnFailureCollectorTest.java | 88 new ByteArrayInputStreamSource("aaa".getBytes()), in testCollect() 89 new ByteArrayInputStreamSource("aaabbb".getBytes())); in testCollect()
|
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/sign/ |
D | JarSigningTest.java | 82 new ByteArrayInputStream("useless text".getBytes(Charsets.US_ASCII))); in signJarWithPrexistingSimpleTextFilePre18() 136 zf1.add("directory/file", new ByteArrayInputStream("useless text".getBytes( in signJarWithPrexistingSimpleTextFilePos18() 218 byte[] file1Contents = "I am a test file".getBytes(Charsets.US_ASCII); in v1ReSignOnFileChange() 251 file1Contents = "I am a modified test file".getBytes(Charsets.US_ASCII); in v1ReSignOnFileChange() 276 file1Contents = "I have changed again!".getBytes(Charsets.US_ASCII); in v1ReSignOnFileChange() 312 byte[] fileContents = "Very interesting contents".getBytes(Charsets.US_ASCII); in openSignedJarDoesNotForcesWriteIfSignatureIsNotCorrect() 344 fileContents = "Not so interesting contents".getBytes(Charsets.US_ASCII); in openSignedJarDoesNotForcesWriteIfSignatureIsNotCorrect()
|
/tools/test/graphicsbenchmark/performance_tests/hostside/src/com/android/game/qualification/metric/ |
D | Histogram.java | 115 output.write("<".getBytes(StandardCharsets.UTF_8)); in plotAscii() 118 output.write(">".getBytes(StandardCharsets.UTF_8)); in plotAscii() 121 output.write(" ".getBytes(StandardCharsets.UTF_8)); in plotAscii() 136 cumulative * 100f / total) .getBytes()); in plotAscii()
|
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/ |
D | AlignmentTest.java | 54 byte testBytes[] = "This is some text.".getBytes(Charsets.US_ASCII); in addAlignedFile() 70 byte testBytes[] = "This is some text.".getBytes(Charsets.US_ASCII); in addNonAlignedFile() 85 byte testBytes0[] = "Text number 1".getBytes(Charsets.US_ASCII); 86 byte testBytes1[] = "Text number 2, which is actually 1".getBytes(Charsets.US_ASCII); 130 byte testBytes0[] = "Text number 1".getBytes(Charsets.US_ASCII); 131 byte testBytes1[] = "Text number 2, which is actually 1".getBytes(Charsets.US_ASCII); 172 byte testBytes[] = "This is some text.".getBytes(Charsets.US_ASCII); 198 byte testBytes0[] = "Text number 1".getBytes(Charsets.US_ASCII); 199 byte testBytes1[] = "Text number 2, which is actually 1".getBytes(Charsets.US_ASCII);
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/net/ |
D | XmlRpcHelperTest.java | 46 resp = XmlRpcHelper.parseResponseTuple(new ByteArrayInputStream(TRUE_RESPONSE.getBytes())); in testParseTrue() 55 resp = XmlRpcHelper.parseResponseTuple(new ByteArrayInputStream(FALSE_RESPONSE.getBytes())); in testParseFalse() 73 resp = XmlRpcHelper.parseResponseTuple(new ByteArrayInputStream(response.getBytes())); in testParse_multiValue()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/ |
D | TestSuiteStub.java | 98 new ByteArrayInputStreamSource("test".getBytes())); in testAttempt() 113 new ByteArrayInputStreamSource("test".getBytes())); in testAttempt() 127 new ByteArrayInputStreamSource("test".getBytes())); in testAttempt() 136 new ByteArrayInputStreamSource("test".getBytes())); in testAttempt()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | ManagedTestDeviceFactoryTest.java | 111 cor.addOutput(response.getBytes(), 0, response.length()); in testFrameworkAvailable() 140 cor.addOutput(response.getBytes(), 0, response.length()); in testFrameworkNotAvailable() 169 cor.addOutput(response.getBytes(), 0, response.length()); in testCheckFramework_emptyReturns()
|
D | MockTestDeviceHelper.java | 46 byte[] inputData = response.getBytes(); in injectShellResponse() 91 byte[] inputData = response.getBytes(); in injectShellResponse()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/ |
D | NativeLeakCollector.java | 103 new ByteArrayInputStreamSource(receiver.getOutput().getBytes()); in tearDown() 113 byte[] msgBytes = msg.getBytes(); in writeToReceiver()
|
/tools/apksig/src/test/java/com/android/apksig/util/ |
D | DataSinkTestBase.java | 50 byte[] input = "abcdefg".getBytes(StandardCharsets.UTF_8); in testConsumeFromArray() 78 ByteBuffer input = ByteBuffer.wrap("abcdefg".getBytes(StandardCharsets.UTF_8)); in testConsumeFromByteBuffer()
|
/tools/apksig/src/main/java/com/android/apksig/internal/util/ |
D | X509CertificateUtils.java | 50 public static final byte[] BEGIN_CERT_HEADER = "-----BEGIN CERTIFICATE-----".getBytes(); 51 public static final byte[] END_CERT_FOOTER = "-----END CERTIFICATE-----".getBytes();
|