Home
last modified time | relevance | path

Searched refs:read (Results 1 – 25 of 284) sorted by relevance

12345678910>>...12

/cts/tests/tests/content/src/android/content/res/cts/
DAssetFileDescriptor_AutoCloseInputStreamTest.java62 assertEquals(FILE_DATA[0], mInput.read()); in testSkip()
64 assertEquals(FILE_DATA[1], mInput.read()); in testSkip()
66 assertEquals(FILE_DATA[5], mInput.read()); in testSkip()
68 assertEquals(FILE_END, mInput.read()); in testSkip()
74 assertEquals(FILE_DATA[i], mInput.read()); in testRead()
76 assertEquals(FILE_END, mInput.read()); in testRead()
83 assertEquals(FILE_DATA[i], mInput.read()); in testReadPartial()
85 assertEquals(FILE_END, mInput.read()); in testReadPartial()
91 assertEquals(3, mInput.read(buf, 0, 3)); in testReadBufferLen()
92 assertEquals(3, mInput.read(buf, 3, 3)); in testReadBufferLen()
[all …]
DAssetManager_AssetInputStreamTest.java55 mAssetInputStream.read(); in testClose()
78 assertEquals(EXPECTED_BYTES[i], mAssetInputStream.read()); in testMarkReset()
83 assertEquals(EXPECTED_BYTES[10 + i], mAssetInputStream.read()); in testMarkReset()
91 assertEquals(EXPECTED_BYTES[i], mAssetInputStream.read()); in testSingleByteRead()
96 assertEquals(-1, mAssetInputStream.read()); in testSingleByteRead()
103 assertEquals(10, mAssetInputStream.read(buffer)); in testByteArrayRead()
109 assertEquals(5, mAssetInputStream.read(buffer)); in testByteArrayRead()
116 assertEquals(buffer.length, mAssetInputStream.read(buffer)); in testByteArrayRead()
117 assertEquals(-1, mAssetInputStream.read(buffer)); in testByteArrayRead()
124 assertEquals(10, mAssetInputStream.read(buffer, 0, 10)); in testByteArrayReadOffset()
[all …]
DRawResourceTest.java48 while ((readCount = is.read(buffer, 0, buffer.length)) > 0) { in verifyTextAsset()
58 readCount = is.read(buffer, 0, buffer.length); in verifyTextAsset()
62 readCount = is.read(buffer, buffer.length, 0); in verifyTextAsset()
DAssetFileDescriptor_AutoCloseOutputStreamTest.java73 assertEquals(FILE_DATA[i], inputStream.read()); in testAutoCloseOutputStream()
76 assertEquals(FILE_DATA[i], inputStream.read()); in testAutoCloseOutputStream()
78 assertEquals(FILE_END, inputStream.read()); in testAutoCloseOutputStream()
/cts/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/
DReadGiftTest.java35 for (File read : readList) { in testStageNonGifts()
36 read.getParentFile().mkdirs(); in testStageNonGifts()
37 assertTrue(read.createNewFile()); in testStageNonGifts()
38 writeInt(read, 101); in testStageNonGifts()
52 for (File read : readList) { in testNoGifts()
53 assertFileReadWriteAccess(read); in testNoGifts()
54 assertEquals(101, readInt(read)); in testNoGifts()
/cts/apps/CtsVerifierUSBCompanion/src/com/android/cts/verifierusbcompanion/
DDeviceTestCompanion.java63 int numRead = is.read(sizeBuffer); in nextTest()
67 numRead = is.read(nextTestNameBytes); in nextTest()
74 numRead = is.read(sizeBuffer); in nextTest()
96 int read = 0; in echoBytes() local
98 while (read != size) { in echoBytes()
99 int ret = is.read(buffer, read, size - read); in echoBytes()
103 read += ret; in echoBytes()
125 int numRead = is.read(dataBytes); in echoUntilStopSignal()
/cts/suite/audio_quality/lib/src/
DClientSocket.cpp96 int read; in readData() local
117 read = recv(mSocket, (void*)data, toRead, 0); in readData()
118 if (read > 0) { in readData()
119 toRead -= read; in readData()
120 data += read; in readData()
121 } else if (read == 0) { in readData()
128 LOGE("recv returned %d", read); in readData()
DSignalProcessingImpl.cpp159 if (!read((char*)header, sizeof(header))) { in run()
181 if (!read((char*)&type, sizeof(type))) { in run()
187 if (!read((char*)&dataLen, sizeof(dataLen))) { in run()
213 if (!read((*buffer)->getData(), dataLen)) { in run()
223 if (!read((char*)val->getPtr(), sizeof(int64_t))) { in run()
247 bool SignalProcessingImpl::read(char* data, int len) in read() function in SignalProcessingImpl
/cts/tools/vm-tests-tf/build/src/util/build/
DFileUtil.java33 int read = fis.read(tmp, pos, tmp.length - pos); in readFile() local
34 if (read == -1) { in readFile()
37 pos += read; in readFile()
/cts/tests/tests/os/src/android/os/cts/
DParcelFileDescriptorTest.java78 assertEquals(0, in.read()); in testConstructorAndOpen()
79 assertEquals(1, in.read()); in testConstructorAndOpen()
80 assertEquals(2, in.read()); in testConstructorAndOpen()
81 assertEquals(3, in.read()); in testConstructorAndOpen()
130 assertEquals(DATA, in.read()); in testFromSocket()
147 int count = is.read(observed); in assertInputStreamContent()
149 assertEquals(-1, is.read()); in assertInputStreamContent()
173 assertEquals(0, in.read()); in testWriteToParcel()
174 assertEquals(1, in.read()); in testWriteToParcel()
175 assertEquals(2, in.read()); in testWriteToParcel()
[all …]
DParcelFileDescriptorProcessTest.java132 assertEquals(1, red.read()); in testPullPipeNormal()
135 assertEquals(-1, red.read()); in testPullPipeNormal()
145 assertEquals(2, blue.read()); in testPushPipeNormal()
148 assertEquals(-1, blue.read()); in testPushPipeNormal()
161 assertEquals(3, blue.read()); in testPipeWriterError()
162 assertEquals(-1, blue.read()); in testPipeWriterError()
175 assertEquals(4, blue.read()); in testPipeWriterCrash()
176 assertEquals(-1, blue.read()); in testPipeWriterCrash()
188 assertEquals(5, blue.read()); in testSocketCrash()
190 assertEquals(6, red.read()); in testSocketCrash()
[all …]
DRecoverySystemTest.java50 int read; in getAsset() local
51 while ((read = is.read(b)) != -1) { in getAsset()
52 fos.write(b, 0, read); in getAsset()
DParcelFileDescriptor_AutoCloseInputStreamTest.java30 assertEquals(0, in.read()); in testAutoCloseInputStream()
35 in.read(); in testAutoCloseInputStream()
DMemoryFileTest.java73 assertEquals(1, in.read()); in testGetOutputStream()
74 assertEquals(2, in.read()); in testGetOutputStream()
75 assertEquals(3, in.read()); in testGetOutputStream()
76 assertEquals(4, in.read()); in testGetOutputStream()
/cts/suite/audio_quality/test/
DTaskTest.cpp116 android::String8 read; in TEST_F() local
122 ASSERT_TRUE(task->findStringAttributePublic(AAA, read)); in TEST_F()
123 ASSERT_TRUE(read == aaaVal); in TEST_F()
124 ASSERT_TRUE(task->findStringAttributePublic(BBB, read)); in TEST_F()
125 ASSERT_TRUE(read == bbbVal); in TEST_F()
128 ASSERT_TRUE(!task->findStringAttributePublic(VERSION, read)); in TEST_F()
129 ASSERT_TRUE(!task->findStringAttributePublic(NAME, read)); in TEST_F()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DAudioRecordHelper.java105 int read = audioRecord.read(data, 0, bufferSize); in startPullingData() local
106 if (read > 0) { in startPullingData()
107 os.write(data, 0, read); in startPullingData()
109 if (read < 0) { in startPullingData()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/accessory/
DUsbAccessoryTestActivity.java160 int numRead = is.read(buffer32); in onAttached()
169 numRead = is.read(buffer16); in onAttached()
182 numRead = is.read(buffer32); in onAttached()
194 numRead = is.read(buffer32); in onAttached()
199 numRead = is.read(buffer32); in onAttached()
209 numRead = is.read(bufferMax); in onAttached()
224 numRead = is.read(bufferMax); in onAttached()
228 numRead = is.read(bufferMax); in onAttached()
241 numRead = is.read(result); in onAttached()
259 numRead = is.read(bufferMax); in onAttached()
[all …]
/cts/hostsidetests/appsecurity/test-apps/UseProcessSuccess/src/com/android/cts/useprocess/
DBaseNetworkService.java188 int read = 0;
193 while (read < byteCount * packetCount) {
194 int n = in.read(buf);
196 writeResult(reply, "Unexpected EOF @ " + read,null);
199 read += n;
204 if (read != (byteCount * packetCount)) {
206 + (byteCount * packetCount) + ", received" + read, null);
/cts/tests/backup/app/src/android/backup/app/
DKeyValueBackupAgent.java54 int read; in onBackup() local
55 while ((read = input.read(buffer)) >= 0) { in onBackup()
56 data.writeEntityData(buffer, read); in onBackup()
/cts/tests/tests/renderscript/src/android/renderscript/cts/
Dgroup2.rscript14 rsDebug("Failed to read in on iteration: ", x);
19 rsDebug("Failed to read -5 on iteration: ", x);
25 // Write out aFailed if either of our kernel instances read old data.
/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/
DXmpDepthDecode.java66 XMPMeta meta = read(is, false); in XmpDepthDecode()
143 static XMPMeta read(InputStream is, boolean skipExtendedContent) { in read() method in XmpDepthDecode
214 if (is.read() != 0xff || is.read() != M_SOI) { in parse()
218 while ((c = is.read()) != -1) { in parse()
223 while ((c = is.read()) == 0xff) { in parse()
237 is.read(section.data, 0, section.data.length); in parse()
242 int lh = is.read(); in parse()
243 int ll = is.read(); in parse()
301 is.read(section.data, 0, length - 2); in readSection()
306 is.read(header, 0, header.length); in readSection()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DAudioHelper.java542 public int read(byte[] audioData, int offsetInBytes, int sizeInBytes) { in read() method in AudioHelper.AudioRecordAudit
546 int samples = super.read(audioData, offsetInBytes, sizeInBytes); in read()
555 public int read(byte[] audioData, int offsetInBytes, int sizeInBytes, int readMode) { in read() method in AudioHelper.AudioRecordAudit
559 int samples = super.read(audioData, offsetInBytes, sizeInBytes, readMode); in read()
569 public int read(short[] audioData, int offsetInShorts, int sizeInShorts) { in read() method in AudioHelper.AudioRecordAudit
573 int samples = super.read(audioData, offsetInShorts, sizeInShorts); in read()
582 public int read(short[] audioData, int offsetInShorts, int sizeInShorts, int readMode) { in read() method in AudioHelper.AudioRecordAudit
586 int samples = super.read(audioData, offsetInShorts, sizeInShorts, readMode); in read()
596 public int read(float[] audioData, int offsetInFloats, int sizeInFloats, int readMode) { in read() method in AudioHelper.AudioRecordAudit
600 int samples = super.read(audioData, offsetInFloats, sizeInFloats, readMode); in read()
[all …]
/cts/tools/incremental-cts/
Dtarget_file_handler.py40 hash_dict[file_name] = hash_func(f.read())
42 hash_dict[file_name] = hash(f.read())
/cts/tests/tests/mediaparser/src/android/media/mediaparser/cts/
DMockMediaParserInputReader.java44 public int read(byte[] buffer, int offset, int readLength) throws IOException { in read() method in MockMediaParserInputReader
45 return mFakeExtractorInput.read(buffer, offset, readLength); in read()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/proxy/
DPassthroughTestHelper.java102 int c = in.read(); in readAsciiLine()
118 private void passthrough(PrintStream print, InputStream read) throws Exception { in passthrough() argument
123 String line = readAsciiLine(read); in passthrough()

12345678910>>...12