/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | ASCIICharsetEncoderTest.java | 80 encoder.encode(CharBuffer.wrap("\ud800\udc00")); in testMultiStepEncode() 87 encoder.encode(CharBuffer.wrap("\ud800"), out, true)); in testMultiStepEncode() 92 CharBuffer buffer1 = CharBuffer.wrap("\ud800"); in testMultiStepEncode() 93 CharBuffer buffer2 = CharBuffer.wrap("\udc00"); in testMultiStepEncode() 108 CharBuffer cb = CharBuffer.wrap(chars); in testEncodeMapping() 113 CharBuffer cb = CharBuffer.wrap("\u0080"); in testEncodeMapping() 120 cb = CharBuffer.wrap("\ud800"); in testEncodeMapping() 128 cb = CharBuffer.wrap("A"); in testEncodeMapping() 139 CharBuffer in = CharBuffer.wrap("A"); in testInternalState() 145 in = CharBuffer.wrap("B"); in testInternalState() [all …]
|
D | CharsetEncoderTest.java | 276 encoder.encode(CharBuffer.wrap("aaa")); in testResetIllegalState() 278 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), false); in testResetIllegalState() 280 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), true); in testResetIllegalState() 285 CharBuffer in = CharBuffer.wrap("aaa"); in testFlushIllegalState() 331 CharBuffer in = CharBuffer.wrap("aaa"); in testEncodeFacadeIllegalState() 352 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), in testEncodeFacadeIllegalState() 359 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), in testEncodeFacadeIllegalState() 366 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), in testEncodeFacadeIllegalState() 375 CharBuffer in = CharBuffer.wrap("aaa"); in testEncodeTrueIllegalState() 387 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), in testEncodeTrueIllegalState() [all …]
|
D | ISOCharsetEncoderTest.java | 68 return CharBuffer.wrap("\ud800 buffer"); in getMalformedCharBuffer() 72 return CharBuffer.wrap("\ud800\udc00 buffer"); in getUnmapCharBuffer() 87 encoder.encode(CharBuffer.wrap("\ud800\udc00")); in testMultiStepEncode()
|
D | CharsetDecoder2Test.java | 94 ByteBuffer in = ByteBuffer.wrap(new byte[] { 109, 97, 109 }); in test_decode() 112 ByteBuffer.wrap(new byte[] { 0x00, 0x11 })); in test_decodeLjava_nio_ByteBuffer() 121 cs2.decode(ByteBuffer.wrap(new byte[] { 0x00, 0x11 })); in test_decodeLjava_nio_ByteBuffer() 191 ByteBuffer in = ByteBuffer.wrap(new byte[] { 0x45, 0x38, 0x45, 0x45 }); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() 259 CharBuffer cb = decoder.decode(ByteBuffer.wrap(bytes)); in testInvalidDecoding()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
D | WrappedIntBufferTest.java | 23 buf = IntBuffer.wrap(new int[BUFFER_LENGTH]); in setUp() 41 IntBuffer.wrap(array, -1, 0); in testWrappedIntBuffer_IllegalArg() 47 IntBuffer.wrap(array, 21, 0); in testWrappedIntBuffer_IllegalArg() 53 IntBuffer.wrap(array, 0, -1); in testWrappedIntBuffer_IllegalArg() 59 IntBuffer.wrap(array, 0, 21); in testWrappedIntBuffer_IllegalArg() 65 IntBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedIntBuffer_IllegalArg() 71 IntBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedIntBuffer_IllegalArg() 77 IntBuffer.wrap((int[])null, -1, 0); in testWrappedIntBuffer_IllegalArg() 82 IntBuffer buf = IntBuffer.wrap(array, 2, 16); in testWrappedIntBuffer_IllegalArg()
|
D | WrappedLongBufferTest.java | 23 buf = LongBuffer.wrap(new long[BUFFER_LENGTH]); in setUp() 41 LongBuffer.wrap(array, -1, 0); in testWrappedLongBuffer_IllegalArg() 47 LongBuffer.wrap(array, 21, 0); in testWrappedLongBuffer_IllegalArg() 53 LongBuffer.wrap(array, 0, -1); in testWrappedLongBuffer_IllegalArg() 59 LongBuffer.wrap(array, 0, 21); in testWrappedLongBuffer_IllegalArg() 65 LongBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedLongBuffer_IllegalArg() 71 LongBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedLongBuffer_IllegalArg() 77 LongBuffer.wrap((long[])null, -1, 0); in testWrappedLongBuffer_IllegalArg() 82 LongBuffer buf = LongBuffer.wrap(array, 2, 16); in testWrappedLongBuffer_IllegalArg()
|
D | WrappedShortBufferTest.java | 23 buf = ShortBuffer.wrap(new short[BUFFER_LENGTH]); in setUp() 41 ShortBuffer.wrap(array, -1, 0); in testWrappedShortBuffer_IllegalArg() 47 ShortBuffer.wrap(array, 21, 0); in testWrappedShortBuffer_IllegalArg() 53 ShortBuffer.wrap(array, 0, -1); in testWrappedShortBuffer_IllegalArg() 59 ShortBuffer.wrap(array, 0, 21); in testWrappedShortBuffer_IllegalArg() 65 ShortBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedShortBuffer_IllegalArg() 71 ShortBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedShortBuffer_IllegalArg() 77 ShortBuffer.wrap((short[])null, -1, 0); in testWrappedShortBuffer_IllegalArg() 82 ShortBuffer buf = ShortBuffer.wrap(array, 2, 16); in testWrappedShortBuffer_IllegalArg()
|
D | WrappedFloatBufferTest.java | 23 buf = FloatBuffer.wrap(new float[BUFFER_LENGTH]); in setUp() 41 FloatBuffer.wrap(array, -1, 0); in testWrappedFloatBuffer_IllegalArg() 47 FloatBuffer.wrap(array, 21, 0); in testWrappedFloatBuffer_IllegalArg() 53 FloatBuffer.wrap(array, 0, -1); in testWrappedFloatBuffer_IllegalArg() 59 FloatBuffer.wrap(array, 0, 21); in testWrappedFloatBuffer_IllegalArg() 65 FloatBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedFloatBuffer_IllegalArg() 71 FloatBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedFloatBuffer_IllegalArg() 77 FloatBuffer.wrap((float[])null, -1, 0); in testWrappedFloatBuffer_IllegalArg() 82 FloatBuffer buf = FloatBuffer.wrap(array, 2, 16); in testWrappedFloatBuffer_IllegalArg()
|
D | WrappedDoubleBufferTest.java | 23 buf = DoubleBuffer.wrap(new double[BUFFER_LENGTH]); in setUp() 41 DoubleBuffer.wrap(array, -1, 0); in testWrappedDoubleuffer_IllegalArg() 47 DoubleBuffer.wrap(array, 21, 0); in testWrappedDoubleuffer_IllegalArg() 53 DoubleBuffer.wrap(array, 0, -1); in testWrappedDoubleuffer_IllegalArg() 59 DoubleBuffer.wrap(array, 0, 21); in testWrappedDoubleuffer_IllegalArg() 65 DoubleBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedDoubleuffer_IllegalArg() 71 DoubleBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedDoubleuffer_IllegalArg() 77 DoubleBuffer.wrap((double[])null, -1, 0); in testWrappedDoubleuffer_IllegalArg() 82 DoubleBuffer buf = DoubleBuffer.wrap(array, 2, 16); in testWrappedDoubleuffer_IllegalArg()
|
D | WrappedCharBufferTest1.java | 25 buf = CharBuffer.wrap(new char[BUFFER_LENGTH]); in setUp() 43 CharBuffer.wrap(array, -1, 0); in testWrappedCharBuffer_IllegalArg() 49 CharBuffer.wrap(array, BUFFER_LENGTH + 1, 0); in testWrappedCharBuffer_IllegalArg() 55 CharBuffer.wrap(array, 0, -1); in testWrappedCharBuffer_IllegalArg() 61 CharBuffer.wrap(array, 0, BUFFER_LENGTH + 1); in testWrappedCharBuffer_IllegalArg() 67 CharBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedCharBuffer_IllegalArg() 73 CharBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedCharBuffer_IllegalArg() 79 CharBuffer.wrap((char[])null, -1, 0); in testWrappedCharBuffer_IllegalArg()
|
D | WrappedByteBufferTest.java | 25 buf = ByteBuffer.wrap(new byte[BUFFER_LENGTH]); in setUp() 42 ByteBuffer.wrap(array, -1, 0); in testWrappedByteBuffer_IllegalArg() 48 ByteBuffer.wrap(array, BUFFER_LENGTH + 1, 0); in testWrappedByteBuffer_IllegalArg() 54 ByteBuffer.wrap(array, 0, -1); in testWrappedByteBuffer_IllegalArg() 60 ByteBuffer.wrap(array, 0, BUFFER_LENGTH + 1); in testWrappedByteBuffer_IllegalArg() 66 ByteBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedByteBuffer_IllegalArg() 72 ByteBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedByteBuffer_IllegalArg() 78 ByteBuffer.wrap((byte[])null, 1, Integer.MAX_VALUE); in testWrappedByteBuffer_IllegalArg()
|
D | WrappedCharBufferTest2.java | 28 buf = CharBuffer.wrap(TEST_STRING); in setUp() 41 CharBuffer.wrap(str, -1, 0); in testWrappedCharSequence_IllegalArg() 47 CharBuffer.wrap(str, 21, 21); in testWrappedCharSequence_IllegalArg() 53 CharBuffer.wrap(str, 2, 1); in testWrappedCharSequence_IllegalArg() 59 CharBuffer.wrap(str, 0, 21); in testWrappedCharSequence_IllegalArg() 65 CharBuffer.wrap((String)null, -1, 21); in testWrappedCharSequence_IllegalArg()
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | OldCharsetEncoderDecoderBufferTest.java | 41 CharBuffer out = CharBuffer.wrap(cBuf); in testDecoderOutputBuffer() 43 decoder.decode(ByteBuffer.wrap(new byte[]{(byte)'a', (byte)'b', (byte)'c', (byte)'d'}), in testDecoderOutputBuffer() 51 out = ByteBuffer.wrap(bBuf).asCharBuffer(); in testDecoderOutputBuffer() 53 decoder.decode(ByteBuffer.wrap(new byte[]{(byte)'x'}), out, true); in testDecoderOutputBuffer() 71 CharBuffer out = CharBuffer.wrap(new char[10]); in testDecoderInputBuffer() 74 ByteBuffer inWithArray = ByteBuffer.wrap(inArray); in testDecoderInputBuffer() 81 ByteBuffer inWithoutArray = ByteBuffer.wrap(new byte[] { (byte) 'x' }).asReadOnlyBuffer(); in testDecoderInputBuffer() 99 ByteBuffer out = ByteBuffer.wrap(buffer); in testEncoderOutputBuffer() 102 encoder.encode(CharBuffer.wrap("ab"), out, false); in testEncoderOutputBuffer() 114 encoder.encode(CharBuffer.wrap("x"), out, true); in testEncoderOutputBuffer() [all …]
|
D | CharsetDecoderTest.java | 35 ByteBuffer in = ByteBuffer.wrap(new byte[] { 109, 97, 109 }); in test_replaceWith() 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() 75 CharBuffer outBuffer = decoder.decode(ByteBuffer.wrap(arr, offset, arr.length - offset)); in test_ByteArray_decode_with_offset_using_facade_method() 88 ByteBuffer buf = encoder.encode(CharBuffer.wrap(s)); in encode() 99 cr = decoder.decode(ByteBuffer.wrap(new byte[] { (byte) 0xe2 }), cb, false); in testUtf8BytesSplitAcrossMultipleWrites() 101 cr = decoder.decode(ByteBuffer.wrap(new byte[] { (byte) 0x98 }), cb, false); in testUtf8BytesSplitAcrossMultipleWrites() 103 cr = decoder.decode(ByteBuffer.wrap(new byte[] { (byte) 0x83 }), cb, false); in testUtf8BytesSplitAcrossMultipleWrites() 105 cr = decoder.decode(ByteBuffer.wrap(new byte[0]), cb, true); in testUtf8BytesSplitAcrossMultipleWrites() 119 ByteBuffer.wrap(new byte[] { 'h', 'e', 'l', 'l', 'o'}), out, false); in testBufferWithNonZeroOffset()
|
D | CharsetEncoderTest.java | 38 String output = ascii.decode(e.encode(CharBuffer.wrap(input))).toString(); in test_replaceWith() 72 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842', '\udf9f' }), bb, false); in testSurrogatePairAllAtOnce() 86 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\udf9f' }), bb, false); in testMalformedSurrogatePair() 123 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842' }), bb, false); in testCharsetEncoderSplitSurrogates() 126 cr = e.encode(CharBuffer.wrap(new char[] { '\udf9f' }), bb, false); in testCharsetEncoderSplitSurrogates() 135 cr = e.encode(CharBuffer.wrap(new char[] { }), bb, true); in testCharsetEncoderSplitSurrogates() 147 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { 'x' }), bb, false); in testFlushWithoutEndOfInput() 159 cr = e.encode(CharBuffer.wrap(new char[] { 'x' }), bb, true); in testFlushWithoutEndOfInput() 224 CoderResult result = encoder.encode(CharBuffer.wrap("\ud800"), output,
|
/libcore/ojluni/src/test/java/nio/Buffer/ |
D | OrderChar.java | 49 CharBuffer buf = CharBuffer.wrap(array); in ckCharBuffer() 53 buf = CharBuffer.wrap(array, LENGTH/2, LENGTH/2); in ckCharBuffer() 61 buf = CharBuffer.wrap("abcdefghijk"); in ckCharBuffer() 65 buf = CharBuffer.wrap("abcdefghijk", 0, 5); in ckCharBuffer() 69 buf = CharBuffer.wrap(array).subSequence(0, LENGTH); in ckCharBuffer() 73 buf = ByteBuffer.wrap(new byte[LENGTH]).asCharBuffer(); in ckCharBuffer() 77 buf = ByteBuffer.wrap(new byte[LENGTH]).order(le).asCharBuffer(); in ckCharBuffer()
|
D | Order.java | 76 ck(ByteBuffer.wrap(new byte[LENGTH], LENGTH/2, LENGTH/2).order(), be); in testOrder() 77 ck(ByteBuffer.wrap(new byte[LENGTH]).order(), be); in testOrder() 78 ck(ByteBuffer.wrap(new byte[LENGTH], LENGTH/2, LENGTH/2).order(be).order(), be); in testOrder() 79 ck(ByteBuffer.wrap(new byte[LENGTH]).order(be).order(), be); in testOrder() 80 ck(ByteBuffer.wrap(new byte[LENGTH], LENGTH/2, LENGTH/2).order(le).order(), le); in testOrder() 81 ck(ByteBuffer.wrap(new byte[LENGTH]).order(le).order(), le); in testOrder()
|
D | Order-X.java.template | 49 $Type$Buffer buf = $Type$Buffer.wrap(array); 53 buf = $Type$Buffer.wrap(array, LENGTH/2, LENGTH/2); 61 buf = $Type$Buffer.wrap("abcdefghijk"); 65 buf = $Type$Buffer.wrap("abcdefghijk", 0, 5); 69 buf = $Type$Buffer.wrap(array).subSequence(0, LENGTH); 73 buf = ByteBuffer.wrap(new byte[LENGTH]).as$Type$Buffer(); 77 buf = ByteBuffer.wrap(new byte[LENGTH]).order(le).as$Type$Buffer();
|
D | BasicChar.java | 514 tryCatch(CharBuffer.wrap(t), ex, thunk); in tryCatch() 750 CharBuffer xb = CharBuffer.wrap(new char[] { x }); in test() 752 CharBuffer yb = CharBuffer.wrap(new char[] { y }); in test() 861 final CharBuffer b = CharBuffer.wrap(s, start, end); in testStr() 889 catchIndexOutOfBounds(b, () -> CharBuffer.wrap(s, -1, s.length())); in testStr() 890 catchIndexOutOfBounds(b, () -> CharBuffer.wrap(s, s.length() + 1, s.length())); in testStr() 891 catchIndexOutOfBounds(b, () -> CharBuffer.wrap(s, 1, 0)); in testStr() 892 catchIndexOutOfBounds(b, () -> CharBuffer.wrap(s, 0, s.length() + 1)); in testStr() 900 final CharBuffer b = CharBuffer.wrap(ba, offset, length); in test() 906 catchIndexOutOfBounds(ba, () -> CharBuffer.wrap(ba, -1, ba.length)); in test() [all …]
|
D | BasicLong.java | 514 tryCatch(LongBuffer.wrap(t), ex, thunk); in tryCatch() 750 LongBuffer xb = LongBuffer.wrap(new long[] { x }); in test() 752 LongBuffer yb = LongBuffer.wrap(new long[] { y }); in test() 900 final LongBuffer b = LongBuffer.wrap(ba, offset, length); in test() 906 catchIndexOutOfBounds(ba, () -> LongBuffer.wrap(ba, -1, ba.length)); in test() 907 catchIndexOutOfBounds(ba, () -> LongBuffer.wrap(ba, ba.length + 1, ba.length)); in test() 908 catchIndexOutOfBounds(ba, () -> LongBuffer.wrap(ba, 0, -1)); in test() 909 catchIndexOutOfBounds(ba, () -> LongBuffer.wrap(ba, 0, ba.length + 1)); in test() 913 () -> LongBuffer.wrap((long []) null, 0, 5)); in test() 915 () -> LongBuffer.wrap((long []) null)); in test() [all …]
|
D | BasicInt.java | 514 tryCatch(IntBuffer.wrap(t), ex, thunk); in tryCatch() 750 IntBuffer xb = IntBuffer.wrap(new int[] { x }); in test() 752 IntBuffer yb = IntBuffer.wrap(new int[] { y }); in test() 900 final IntBuffer b = IntBuffer.wrap(ba, offset, length); in test() 906 catchIndexOutOfBounds(ba, () -> IntBuffer.wrap(ba, -1, ba.length)); in test() 907 catchIndexOutOfBounds(ba, () -> IntBuffer.wrap(ba, ba.length + 1, ba.length)); in test() 908 catchIndexOutOfBounds(ba, () -> IntBuffer.wrap(ba, 0, -1)); in test() 909 catchIndexOutOfBounds(ba, () -> IntBuffer.wrap(ba, 0, ba.length + 1)); in test() 913 () -> IntBuffer.wrap((int []) null, 0, 5)); in test() 915 () -> IntBuffer.wrap((int []) null)); in test() [all …]
|
/libcore/ojluni/src/main/java/javax/net/ssl/ |
D | SSLEngine.java | 1135 public SSLEngineResult wrap(ByteBuffer src, in wrap() method in SSLEngine 1137 return wrap(new ByteBuffer [] { src }, 0, 1, dst); in wrap() 1172 public SSLEngineResult wrap(ByteBuffer [] srcs, in wrap() method in SSLEngine 1177 return wrap(srcs, 0, srcs.length, dst); in wrap() 1256 public abstract SSLEngineResult wrap(ByteBuffer [] srcs, int offset, in wrap() method in SSLEngine
|
/libcore/ojluni/src/test/java/util/Base64/ |
D | TestBase64.java | 129 checkIAE(() -> Base64.getDecoder().decode(ByteBuffer.wrap(decoded))); in main() 186 testEncode(enc, ByteBuffer.wrap(orig), encoded); in test() 191 testDecode(dec, ByteBuffer.wrap(encoded), orig); in test() 199 InputStream is = dec.wrap(bais); in test() 223 is = dec.wrap(bais); in test() 235 OutputStream os = enc.wrap(baos); in test() 256 os = enc.wrap(baos); in test() 298 checkNull(() -> enc.wrap((OutputStream)null)); in testNull() 307 checkNull(() -> dec.wrap((InputStream)null)); in testNull() 317 OutputStream os = enc.wrap(baos); in testIOE() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineTest.java | 325 …ByteBuffer bbs = ByteBuffer.wrap(new byte[] {1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3… in test_unwrap_01() 473 clientEngine.engine.wrap(new ByteBuffer[] { bbs }, 0, 1, bbd); in test_wrap_01() 490 sse.wrap(bbA, -1, 3, bb); in test_wrap_02() 495 sse.wrap(bbA, 0, -3, bb); in test_wrap_02() 500 sse.wrap(bbA, bbA.length + 1, bbA.length, bb); in test_wrap_02() 505 sse.wrap(bbA, 0, bbA.length + 1, bb); in test_wrap_02() 525 sse.wrap(bbA, 0, bbA.length, bb); in test_wrap_03() 546 e.wrap(bbA, 0, 3, bN); in test_wrap_04() 552 e.wrap(bbN, 0, 0, bN); in test_wrap_04() 571 SSLEngineResult result = sse.wrap(bbA, 0, bbA.length, bb); in test_wrap_05() [all …]
|
/libcore/ojluni/src/test/java/lang/invoke/common/test/java/lang/invoke/lib/ |
D | Helper.java | 223 Object wrap = castToWrapperOrNull(nextArg(param), param); in randomArg() local 224 if (wrap != null) { in randomArg() 225 return wrap; in randomArg() 286 Object wrap = null; in castToWrapper() local 288 wrap = castToWrapperOrNull(((Number) value).longValue(), dst); in castToWrapper() 291 wrap = castToWrapperOrNull((char) (Character) value, dst); in castToWrapper() 293 if (wrap != null) { in castToWrapper() 294 return wrap; in castToWrapper()
|