/libcore/ojluni/src/test/java/nio/Buffer/ |
D | StringCharBufferSliceTest.java | 44 helper(buff, buff.slice()); in testSlice() 45 helper(buff, buff.slice(0, buff.remaining())); in testSlice() 48 helper(buff, buff.slice()); in testSlice() 49 helper(buff, buff.slice(2, buff.remaining())); in testSlice() 52 helper(buff, buff.slice()); in testSlice() 53 helper(buff, buff.slice(0, buff.remaining())); in testSlice() 65 bitest.accept(buff, buff.slice()); in testSlice() 67 bitest.accept(buff, buff.slice(4, 3)); in testSlice() 79 bitest.accept(buff, buff.slice()); in testSlice() 81 bitest.accept(buff, buff.slice(4, 3)); in testSlice() [all …]
|
D | BasicLong.java | 199 private static void checkSlice(LongBuffer b, LongBuffer slice) { in checkSlice() argument 200 ck(slice, 0, slice.position()); in checkSlice() 201 ck(slice, b.remaining(), slice.limit()); in checkSlice() 202 ck(slice, b.remaining(), slice.capacity()); in checkSlice() 203 if (b.isDirect() != slice.isDirect()) in checkSlice() 204 fail("Lost direction", slice); in checkSlice() 205 if (b.isReadOnly() != slice.isReadOnly()) in checkSlice() 206 fail("Lost read-only", slice); in checkSlice() 642 catchIndexOutOfBounds(b, () -> b.slice(-1, 7)); in test() 643 catchIndexOutOfBounds(b, () -> b.slice(b.limit() + 1, 7)); in test() [all …]
|
D | BasicInt.java | 199 private static void checkSlice(IntBuffer b, IntBuffer slice) { in checkSlice() argument 200 ck(slice, 0, slice.position()); in checkSlice() 201 ck(slice, b.remaining(), slice.limit()); in checkSlice() 202 ck(slice, b.remaining(), slice.capacity()); in checkSlice() 203 if (b.isDirect() != slice.isDirect()) in checkSlice() 204 fail("Lost direction", slice); in checkSlice() 205 if (b.isReadOnly() != slice.isReadOnly()) in checkSlice() 206 fail("Lost read-only", slice); in checkSlice() 642 catchIndexOutOfBounds(b, () -> b.slice(-1, 7)); in test() 643 catchIndexOutOfBounds(b, () -> b.slice(b.limit() + 1, 7)); in test() [all …]
|
D | BasicShort.java | 199 private static void checkSlice(ShortBuffer b, ShortBuffer slice) { in checkSlice() argument 200 ck(slice, 0, slice.position()); in checkSlice() 201 ck(slice, b.remaining(), slice.limit()); in checkSlice() 202 ck(slice, b.remaining(), slice.capacity()); in checkSlice() 203 if (b.isDirect() != slice.isDirect()) in checkSlice() 204 fail("Lost direction", slice); in checkSlice() 205 if (b.isReadOnly() != slice.isReadOnly()) in checkSlice() 206 fail("Lost read-only", slice); in checkSlice() 642 catchIndexOutOfBounds(b, () -> b.slice(-1, 7)); in test() 643 catchIndexOutOfBounds(b, () -> b.slice(b.limit() + 1, 7)); in test() [all …]
|
D | BasicFloat.java | 199 private static void checkSlice(FloatBuffer b, FloatBuffer slice) { in checkSlice() argument 200 ck(slice, 0, slice.position()); in checkSlice() 201 ck(slice, b.remaining(), slice.limit()); in checkSlice() 202 ck(slice, b.remaining(), slice.capacity()); in checkSlice() 203 if (b.isDirect() != slice.isDirect()) in checkSlice() 204 fail("Lost direction", slice); in checkSlice() 205 if (b.isReadOnly() != slice.isReadOnly()) in checkSlice() 206 fail("Lost read-only", slice); in checkSlice() 642 catchIndexOutOfBounds(b, () -> b.slice(-1, 7)); in test() 643 catchIndexOutOfBounds(b, () -> b.slice(b.limit() + 1, 7)); in test() [all …]
|
D | BasicDouble.java | 199 private static void checkSlice(DoubleBuffer b, DoubleBuffer slice) { in checkSlice() argument 200 ck(slice, 0, slice.position()); in checkSlice() 201 ck(slice, b.remaining(), slice.limit()); in checkSlice() 202 ck(slice, b.remaining(), slice.capacity()); in checkSlice() 203 if (b.isDirect() != slice.isDirect()) in checkSlice() 204 fail("Lost direction", slice); in checkSlice() 205 if (b.isReadOnly() != slice.isReadOnly()) in checkSlice() 206 fail("Lost read-only", slice); in checkSlice() 642 catchIndexOutOfBounds(b, () -> b.slice(-1, 7)); in test() 643 catchIndexOutOfBounds(b, () -> b.slice(b.limit() + 1, 7)); in test() [all …]
|
D | BasicChar.java | 199 private static void checkSlice(CharBuffer b, CharBuffer slice) { in checkSlice() argument 200 ck(slice, 0, slice.position()); in checkSlice() 201 ck(slice, b.remaining(), slice.limit()); in checkSlice() 202 ck(slice, b.remaining(), slice.capacity()); in checkSlice() 203 if (b.isDirect() != slice.isDirect()) in checkSlice() 204 fail("Lost direction", slice); in checkSlice() 205 if (b.isReadOnly() != slice.isReadOnly()) in checkSlice() 206 fail("Lost read-only", slice); in checkSlice() 642 catchIndexOutOfBounds(b, () -> b.slice(-1, 7)); in test() 643 catchIndexOutOfBounds(b, () -> b.slice(b.limit() + 1, 7)); in test() [all …]
|
D | BasicByte.java | 199 private static void checkSlice(ByteBuffer b, ByteBuffer slice) { in checkSlice() argument 200 ck(slice, 0, slice.position()); in checkSlice() 201 ck(slice, b.remaining(), slice.limit()); in checkSlice() 202 ck(slice, b.remaining(), slice.capacity()); in checkSlice() 203 if (b.isDirect() != slice.isDirect()) in checkSlice() 204 fail("Lost direction", slice); in checkSlice() 205 if (b.isReadOnly() != slice.isReadOnly()) in checkSlice() 206 fail("Lost read-only", slice); in checkSlice() 364 ByteBuffer ab = intermediate.slice(); in testAlign() 376 intermediate = (ByteBuffer) ab.slice().position(p).limit(l); in testAlign() [all …]
|
D | Basic-X.java.template | 199 private static void checkSlice($Type$Buffer b, $Type$Buffer slice) { 200 ck(slice, 0, slice.position()); 201 ck(slice, b.remaining(), slice.limit()); 202 ck(slice, b.remaining(), slice.capacity()); 203 if (b.isDirect() != slice.isDirect()) 204 fail("Lost direction", slice); 205 if (b.isReadOnly() != slice.isReadOnly()) 206 fail("Lost read-only", slice); 360 // Created aligned slice to test against 364 ByteBuffer ab = intermediate.slice(); [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/ |
D | BufferTest.java | 250 assertEquals(ByteOrder.BIG_ENDIAN, b.slice().order()); in testByteBufferByteOrder() 252 assertEquals(ByteOrder.BIG_ENDIAN, b.slice().order()); in testByteBufferByteOrder() 290 assertEquals(bo, b.slice().order()); in testCharBufferByteOrder() 294 assertEquals(bo, b.slice().order()); in testCharBufferByteOrder() 321 assertEquals(bo, b.slice().order()); in testDoubleBufferByteOrder() 325 assertEquals(bo, b.slice().order()); in testDoubleBufferByteOrder() 352 assertEquals(bo, b.slice().order()); in testFloatBufferByteOrder() 356 assertEquals(bo, b.slice().order()); in testFloatBufferByteOrder() 383 assertEquals(bo, b.slice().order()); in testIntBufferByteOrder() 387 assertEquals(bo, b.slice().order()); in testIntBufferByteOrder() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
D | SliceSliceDirectByteBufferTest.java | 25 buf = buf.slice(); in setUp() 27 buf = buf.slice(); in setUp()
|
D | IntBufferTest.java | 571 IntBuffer slice = buf.slice(); in testSlice() local 572 assertEquals(buf.isReadOnly(), slice.isReadOnly()); in testSlice() 573 assertEquals(buf.isDirect(), slice.isDirect()); in testSlice() 574 assertEquals(buf.order(), slice.order()); in testSlice() 575 assertEquals(slice.position(), 0); in testSlice() 576 assertEquals(slice.limit(), buf.remaining()); in testSlice() 577 assertEquals(slice.capacity(), buf.remaining()); in testSlice() 579 slice.reset(); in testSlice() 586 if (!slice.isReadOnly()) { in testSlice() 587 loadTestData1(slice); in testSlice() [all …]
|
D | DoubleBufferTest.java | 595 DoubleBuffer slice = buf.slice(); 596 assertEquals(buf.isReadOnly(), slice.isReadOnly()); 597 assertEquals(buf.isDirect(), slice.isDirect()); 598 assertEquals(buf.order(), slice.order()); 599 assertEquals(slice.position(), 0); 600 assertEquals(slice.limit(), buf.remaining()); 601 assertEquals(slice.capacity(), buf.remaining()); 603 slice.reset(); 611 if (!slice.isReadOnly()) { 612 loadTestData1(slice); [all …]
|
D | FloatBufferTest.java | 595 FloatBuffer slice = buf.slice(); in testSlice() local 596 assertEquals(buf.isReadOnly(), slice.isReadOnly()); in testSlice() 597 assertEquals(buf.isDirect(), slice.isDirect()); in testSlice() 598 assertEquals(buf.order(), slice.order()); in testSlice() 599 assertEquals(slice.position(), 0); in testSlice() 600 assertEquals(slice.limit(), buf.remaining()); in testSlice() 601 assertEquals(slice.capacity(), buf.remaining()); in testSlice() 603 slice.reset(); in testSlice() 610 if (!slice.isReadOnly()) { in testSlice() 611 loadTestData1(slice); in testSlice() [all …]
|
D | LongBufferTest.java | 578 LongBuffer slice = buf.slice(); in testSlice() local 579 assertEquals(buf.isReadOnly(), slice.isReadOnly()); in testSlice() 580 assertEquals(buf.isDirect(), slice.isDirect()); in testSlice() 581 assertEquals(buf.order(), slice.order()); in testSlice() 582 assertEquals(slice.position(), 0); in testSlice() 583 assertEquals(slice.limit(), buf.remaining()); in testSlice() 584 assertEquals(slice.capacity(), buf.remaining()); in testSlice() 586 slice.reset(); in testSlice() 593 if (!slice.isReadOnly()) { in testSlice() 594 loadTestData1(slice); in testSlice() [all …]
|
D | ShortBufferTest.java | 558 ShortBuffer slice = buf.slice(); in testSlice() local 559 assertEquals(buf.isReadOnly(), slice.isReadOnly()); in testSlice() 560 assertEquals(buf.isDirect(), slice.isDirect()); in testSlice() 561 assertEquals(buf.order(), slice.order()); in testSlice() 562 assertEquals(slice.position(), 0); in testSlice() 563 assertEquals(slice.limit(), buf.remaining()); in testSlice() 564 assertEquals(slice.capacity(), buf.remaining()); in testSlice() 566 slice.reset(); in testSlice() 573 if (!slice.isReadOnly()) { in testSlice() 574 loadTestData1(slice); in testSlice() [all …]
|
D | CharBufferTest.java | 627 CharBuffer slice = buf.slice(); in testSlice() local 628 assertEquals(buf.isReadOnly(), slice.isReadOnly()); in testSlice() 629 assertEquals(buf.isDirect(), slice.isDirect()); in testSlice() 630 assertEquals(buf.order(), slice.order()); in testSlice() 631 assertEquals(slice.position(), 0); in testSlice() 632 assertEquals(slice.limit(), buf.remaining()); in testSlice() 633 assertEquals(slice.capacity(), buf.remaining()); in testSlice() 635 slice.reset(); in testSlice() 642 if (!slice.isReadOnly()) { in testSlice() 643 loadTestData1(slice); in testSlice() [all …]
|
D | SliceDirectByteBufferTest.java | 25 buf = buf.slice(); in setUp()
|
D | SliceWrappedByteBufferTest.java | 25 buf = buf.slice(); in setUp()
|
D | SliceHeapByteBufferTest.java | 25 buf = buf.slice(); in setUp()
|
/libcore/ojluni/src/test/java/lang/invoke/VarHandles/ |
D | VarHandleBaseByteArrayTest.java | 295 … new ByteBufferSource(ByteBuffer.wrap(array, array.length / 4, array.length / 2).slice(), in setupByteSources() 304 … new ByteBufferSource(ByteBuffer.wrap(array, array.length / 4 - 1, array.length / 2).slice(), in setupByteSources() 324 …eBufferSource(((ByteBuffer) dbb.s.slice().position(array.length / 4).limit(array.length / 4 + arra… in setupByteSources() 334 …ferSource(((ByteBuffer) dbb.s.slice().position(array.length / 4 - 1).limit(array.length / 4 - 1 + … in setupByteSources()
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | CharsetDecoderTest.java | 43 ByteBuffer inBuffer = ByteBuffer.wrap(arr, 0, arr.length).slice(); in test_ByteArray_decode_no_offset() 59 ByteBuffer inBuffer = ByteBuffer.wrap(arr, offset, arr.length - offset).slice(); in test_ByteArray_decode_with_offset() 117 CharBuffer out = cb.slice(); in testBufferWithNonZeroOffset()
|
/libcore/ojluni/src/main/java/java/nio/ |
D | MappedByteBuffer.java | 225 public abstract ByteBuffer slice(); in slice() method in MappedByteBuffer 238 public abstract MappedByteBuffer slice(int index, int length); in slice() method in MappedByteBuffer
|
D | ByteBufferAsShortBuffer.java | 58 public ShortBuffer slice() { in slice() method in ByteBufferAsShortBuffer 69 public ShortBuffer slice(int index, int length) { in slice() method in ByteBufferAsShortBuffer
|
D | StringCharBuffer.java | 45 public CharBuffer slice() { in slice() method in StringCharBuffer 55 public CharBuffer slice(int index, int length) { in slice() method in StringCharBuffer
|