/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineTest.java | 326 … ByteBuffer bbd = ByteBuffer.allocate(clientEngine.engine.getSession().getApplicationBufferSize()); in test_unwrap_01() 342 …ByteBuffer[] bbA = { ByteBuffer.allocate(100), ByteBuffer.allocate(10), ByteBuffer.allocate(100) }; in test_unwrap_02() 344 ByteBuffer bb = ByteBuffer.allocate(10); in test_unwrap_02() 378 ByteBuffer bbR = ByteBuffer.allocate(100).asReadOnlyBuffer(); in test_unwrap_03() 379 ByteBuffer[] bbA = { bbR, ByteBuffer.allocate(10), ByteBuffer.allocate(100) }; in test_unwrap_03() 381 ByteBuffer bb = ByteBuffer.allocate(10); in test_unwrap_03() 400 … ByteBuffer[] bbA = {ByteBuffer.allocate(100), ByteBuffer.allocate(10), ByteBuffer.allocate(100)}; in test_unwrap_04() 401 ByteBuffer[] bbAN = {ByteBuffer.allocate(100), null, ByteBuffer.allocate(100)}; in test_unwrap_04() 403 ByteBuffer bb = ByteBuffer.allocate(10); in test_unwrap_04() 438 …ByteBuffer[] bbA = { ByteBuffer.allocate(100), ByteBuffer.allocate(10), ByteBuffer.allocate(100) }; in test_unwrap_05() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | ASCIICharsetEncoderTest.java | 85 ByteBuffer out = ByteBuffer.allocate(10); in testMultiStepEncode() 91 out = ByteBuffer.allocate(10); in testMultiStepEncode() 127 ByteBuffer bb = ByteBuffer.allocate(0x10); in testEncodeMapping() 140 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState() 162 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Reset() 170 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Reset() 177 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Reset() 189 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Encoding() 196 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Encoding() 204 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Encoding() [all …]
|
D | CharsetDecoderTest.java | 217 CharBuffer out = decoder.decode(ByteBuffer.allocate(0)); in implTestDecodeByteBuffer() 311 CharBuffer out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer() 365 out = CharBuffer.allocate(4); in implTestDecodeByteBufferCharBuffer() 372 out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer() 376 out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer() 411 CharBuffer out = CharBuffer.allocate(50); in implTestDecodeCharBufferByteBufferUnmappedException() 465 CharBuffer out = CharBuffer.allocate(getString().length() * 3); in implTestDecodeCharBufferByteBufferMalformedException() 514 CharBuffer out = CharBuffer.allocate(50); in implTestDecodeCharBufferByteBufferException() 572 CharBuffer out = CharBuffer.allocate(10); in testFlush() 581 .flush(CharBuffer.allocate(10))); in testFlush() [all …]
|
D | CharsetEncoderTest.java | 278 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), false); in testResetIllegalState() 280 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), true); in testResetIllegalState() 286 ByteBuffer out = ByteBuffer.allocate(5); in testFlushIllegalState() 316 ByteBuffer out = ByteBuffer.allocate(5); in testFlushAfterConstructing() 353 ByteBuffer.allocate(30), true); in testEncodeFacadeIllegalState() 360 ByteBuffer.allocate(30), false); in testEncodeFacadeIllegalState() 367 ByteBuffer.allocate(30), true); in testEncodeFacadeIllegalState() 368 encoder.flush(ByteBuffer.allocate(10)); in testEncodeFacadeIllegalState() 376 ByteBuffer out = ByteBuffer.allocate(5); in testEncodeTrueIllegalState() 388 ByteBuffer.allocate(30), true); in testEncodeTrueIllegalState() [all …]
|
/libcore/ojluni/src/test/java/lang/CharSequence/ |
D | Emptiness.java | 58 checkEmpty(ByteBuffer.allocate(0).asCharBuffer()); in isEmpty() 59 checkEmpty(ByteBuffer.allocate(2).asCharBuffer().append('f')); in isEmpty() 61 checkEmpty((CharBuffer) ByteBuffer.allocate(2).asCharBuffer().flip()); in isEmpty() 86 checkNotEmpty(ByteBuffer.allocate(2).asCharBuffer()); in isNotEmpty() 87 checkNotEmpty(ByteBuffer.allocate(4).asCharBuffer().append('f')); in isNotEmpty() 89 checkNotEmpty((CharBuffer) ByteBuffer.allocate(2).asCharBuffer().append('f').flip()); in isNotEmpty()
|
/libcore/luni/src/test/java/libcore/java/nio/ |
D | CharBufferTest.java | 30 CharBuffer cb = CharBuffer.allocate(32).append(s); in testChars() 41 CharBuffer cb = CharBuffer.allocate(32).append(s); in testCodePoints() 51 cb = CharBuffer.allocate(32).append(surrogateCP); in testCodePoints() 60 CharBuffer cb = CharBuffer.allocate(0); in testEmpty() 62 cb = cb.allocate(32).append(s); in testEmpty()
|
D | BufferTest.java | 67 testByteSwappedBulkGet(ByteBuffer.allocate(10)); in testByteSwappedBulkGetHeap() 160 testByteSwappedBulkPut(ByteBuffer.allocate(10)); in testByteSwappedBulkPutHeap() 213 testByteBufferByteOrder(ByteBuffer.allocate(10), false); in testByteBufferByteOrderHeapRW() 225 testByteBufferByteOrder(ByteBuffer.allocate(10), true); in testByteBufferByteOrderHeapRO() 298 return ByteBuffer.allocate(10).order(order).asCharBuffer(); in allocateCharBuffer() 302 testCharBufferByteOrder(CharBuffer.allocate(10), ByteOrder.nativeOrder()); in testCharBufferByteOrderArray() 329 return ByteBuffer.allocate(10*8).order(order).asDoubleBuffer(); in allocateDoubleBuffer() 333 testDoubleBufferByteOrder(DoubleBuffer.allocate(10), ByteOrder.nativeOrder()); in testDoubleBufferByteOrderArray() 360 return ByteBuffer.allocate(10*8).order(order).asFloatBuffer(); in allocateFloatBuffer() 364 testFloatBufferByteOrder(FloatBuffer.allocate(10), ByteOrder.nativeOrder()); in testFloatBufferByteOrderArray() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | SourceChannelTest.java | 68 sink.write(ByteBuffer.allocate(1)); in test_read_LByteBuffer_DataAvailable() 69 int count = source.read(ByteBuffer.allocate(10)); in test_read_LByteBuffer_DataAvailable() 90 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_LByteBuffer_SinkClosed() 108 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_LByteBuffer_SourceClosed() 172 ByteBuffer[] readBufArray = { ByteBuffer.allocate(BUFFER_SIZE), in test_read_$LByteBuffer() 173 ByteBuffer.allocate(BUFFER_SIZE) }; in test_read_$LByteBuffer() 236 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_$LByteBuffer_SinkClosed() 256 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_$LByteBuffer_SourceClosed() 315 ByteBuffer[] readBufArray = { ByteBuffer.allocate(BUFFER_SIZE), in test_read_$LByteBufferII() 316 ByteBuffer.allocate(BUFFER_SIZE) }; in test_read_$LByteBufferII() [all …]
|
D | FileChannelTest.java | 234 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_position_ReadOnly() 293 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_position_ReadWrite() 394 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_positionJ_ReadOnly() 464 ByteBuffer buf = ByteBuffer.allocate(8); in test_size() 466 ByteBuffer[] bufs = { ByteBuffer.allocate(8) }; in test_size() 1195 ByteBuffer readBuffer = ByteBuffer.allocate(CAPACITY); in test_readLByteBuffer_Closed() 1232 ByteBuffer readBuffer = ByteBuffer.allocate(CAPACITY); in test_readLByteBuffer_WriteOnly() 1250 ByteBuffer readBuffer = ByteBuffer.allocate(CAPACITY); in test_readLByteBuffer_EmptyFile() 1262 ByteBuffer readBuffer = ByteBuffer.allocate(LIMITED_CAPACITY); in test_readLByteBuffer_LimitedCapacity() 1275 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_AS_BYTES_LENGTH); in test_readLByteBuffer() [all …]
|
/libcore/ojluni/src/test/java/nio/Buffer/ |
D | ByteBufferViews.java | 61 size -> ByteBuffer.allocate(size)), 65 size -> (ByteBuffer) ByteBuffer.allocate(size).position(8)), 67 size -> (ByteBuffer) ByteBuffer.allocate(size).position(8).slice()), 69 … size -> (ByteBuffer) ByteBuffer.allocate(size).position(8).slice().duplicate()), 71 size -> ByteBuffer.allocate(size).slice(8,size-8)), 74 size -> (ByteBuffer) ByteBuffer.allocate(size).position(1)), 76 size -> (ByteBuffer) ByteBuffer.allocate(size).position(1).slice()), 78 … size -> (ByteBuffer) ByteBuffer.allocate(size).position(1).slice().duplicate()), 80 size -> ByteBuffer.allocate(size).slice(1,size-1)), 158 static ByteBuffer allocate(IntFunction<ByteBuffer> f) { in allocate() method [all …]
|
D | BasicInt.java | 147 IntBuffer c = IntBuffer.allocate(n + 7); in bulkPutBuffer() 197 IntBuffer nondirect1 = ByteBuffer.allocate(cap).asIntBuffer(); in putBuffer() 201 IntBuffer nondirect2 = ByteBuffer.allocate(cap).asIntBuffer(); in putBuffer() 208 IntBuffer nondirect3 = ByteBuffer.allocate(cap).asIntBuffer(); in putBuffer() 209 IntBuffer nondirect4 = ByteBuffer.allocate(cap).asIntBuffer(); in putBuffer() 824 IntBuffer b2 = IntBuffer.allocate(b.capacity()); in test() 1004 final IntBuffer src = IntBuffer.allocate(1); in test() 1142 catchIllegalArgument((Buffer) null, () -> IntBuffer.allocate(-1)); in testAllocate() 1144 IntBuffer.allocate(-1); in testAllocate() 1176 IntBuffer nondirect1 = IntBuffer.allocate(cap); in testToString() [all …]
|
D | BasicLong.java | 147 LongBuffer c = LongBuffer.allocate(n + 7); in bulkPutBuffer() 197 LongBuffer nondirect1 = ByteBuffer.allocate(cap).asLongBuffer(); in putBuffer() 201 LongBuffer nondirect2 = ByteBuffer.allocate(cap).asLongBuffer(); in putBuffer() 208 LongBuffer nondirect3 = ByteBuffer.allocate(cap).asLongBuffer(); in putBuffer() 209 LongBuffer nondirect4 = ByteBuffer.allocate(cap).asLongBuffer(); in putBuffer() 824 LongBuffer b2 = LongBuffer.allocate(b.capacity()); in test() 1004 final LongBuffer src = LongBuffer.allocate(1); in test() 1142 catchIllegalArgument((Buffer) null, () -> LongBuffer.allocate(-1)); in testAllocate() 1144 LongBuffer.allocate(-1); in testAllocate() 1176 LongBuffer nondirect1 = LongBuffer.allocate(cap); in testToString() [all …]
|
D | BasicShort.java | 147 ShortBuffer c = ShortBuffer.allocate(n + 7); in bulkPutBuffer() 197 ShortBuffer nondirect1 = ByteBuffer.allocate(cap).asShortBuffer(); in putBuffer() 201 ShortBuffer nondirect2 = ByteBuffer.allocate(cap).asShortBuffer(); in putBuffer() 208 ShortBuffer nondirect3 = ByteBuffer.allocate(cap).asShortBuffer(); in putBuffer() 209 ShortBuffer nondirect4 = ByteBuffer.allocate(cap).asShortBuffer(); in putBuffer() 824 ShortBuffer b2 = ShortBuffer.allocate(b.capacity()); in test() 1004 final ShortBuffer src = ShortBuffer.allocate(1); in test() 1142 catchIllegalArgument((Buffer) null, () -> ShortBuffer.allocate(-1)); in testAllocate() 1144 ShortBuffer.allocate(-1); in testAllocate() 1176 ShortBuffer nondirect1 = ShortBuffer.allocate(cap); in testToString() [all …]
|
D | BasicFloat.java | 147 FloatBuffer c = FloatBuffer.allocate(n + 7); in bulkPutBuffer() 197 FloatBuffer nondirect1 = ByteBuffer.allocate(cap).asFloatBuffer(); in putBuffer() 201 FloatBuffer nondirect2 = ByteBuffer.allocate(cap).asFloatBuffer(); in putBuffer() 208 FloatBuffer nondirect3 = ByteBuffer.allocate(cap).asFloatBuffer(); in putBuffer() 209 FloatBuffer nondirect4 = ByteBuffer.allocate(cap).asFloatBuffer(); in putBuffer() 824 FloatBuffer b2 = FloatBuffer.allocate(b.capacity()); in test() 1004 final FloatBuffer src = FloatBuffer.allocate(1); in test() 1142 catchIllegalArgument((Buffer) null, () -> FloatBuffer.allocate(-1)); in testAllocate() 1144 FloatBuffer.allocate(-1); in testAllocate() 1176 FloatBuffer nondirect1 = FloatBuffer.allocate(cap); in testToString() [all …]
|
D | BasicDouble.java | 147 DoubleBuffer c = DoubleBuffer.allocate(n + 7); in bulkPutBuffer() 197 DoubleBuffer nondirect1 = ByteBuffer.allocate(cap).asDoubleBuffer(); in putBuffer() 201 DoubleBuffer nondirect2 = ByteBuffer.allocate(cap).asDoubleBuffer(); in putBuffer() 208 DoubleBuffer nondirect3 = ByteBuffer.allocate(cap).asDoubleBuffer(); in putBuffer() 209 DoubleBuffer nondirect4 = ByteBuffer.allocate(cap).asDoubleBuffer(); in putBuffer() 824 DoubleBuffer b2 = DoubleBuffer.allocate(b.capacity()); in test() 1004 final DoubleBuffer src = DoubleBuffer.allocate(1); in test() 1142 catchIllegalArgument((Buffer) null, () -> DoubleBuffer.allocate(-1)); in testAllocate() 1144 DoubleBuffer.allocate(-1); in testAllocate() 1176 DoubleBuffer nondirect1 = DoubleBuffer.allocate(cap); in testToString() [all …]
|
D | Order.java | 84 ck(ByteBuffer.allocate(LENGTH).order(), be); in testOrder() 86 ck(ByteBuffer.allocate(LENGTH).order(be).order(), be); in testOrder() 87 ck(ByteBuffer.allocate(LENGTH).order(le).order(), le); in testOrder() 91 ckByteBuffer(ByteBuffer.allocate(LENGTH)); in testOrder()
|
D | Chars.java | 107 addCases(CharBuffer.allocate(SIZE), buffers); in createCharBuffers() 109 addCases(ByteBuffer.allocate(SIZE*2).order(ByteOrder.BIG_ENDIAN).asCharBuffer(), in createCharBuffers() 111 addCases(ByteBuffer.allocate(SIZE*2).order(ByteOrder.LITTLE_ENDIAN).asCharBuffer(), in createCharBuffers() 121 buffers.add(CharBuffer.wrap(randomize(CharBuffer.allocate(SIZE)))); in createCharBuffers()
|
D | BasicChar.java | 147 CharBuffer c = CharBuffer.allocate(n + 7); in bulkPutBuffer() 197 CharBuffer nondirect1 = ByteBuffer.allocate(cap).asCharBuffer(); in putBuffer() 201 CharBuffer nondirect2 = ByteBuffer.allocate(cap).asCharBuffer(); in putBuffer() 208 CharBuffer nondirect3 = ByteBuffer.allocate(cap).asCharBuffer(); in putBuffer() 209 CharBuffer nondirect4 = ByteBuffer.allocate(cap).asCharBuffer(); in putBuffer() 824 CharBuffer b2 = CharBuffer.allocate(b.capacity()); in test() 1004 final CharBuffer src = CharBuffer.allocate(1); in test() 1142 catchIllegalArgument((Buffer) null, () -> CharBuffer.allocate(-1)); in testAllocate() 1144 CharBuffer.allocate(-1); in testAllocate() 1186 test(0, CharBuffer.allocate(7 * 1024), false); in test() [all …]
|
/libcore/ojluni/src/test/java/util/HashMap/ |
D | HashMapCloneLeak.java | 61 Object[] allocate = new Object[1000000]; in main() local 62 allocate[0] = chain; in main() 63 chain = allocate; in main()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | OldFileChannelTest.java | 260 ByteBuffer readBuffer = ByteBuffer.allocate(CAPACITY); in test_readLByteBufferJ_IllegalArgument() 545 readBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_IndexOutOfBound() 546 readBuffers[1] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_IndexOutOfBound() 610 readBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_EmptyFile() 611 readBuffers[1] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_EmptyFile() 620 readBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_EmptyBuffers() 629 readBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_EmptyBuffers() 653 ByteBuffer writeBuffer = ByteBuffer.allocate(CAPACITY); in test_writeLByteBuffer_Closed() 713 ByteBuffer writeBuffer = ByteBuffer.allocate(CAPACITY); in test_writeLByteBufferJ_IllegalArgument() 784 writeBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_write$LByteBuffer_Closed() [all …]
|
/libcore/ojluni/src/test/java/io/Reader/ |
D | NullReader.java | 87 CharBuffer charBuffer = CharBuffer.allocate(1); in testReadCharBuffer() 94 CharBuffer charBuffer = CharBuffer.allocate(0); in testReadCharBufferZeroRemaining() 127 CharBuffer charBuffer = CharBuffer.allocate(0); in testReadCharBufferClosed() 133 CharBuffer charBuffer = CharBuffer.allocate(0); in testReadCharBufferZeroRemainingClosed()
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | CharsetEncoderTest.java | 71 ByteBuffer bb = ByteBuffer.allocate(128); in testSurrogatePairAllAtOnce() 85 ByteBuffer bb = ByteBuffer.allocate(128); in testMalformedSurrogatePair() 122 ByteBuffer bb = ByteBuffer.allocate(128); in testCharsetEncoderSplitSurrogates() 146 ByteBuffer bb = ByteBuffer.allocate(128); in testFlushWithoutEndOfInput() 206 ByteBuffer bb = ByteBuffer.allocate(4); 207 CoderResult cr = e.encode(CharBuffer.allocate(0), bb, true); 223 ByteBuffer output = ByteBuffer.allocate(10);
|
/libcore/ojluni/src/test/java/nio/channels/Selector/ |
D | SelectAfterRead.java | 53 sc.read(ByteBuffer.allocate(1)); in testSelectAfterRead() 83 if (sc.read(ByteBuffer.allocate(1)) != 1) in testSelectAfterRead() 85 if (sc.read(ByteBuffer.allocate(1)) != 1) in testSelectAfterRead()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
D | HeapFloatBufferTest.java | 23 buf = FloatBuffer.allocate(BUFFER_LENGTH); in setUp() 36 FloatBuffer.allocate(-1); in testAllocatedFloatBuffer_IllegalArg()
|
D | HeapCharBufferTest.java | 25 buf = CharBuffer.allocate(BUFFER_LENGTH); in setUp() 38 CharBuffer.allocate(-1); in testAllocatedCharBuffer_IllegalArg()
|