History log of /libcore/luni/src/test/java/libcore/java/nio/charset/CharsetDecoderTest.java
Revision Date Author Comments
ecf08bec2390ad533ec35548d75c1b8abfc7019c 13-Aug-2015 Narayan Kamath <narayan@google.com> Convert ByteBuffers to byte[] correctly.

Can't assume that the capacity == limit.

(cherry picked from commit 3ff37c4ee943ad49dba8a93a3fde8cce30ded044)

Change-Id: I0e5f3b8a37227dbb666901b7511fd134d0e5ae98
3ff37c4ee943ad49dba8a93a3fde8cce30ded044 13-Aug-2015 Narayan Kamath <narayan@google.com> Convert ByteBuffers to byte[] correctly.

Can't assume that the capacity == limit.

Change-Id: I4aa92345b3cdf59c2d602753e2ef6e52951a1512
654e8191641085aa6bff6df6aaef9a8cb0c03ec1 28-May-2015 Narayan Kamath <narayan@google.com> Fix incorrect position calculation in CharsetDecoder.

Data OUTPUT_OFFSET always gives us the number of bytes written
on output, so it's sufficient to increment the position by that number.
In particular, we do not have to subtract arrayOffset() from that
number.

Reported-By: Piotr Jastrzębski <haaawk@google.com>

Change-Id: I39ac470101f72aa4a87e31c4eb0665fe6a162e1d
2981b5e8cf7c19dfd85b2088b18b7a6146825317 03-Feb-2011 Elliott Hughes <enh@google.com> Improve CharsetDecoder's quality of implementation, like CharsetEncoder.

As I suspected, CharsetDecoder doesn't cope with a character's bytes being
split across multiple writes any more than CharsetEncoder could cope with
halves of a surrogate pair being split across multiple writes. This seems
much more likely to have harmed applications than CharsetEncoder (since
surrogates are rare).

Anyway, ICU does the right thing here too, so the fix is basically the same.

I've also gone through the decoder/encoder code a bit to bring them more
in line with each other.

Bug: 3410124
Change-Id: I151d043e474161e324361cddfc73188ba73fd59c
54f969b83377b1540efc0180962966df0732a479 15-Sep-2010 Jesse Wilson <jessewilson@google.com> Moving Android-authored charset tests into the libcore tree.

Change-Id: I8b3477249ffcd8c6baf34887c502e609d0c0b238
4557728efb66c455a52b7669a8eefef7a9e54854 11-Aug-2010 Jesse Wilson <jessewilson@google.com> Moving tests to be under the libcore.* package.

This is indended to make it easier to run on VMs that restrict the packages
from which application classes can be loaded. For example, on the RI you need
to use the bootclasspath to load these tests.

Change-Id: I52193f35c5fcca18b5a3e1d280505b1e29b388af