diff options
Diffstat (limited to 'nio_char')
94 files changed, 15653 insertions, 3759 deletions
diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/ASCIICharsetEncoderTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/ASCIICharsetEncoderTest.java index f704e3b..5b35982 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/ASCIICharsetEncoderTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/ASCIICharsetEncoderTest.java @@ -17,8 +17,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.ByteBuffer; @@ -51,15 +51,12 @@ public class ASCIICharsetEncoderTest extends TestCase { protected void tearDown() throws Exception { } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeCharSequence() { // normal case for ascCS assertTrue(encoder.canEncode("\u0077")); @@ -72,16 +69,18 @@ public class ASCIICharsetEncoderTest extends TestCase { assertTrue(encoder.canEncode("")); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ),@TestTarget( - methodName = "canEncode", - methodArgs = {char.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} ) }) public void testCanEncodeSurrogate () { @@ -89,30 +88,29 @@ public class ASCIICharsetEncoderTest extends TestCase { assertFalse(encoder.canEncode("\udc00")); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} + ) public void testCanEncodechar() throws CharacterCodingException { assertTrue(encoder.canEncode('\u0077')); assertFalse(encoder.canEncode('\uc2a3')); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "averageBytesPerChar", - methodArgs = {} - ),@TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} ) }) public void testSpecificDefaultValue() { @@ -120,16 +118,18 @@ public class ASCIICharsetEncoderTest extends TestCase { assertEquals(1.0, encoder.maxBytesPerChar(), 0.0); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ),@TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Exceptions checking missed.", + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Exceptions checking missed.", + method = "encode", + args = {java.nio.CharBuffer.class} ) }) public void testMultiStepEncode() throws CharacterCodingException { @@ -153,15 +153,12 @@ public class ASCIICharsetEncoderTest extends TestCase { .isMalformed()); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "encode", + args = {java.nio.CharBuffer.class} + ) public void testEncodeMapping() throws CharacterCodingException { encoder.reset(); @@ -197,19 +194,24 @@ public class ASCIICharsetEncoderTest extends TestCase { } } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Checks functionality. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ), @TestTarget( - methodName = "flush", - methodArgs = {java.nio.ByteBuffer.class} - ), @TestTarget( - methodName = "reset", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Checks functionality. Exceptions checking missed.", + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Checks functionality. Exceptions checking missed.", + method = "flush", + args = {java.nio.ByteBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Checks functionality. Exceptions checking missed.", + method = "reset", + args = {} ) }) public void testInternalState() { @@ -225,19 +227,24 @@ public class ASCIICharsetEncoderTest extends TestCase { } //reset could be called at any time -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Checks functionality. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "reset", - methodArgs = {} - ), @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ), @TestTarget( - methodName = "flush", - methodArgs = {java.nio.ByteBuffer.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Checks functionality. Exceptions checking missed.", + method = "reset", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Checks functionality. Exceptions checking missed.", + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Checks functionality. Exceptions checking missed.", + method = "flush", + args = {java.nio.ByteBuffer.class} ) }) public void testInternalState_Reset() { @@ -273,15 +280,12 @@ public class ASCIICharsetEncoderTest extends TestCase { } } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "CoderMalfunctionError checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "CoderMalfunctionError checking missed.", + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ) public void testInternalState_Encoding() { CharsetEncoder newEncoder = cs.newEncoder(); //Init - > encoding @@ -339,15 +343,12 @@ public class ASCIICharsetEncoderTest extends TestCase { } } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "CoderMalfunctionError checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "CoderMalfunctionError checking missed.", + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ) public void testInternalState_Encoding_END() { CharsetEncoder newEncoder = cs.newEncoder(); @@ -403,15 +404,12 @@ public class ASCIICharsetEncoderTest extends TestCase { } } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "CoderMalfunctionError checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "CoderMalfunctionError checking missed.", + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ) public void testInternalState_Flushed() { CharsetEncoder newEncoder = cs.newEncoder(); @@ -471,19 +469,24 @@ public class ASCIICharsetEncoderTest extends TestCase { } } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ), @TestTarget( - methodName = "flush", - methodArgs = {java.nio.ByteBuffer.class} - ), @TestTarget( - methodName = "reset", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test.", + method = "encode", + args = {java.nio.CharBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test.", + method = "flush", + args = {java.nio.ByteBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test.", + method = "reset", + args = {} ) }) public void testInternalState_Encode() throws CharacterCodingException { @@ -533,22 +536,30 @@ public class ASCIICharsetEncoderTest extends TestCase { } } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "CoderMalfunctionError checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ), @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ), @TestTarget( - methodName = "flush", - methodArgs = {java.nio.ByteBuffer.class} - ), @TestTarget( - methodName = "reset", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "CoderMalfunctionError checking missed.", + method = "encode", + args = {java.nio.CharBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "CoderMalfunctionError checking missed.", + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "CoderMalfunctionError checking missed.", + method = "flush", + args = {java.nio.ByteBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "CoderMalfunctionError checking missed.", + method = "reset", + args = {} ) }) public void testInternalState_from_Encode() throws CharacterCodingException { diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/AllTests.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/AllTests.java index c8f063e..2bc537b 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/AllTests.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/AllTests.java @@ -26,7 +26,7 @@ public class AllTests { } public static Test suite() { - TestSuite suite = new TestSuite( + TestSuite suite = tests.TestSuiteFactory.createTestSuite( "Test for org.apache.harmony.nio_char.tests.java.nio.charset"); //$JUnit-BEGIN$ suite.addTestSuite(ASCIICharsetEncoderTest.class); diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharacterCodingExceptionTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharacterCodingExceptionTest.java index 1fbeace..4394405 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharacterCodingExceptionTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharacterCodingExceptionTest.java @@ -17,8 +17,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.io.IOException; @@ -34,15 +34,12 @@ import org.apache.harmony.testframework.serialization.SerializationTest; */ public class CharacterCodingExceptionTest extends TestCase { -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "CharacterCodingException", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "CharacterCodingException", + args = {} + ) public void testConstructor() { CharacterCodingException ex = new CharacterCodingException(); assertTrue(ex instanceof IOException); @@ -53,15 +50,12 @@ public class CharacterCodingExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationSelf", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationSelf", + args = {} + ) public void testSerializationSelf() throws Exception { SerializationTest.verifySelf(new CharacterCodingException()); @@ -70,15 +64,12 @@ public class CharacterCodingExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility with RI. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationGolden", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationGolden", + args = {} + ) public void testSerializationCompatibility() throws Exception { SerializationTest.verifyGolden(this, new CharacterCodingException()); diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java index ec89ed5..5908b14 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java @@ -17,8 +17,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.BufferOverflowException; @@ -41,15 +41,12 @@ public class CharsetDecoderTest extends TestCase { * @tests java.nio.charset.CharsetDecoder.CharsetDecoder(Charset, float, * float) */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Checks IllegalArgumentException.", - targets = { - @TestTarget( - methodName = "CharsetDecoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Checks IllegalArgumentException.", + method = "CharsetDecoder", + args = {java.nio.charset.Charset.class, float.class, float.class} + ) public void test_ConstructorLjava_nio_charset_CharsetFF() { // Regression for HARMONY-142 try { @@ -78,15 +75,12 @@ public class CharsetDecoderTest extends TestCase { /** * @tests java.nio.charset.CharsetDecoder#decode(java.nio.ByteBuffer) */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Regression test.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Regression test.", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void test_decode() throws CharacterCodingException { // Regression for HARMONY-33 // ByteBuffer bb = ByteBuffer.allocate(1); @@ -124,15 +118,12 @@ public class CharsetDecoderTest extends TestCase { /* * Test malfunction decode(ByteBuffer) */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Regression test. Checks CoderMalfunctionError", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Regression test. Checks CoderMalfunctionError", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void test_decodeLjava_nio_ByteBuffer() throws Exception { MockMalfunctionCharset cs1 = new MockMalfunctionCharset( "Harmony-124-1", null); //$NON-NLS-1$ @@ -208,19 +199,24 @@ public class CharsetDecoderTest extends TestCase { /* * Test the method decode(ByteBuffer) . */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} - ),@TestTarget( - methodName = "implOnMalformedInput", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ),@TestTarget( - methodName = "replaceWith", - methodArgs = {java.lang.String.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test.", + method = "decode", + args = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test.", + method = "implOnMalformedInput", + args = {java.nio.charset.CodingErrorAction.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test.", + method = "replaceWith", + args = {java.lang.String.class} ) }) public void testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java index 104b993..1f33a05 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java @@ -17,8 +17,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.BufferOverflowException; @@ -38,16 +38,18 @@ public class CharsetEncoderTest extends TestCase { * @tests java.nio.charset.CharsetEncoder.CharsetEncoder( * java.nio.charset.Charset, float, float) */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "Checks IllegalArgumentException", - targets = { - @TestTarget( - methodName = "CharsetEncoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class} - ), @TestTarget( - methodName = "CharsetEncoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class, byte[].class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "Checks IllegalArgumentException", + method = "CharsetEncoder", + args = {java.nio.charset.Charset.class, float.class, float.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "Checks IllegalArgumentException", + method = "CharsetEncoder", + args = {java.nio.charset.Charset.class, float.class, float.class, byte[].class} ) }) public void test_ConstructorLjava_nio_charset_CharsetFF() { @@ -74,15 +76,12 @@ public class CharsetEncoderTest extends TestCase { * @tests java.nio.charset.CharsetEncoder.CharsetEncoder( * java.nio.charset.Charset, float, float) */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "CharsetEncoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "CharsetEncoder", + args = {java.nio.charset.Charset.class, float.class, float.class} + ) public void test_ConstructorLjava_nio_charset_CharsetNull() { // Regression for HARMONY-491 CharsetEncoder ech = new MockCharsetEncoderForHarmony491(null, 1, 1); @@ -130,15 +129,12 @@ public class CharsetEncoderTest extends TestCase { /* * Test malfunction encode(CharBuffer) */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Regression test checks CoderMalfunctionError", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Regression test checks CoderMalfunctionError", + method = "encode", + args = {java.nio.CharBuffer.class} + ) public void test_EncodeLjava_nio_CharBuffer() throws Exception { MockMalfunctionCharset cs = new MockMalfunctionCharset("mock", null); try { @@ -188,15 +184,12 @@ public class CharsetEncoderTest extends TestCase { /* * Test reserve bytes encode(CharBuffer,ByteBuffer,boolean) */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test.", + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ) public void test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB() { CharsetEncoder encoder = Charset.forName("utf-8").newEncoder(); CharBuffer in1 = CharBuffer.wrap("\ud800"); diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java index c912469..f8b0b7e 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java @@ -17,8 +17,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.ByteBuffer; @@ -61,15 +61,12 @@ public class CharsetTest extends TestCase { /** * @tests java.nio.charset.Charset#isRegistered() */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isRegistered", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isRegistered", + args = {} + ) public void test_isRegistered() { // Regression for HARMONY-45 for (Iterator nameItr = knownRegisteredCharsets.iterator(); nameItr.hasNext();) { @@ -87,15 +84,12 @@ public class CharsetTest extends TestCase { /** * @tests java.nio.charset.Charset#isSupported(String) */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Checks IllegalCharsetNameException", - targets = { - @TestTarget( - methodName = "isSupported", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Checks IllegalCharsetNameException", + method = "isSupported", + args = {java.lang.String.class} + ) public void testIsSupported_EmptyString() { // Regression for HARMONY-113 try { @@ -109,15 +103,12 @@ public class CharsetTest extends TestCase { /** * @tests java.nio.charset.Charset#defaultCharset() */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "defaultCharset", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "defaultCharset", + args = {} + ) public void test_defaultCharset() { String charsetName = null; String defaultCharsetName = null; @@ -167,15 +158,12 @@ public class CharsetTest extends TestCase { /** * @tests java.nio.charset.Charset#forName(java.lang.String) */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "forName", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Exceptions checking missed.", + method = "forName", + args = {java.lang.String.class} + ) public void test_forNameLjava_lang_String() { /* * invoke forName two times with the same canonical name, it @@ -197,15 +185,12 @@ public class CharsetTest extends TestCase { /* * test cached decoder */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "This test is quite useless for the rest it does, though.", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ) public void test_DecodeLjava_nio_ByteBuffer() throws Exception{ MockCharsetForDecoder cs1 = new MockCharsetForDecoder("CachedCharset",null); MockCharsetForDecoder cs2 = new MockCharsetForDecoder("CachedCharset",null); @@ -268,15 +253,12 @@ public class CharsetTest extends TestCase { /* * test cached encoder */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test.", + method = "encode", + args = {java.nio.CharBuffer.class} + ) public void test_EncodeLjava_nio_CharBuffer() throws Exception { MockCharsetForEncoder cs1 = new MockCharsetForEncoder("CachedCharset", null); MockCharsetForEncoder cs2 = new MockCharsetForEncoder("CachedCharset", null); diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CoderMalfunctionErrorTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CoderMalfunctionErrorTest.java index eefad63..0f65a9c 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CoderMalfunctionErrorTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CoderMalfunctionErrorTest.java @@ -16,8 +16,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestLevel; @@ -36,15 +36,12 @@ public class CoderMalfunctionErrorTest extends TestCase { /* * Test constructor with normal param. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "CoderMalfunctionError", - methodArgs = {java.lang.Exception.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "CoderMalfunctionError", + args = {java.lang.Exception.class} + ) public void testConstructor_Normal() { Exception ex = new Exception(); CoderMalfunctionError e = new CoderMalfunctionError(ex); @@ -54,15 +51,12 @@ public class CoderMalfunctionErrorTest extends TestCase { /* * Test constructor with null param. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "CoderMalfunctionError", - methodArgs = {java.lang.Exception.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "CoderMalfunctionError", + args = {java.lang.Exception.class} + ) public void testConstructor_Null() { CoderMalfunctionError e = new CoderMalfunctionError(null); assertNull(e.getCause()); @@ -71,15 +65,12 @@ public class CoderMalfunctionErrorTest extends TestCase { /** * @tests serialization/deserialization compatibility. */ - @TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationSelf", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationSelf", + args = {} + ) public void testSerializationSelf() throws Exception { SerializationTest.verifySelf(new CoderMalfunctionError(null)); @@ -88,15 +79,12 @@ public class CoderMalfunctionErrorTest extends TestCase { /** * @tests serialization/deserialization compatibility with RI. */ - @TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationGolden", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationGolden", + args = {} + ) public void testSerializationCompatibility() throws Exception { SerializationTest.verifyGolden(this, new CoderMalfunctionError(null)); diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/IllegalCharsetNameExceptionTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/IllegalCharsetNameExceptionTest.java index 61bdc81..b7ae917 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/IllegalCharsetNameExceptionTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/IllegalCharsetNameExceptionTest.java @@ -16,8 +16,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestLevel; @@ -35,18 +35,19 @@ import org.apache.harmony.testframework.serialization.SerializationTest.Serializ */ public class IllegalCharsetNameExceptionTest extends TestCase { -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "IllegalCharsetNameException", - methodArgs = {java.lang.String.class} - ),@TestTarget( - methodName = "getCharsetName", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "IllegalCharsetNameException", + args = {java.lang.String.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "getCharsetName", + args = {} ) - }) public void testConstructor() { IllegalCharsetNameException ex = new IllegalCharsetNameException( @@ -96,15 +97,12 @@ public class IllegalCharsetNameExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility. */ - @TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationSelf", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationSelf", + args = {} + ) public void testSerializationSelf() throws Exception { SerializationTest.verifySelf(new IllegalCharsetNameException( @@ -114,15 +112,12 @@ public class IllegalCharsetNameExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility with RI. */ - @TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationGolden", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationGolden", + args = {} + ) public void testSerializationCompatibility() throws Exception { SerializationTest.verifyGolden(this, new IllegalCharsetNameException( diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/MalformedInputExceptionTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/MalformedInputExceptionTest.java index 4ec998f..1adfe89 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/MalformedInputExceptionTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/MalformedInputExceptionTest.java @@ -17,8 +17,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.io.Serializable; @@ -36,19 +36,24 @@ import org.apache.harmony.testframework.serialization.SerializationTest.Serializ */ public class MalformedInputExceptionTest extends TestCase { -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "MalformedInputException", - methodArgs = {int.class} - ),@TestTarget( - methodName = "getMessage", - methodArgs = {} - ),@TestTarget( - methodName = "getInputLength", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "MalformedInputException", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "getMessage", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "getInputLength", + args = {} ) }) public void testConstructor() { @@ -89,15 +94,12 @@ public class MalformedInputExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility. */ - @TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationSelf", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationSelf", + args = {} + ) public void testSerializationSelf() throws Exception { SerializationTest.verifySelf(new MalformedInputException(11), @@ -107,15 +109,12 @@ public class MalformedInputExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility with RI. */ - @TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationGolden", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationGolden", + args = {} + ) public void testSerializationCompatibility() throws Exception { SerializationTest.verifyGolden(this, new MalformedInputException(11), diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/UnmappableCharacterExceptionTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/UnmappableCharacterExceptionTest.java index cbd256a..5439fcf 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/UnmappableCharacterExceptionTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/UnmappableCharacterExceptionTest.java @@ -17,8 +17,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.io.Serializable; @@ -36,19 +36,24 @@ import org.apache.harmony.testframework.serialization.SerializationTest.Serializ */ public class UnmappableCharacterExceptionTest extends TestCase { -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "UnmappableCharacterException", - methodArgs = {int.class} - ), @TestTarget( - methodName = "getMessage", - methodArgs = {} - ), @TestTarget( - methodName = "getInputLength", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "UnmappableCharacterException", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "getMessage", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "getInputLength", + args = {} ) }) public void testConstructor() { @@ -90,15 +95,12 @@ public class UnmappableCharacterExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility. */ - @TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationSelf", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationSelf", + args = {} + ) public void testSerializationSelf() throws Exception { SerializationTest.verifySelf(new UnmappableCharacterException(11), @@ -108,15 +110,12 @@ public class UnmappableCharacterExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility with RI. */ - @TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationGolden", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationGolden", + args = {} + ) public void testSerializationCompatibility() throws Exception { SerializationTest.verifyGolden(this, new UnmappableCharacterException( diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/UnsupportedCharsetExceptionTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/UnsupportedCharsetExceptionTest.java index ca736e2..ec06c9b 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/UnsupportedCharsetExceptionTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/UnsupportedCharsetExceptionTest.java @@ -17,8 +17,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.io.Serializable; @@ -35,18 +35,19 @@ import org.apache.harmony.testframework.serialization.SerializationTest.Serializ */ public class UnsupportedCharsetExceptionTest extends TestCase { -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "UnsupportedCharsetException", - methodArgs = {java.lang.String.class} - ),@TestTarget( - methodName = "getCharsetName", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "UnsupportedCharsetException", + args = {java.lang.String.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "getCharsetName", + args = {} ) - }) public void testConstructor() { UnsupportedCharsetException ex = new UnsupportedCharsetException( @@ -95,15 +96,12 @@ public class UnsupportedCharsetExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationSelf", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationSelf", + args = {} + ) public void testSerializationSelf() throws Exception { SerializationTest.verifySelf(new UnsupportedCharsetException( @@ -113,15 +111,12 @@ public class UnsupportedCharsetExceptionTest extends TestCase { /** * @tests serialization/deserialization compatibility with RI. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verifies serialization.", - targets = { - @TestTarget( - methodName = "!SerializationGolden", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verifies serialization.", + method = "!SerializationGolden", + args = {} + ) public void testSerializationCompatibility() throws Exception { SerializationTest.verifyGolden(this, new UnsupportedCharsetException( diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/spi/AllTests.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/spi/AllTests.java index bf9546a..3e5f3a9 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/spi/AllTests.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/spi/AllTests.java @@ -26,7 +26,7 @@ public class AllTests { } public static Test suite() { - TestSuite suite = new TestSuite( + TestSuite suite = tests.TestSuiteFactory.createTestSuite( "Suite of tests for the java.nio.charset.spi package."); // $JUnit-BEGIN$ suite.addTestSuite(CharsetProviderTest.class); diff --git a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/spi/CharsetProviderTest.java b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/spi/CharsetProviderTest.java index 4321479..b7f1632 100644 --- a/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/spi/CharsetProviderTest.java +++ b/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/spi/CharsetProviderTest.java @@ -17,8 +17,8 @@ package org.apache.harmony.nio_char.tests.java.nio.charset.spi; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.charset.Charset; @@ -36,15 +36,12 @@ public class CharsetProviderTest extends TestCase { /* * Test the security check in the constructor. */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Normal condition does not checked.", - targets = { - @TestTarget( - methodName = "CharsetProvider", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "CharsetProvider", + args = {} + ) public void testConstructor() { // with sufficient privilege new MockCharsetProvider(); diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetDecoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetDecoderTest.java index d41f5bf..018d017 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetDecoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetDecoderTest.java @@ -23,10 +23,11 @@ import java.nio.ByteBuffer; import java.nio.charset.Charset; @TestTargetClass(java.nio.charset.CharsetDecoder.class) -public class ASCCharsetDecoderTest extends CharsetDecoderTest { +public class ASCCharsetDecoderTest extends AbstractCharsetDecoderTestCase { protected void setUp() throws Exception { cs = Charset.forName("ascii"); + unibytes = new byte[] { 32, 98, 117, 102, 102, 101, 114 }; super.setUp(); } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetTest.java index 7d0e366..eceb1a0 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; @TestTargetClass(java.nio.charset.Charset.class) @@ -43,15 +43,12 @@ public class ASCCharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testEncode_Normal() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "encode", + args = {java.lang.String.class} + ) public void testEncode_Normal() { String input = "ab\u5D14\u654F"; byte[] output = new byte[] { 97, 98, @@ -65,15 +62,12 @@ public class ASCCharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testDecode_Normal() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void testDecode_Normal() { byte[] input = new byte[] { 97, 98, 63, 63 }; char[] output = "ab??".toCharArray(); diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetDecoderTestCase.java b/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetDecoderTestCase.java new file mode 100644 index 0000000..4db1d34 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetDecoderTestCase.java @@ -0,0 +1,762 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; +import dalvik.annotation.TestLevel; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CoderResult; +import java.nio.charset.CodingErrorAction; +import java.nio.charset.MalformedInputException; +import java.nio.charset.UnmappableCharacterException; + +import junit.framework.TestCase; + +@TestTargetClass(CharsetDecoder.class) + +/** + * Super class for concrete charset test suites. + */ +public class AbstractCharsetDecoderTestCase extends TestCase { + + Charset cs; + + // Target decoder (tobj): + protected static CharsetDecoder decoder; + + static final String unistr = " buffer";// \u8000\u8001\u00a5\u3000\r\n"; + + byte[] unibytes; + + String bom = ""; + + + protected void setUp() throws Exception { + super.setUp(); + decoder = cs.newDecoder(); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "charset", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "detectedCharset", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "isCharsetDetected", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "isAutoDetecting", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "malformedInputAction", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "unmappableCharacterAction", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "replacement", + args = {} + ) + }) + public void testDefaultValues() { + assertSame(cs, decoder.charset()); + try { + decoder.detectedCharset(); + fail("should unsupported"); + } catch (UnsupportedOperationException e) { + } + try { + assertTrue(decoder.isCharsetDetected()); + fail("should unsupported"); + } catch (UnsupportedOperationException e) { + } + assertFalse(decoder.isAutoDetecting()); + assertSame(CodingErrorAction.REPORT, decoder.malformedInputAction()); + assertSame(CodingErrorAction.REPORT, decoder + .unmappableCharacterAction()); + assertEquals(decoder.replacement(), "\ufffd"); + } + + + + /* + * test onMalformedInput + */ + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "malformedInputAction", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "onMalformedInput", + args = {java.nio.charset.CodingErrorAction.class} + ) + }) + public void testOnMalformedInput() { + assertSame(CodingErrorAction.REPORT, decoder.malformedInputAction()); + try { + decoder.onMalformedInput(null); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + decoder.onMalformedInput(CodingErrorAction.IGNORE); + assertSame(CodingErrorAction.IGNORE, decoder.malformedInputAction()); + } + + /* + * test unmappableCharacter + */ + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "unmappableCharacterAction", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "onUnmappableCharacter", + args = {java.nio.charset.CodingErrorAction.class} + ) + }) + public void testOnUnmappableCharacter() { + assertSame(CodingErrorAction.REPORT, decoder + .unmappableCharacterAction()); + try { + decoder.onUnmappableCharacter(null); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + decoder.onUnmappableCharacter(CodingErrorAction.IGNORE); + assertSame(CodingErrorAction.IGNORE, decoder + .unmappableCharacterAction()); + } + + /* + * test replaceWith + */ + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "replaceWith", + args = {java.lang.String.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "replacement", + args = {} + ) + }) + public void testReplaceWith() { + try { + decoder.replaceWith(null); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + try { + decoder.replaceWith(""); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + try { + decoder.replaceWith("testReplaceWith"); + fail("should throw illegal argument exception"); + } catch (IllegalArgumentException e) { + } + + decoder.replaceWith("a"); + assertSame("a", decoder.replacement()); + } + + /* + * Class under test for CharBuffer decode(ByteBuffer) + */ + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "decode", + args = {java.nio.ByteBuffer.class} + ) + }) + public void testDecodeByteBuffer() throws CharacterCodingException { + implTestDecodeByteBuffer(); + } + + void implTestDecodeByteBuffer() throws CharacterCodingException { + // Null pointer + try { + decoder.decode(null); + fail("should throw null pointer exception"); + } catch (NullPointerException e) { + } + + // empty input buffer + CharBuffer out = decoder.decode(ByteBuffer.allocate(0)); + assertCharBufferValue(out, ""); + + // normal case + ByteBuffer in = ByteBuffer.wrap(getUnibytes()); + out = decoder.decode(in); + assertEquals(out.position(), 0); + assertEquals(out.limit(), unistr.length()); + assertEquals(out.remaining(), unistr.length()); + assertEquals(new String(out.array(), 0, out.limit()), unistr); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "decode", + args = {java.nio.ByteBuffer.class} + ) + public void testDecodeByteBufferException() + throws CharacterCodingException, UnsupportedEncodingException { + CharBuffer out; + ByteBuffer in; + String replaceStr = decoder.replacement() + " buffer"; + + // MalformedException: + decoder.onMalformedInput(CodingErrorAction.REPORT); + decoder.onUnmappableCharacter(CodingErrorAction.REPORT); + in = getMalformByteBuffer(); + if (in != null) { + try { + CharBuffer buffer = decoder.decode(in); + assertTrue(buffer.remaining() > 0); + fail("should throw MalformedInputException"); + } catch (MalformedInputException e) { + } + + decoder.reset(); + in.rewind(); + decoder.onMalformedInput(CodingErrorAction.IGNORE); + out = decoder.decode(in); + assertCharBufferValue(out, " buffer"); + + decoder.reset(); + in.rewind(); + decoder.onMalformedInput(CodingErrorAction.REPLACE); + out = decoder.decode(in); + assertCharBufferValue(out, replaceStr); + } + + // Unmapped Exception: + decoder.onMalformedInput(CodingErrorAction.REPORT); + decoder.onUnmappableCharacter(CodingErrorAction.REPORT); + in = getUnmappedByteBuffer(); + if (in != null) { + try { + decoder.decode(in); + fail("should throw UnmappableCharacterException"); + } catch (UnmappableCharacterException e) { + } + + decoder.reset(); + in.rewind(); + decoder.onUnmappableCharacter(CodingErrorAction.IGNORE); + out = decoder.decode(in); + assertCharBufferValue(out, " buffer"); + + decoder.reset(); + in.rewind(); + decoder.onUnmappableCharacter(CodingErrorAction.REPLACE); + out = decoder.decode(in); + assertCharBufferValue(out, replaceStr); + } + + // RuntimeException + try { + decoder.decode(getExceptionByteArray()); + fail("should throw runtime exception"); + } catch (RuntimeException e) { + } + } + + /* + * Class under test for CoderResult decode(ByteBuffer, CharBuffer, boolean) + */ + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "decode", + args = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} + ) + public void testDecodeByteBufferCharBufferboolean() { + implTestDecodeByteBufferCharBufferboolean(); + } + + void implTestDecodeByteBufferCharBufferboolean() { + byte[] gb = getUnibytes(); + ByteBuffer in = ByteBuffer.wrap(gb); + CharBuffer out = CharBuffer.allocate(100); + + // Null pointer + try { + decoder.decode(null, out, true); + fail("should throw null pointer exception"); + } catch (NullPointerException e) { + } + try { + decoder.decode(in, null, true); + fail("should throw null pointer exception"); + } catch (NullPointerException e) { + } + + // normal case, one complete operation + decoder.reset(); + in.rewind(); + out.rewind(); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, true)); + assertEquals(out.limit(), 100); + assertEquals(out.position(), unistr.length()); + assertEquals(out.remaining(), 100 - unistr.length()); + assertEquals(out.capacity(), 100); + assertCharBufferValue(out, unistr); + decoder.flush(out); + + // normal case, one complete operation, but call twice, first time set + // endOfInput to false + decoder.reset(); + in.rewind(); + out.clear(); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); + assertEquals(out.limit(), 100); + assertEquals(out.position(), unistr.length()); + assertEquals(out.remaining(), 100 - unistr.length()); + assertEquals(out.capacity(), 100); + assertCharBufferValue(out, unistr); + + decoder.reset(); + in.rewind(); + out.clear(); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); + in = ByteBuffer.wrap(unibytes); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); + in.rewind(); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, true)); + assertEquals(out.limit(), 100); + assertTrue(out.position() > 0); + assertEquals(out.remaining(), out.capacity() - out.position()); + assertEquals(out.capacity(), 100); + assertCharBufferValue(out, unistr + unistr + unistr); + + // overflow + out = CharBuffer.allocate(4); + decoder.reset(); + in = ByteBuffer.wrap(getUnibytes()); + out.rewind(); + assertSame(CoderResult.OVERFLOW, decoder.decode(in, out, false)); + + assertEquals(new String(out.array()), unistr.substring(0, 4)); + out = CharBuffer.allocate(100); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); + assertCharBufferValue(out, unistr.substring(4)); + in.rewind(); + out = CharBuffer.allocate(100); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, true)); + assertCharBufferValue(out, bom + unistr); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "decode", + args = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} + ) + public void testDecodeCharBufferByteBufferbooleanExceptionTrue() + throws CharacterCodingException, UnsupportedEncodingException { + implTestDecodeCharBufferByteBufferbooleanException(true); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "decode", + args = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} + ) + public void testDecodeCharBufferByteBufferbooleanExceptionFalse() + throws CharacterCodingException, UnsupportedEncodingException { + implTestDecodeCharBufferByteBufferbooleanException(false); + } + + void implTestDecodeCharBufferByteBufferbooleanException(boolean endOfInput) + throws CharacterCodingException, UnsupportedEncodingException { + CharBuffer out; + ByteBuffer in; + + // Unmapped Exception: + in = getUnmappedByteBuffer(); + out = CharBuffer.allocate(50); + decoder.onMalformedInput(CodingErrorAction.REPORT); + if (null != in) { + decoder.reset(); + decoder.onUnmappableCharacter(CodingErrorAction.REPORT); + CoderResult result = decoder.decode(in, out, endOfInput); + assertTrue(result.isUnmappable()); + + decoder.reset(); + out.clear(); + in.rewind(); + decoder.onUnmappableCharacter(CodingErrorAction.IGNORE); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, + endOfInput)); + assertCharBufferValue(out, " buffer"); + + decoder.reset(); + out.clear(); + in.rewind(); + decoder.onUnmappableCharacter(CodingErrorAction.REPLACE); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, + endOfInput)); + assertCharBufferValue(out, decoder.replacement() + " buffer"); + } else if (endOfInput) { + // System.err.println("Cannot find unmappable byte array for " + // + cs.name()); + } + + // MalformedException: + in = getMalformByteBuffer(); + out = CharBuffer.allocate(50); + decoder.onUnmappableCharacter(CodingErrorAction.REPORT); + if (null != in) { + decoder.onMalformedInput(CodingErrorAction.REPORT); + CoderResult result = decoder.decode(in, out, endOfInput); + assertTrue(result.isMalformed()); + + decoder.reset(); + out.clear(); + in.rewind(); + decoder.onMalformedInput(CodingErrorAction.IGNORE); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, + endOfInput)); + assertCharBufferValue(out, " buffer"); + + decoder.reset(); + out.clear(); + in.rewind(); + decoder.onMalformedInput(CodingErrorAction.REPLACE); + assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, + endOfInput)); + assertCharBufferValue(out, decoder.replacement() + " buffer"); + } else if (endOfInput) { + // System.err.println("Cannot find malform byte array for " + // + cs.name()); + } + + // RuntimeException + in = getExceptionByteArray(); + try { + decoder.decode(in, out, endOfInput); + fail("should throw runtime exception"); + } catch (RuntimeException e) { + } + } + + ByteBuffer getExceptionByteArray() throws UnsupportedEncodingException { + // "runtime" + return ByteBuffer + .wrap(new byte[] { 114, 117, 110, 116, 105, 109, 101 }); + } + + ByteBuffer getUnmappedByteBuffer() throws UnsupportedEncodingException { + // "unmap buffer" + byte[] ba = new byte[] { 117, 110, 109, 97, 112, 32, 98, 117, 102, 102, + 101, 114 }; + return ByteBuffer.wrap(ba); + } + + ByteBuffer getMalformByteBuffer() throws UnsupportedEncodingException { + // "malform buffer" + byte[] ba = new byte[] { 109, 97, 108, 102, 111, 114, 109, 32, 98, 117, + 102, 102, 101, 114 }; + return ByteBuffer.wrap(ba); + } + + void assertCharBufferValue(CharBuffer out, String expected) { + if (out.position() != 0) { + out.flip(); + } + assertEquals(new String(out.array(), 0, out.limit()), expected); + } + + /* + * test flush + */ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "flush", + args = {java.nio.CharBuffer.class} + ) + public void testFlush() throws CharacterCodingException { + CharBuffer out = CharBuffer.allocate(10); + ByteBuffer in = ByteBuffer.wrap(new byte[] { 12, 12 }); + decoder.decode(in, out, true); + assertSame(CoderResult.UNDERFLOW, decoder.flush(out)); + + decoder.reset(); + decoder.decode((ByteBuffer) in.rewind(), (CharBuffer) out.rewind(), + true); + assertSame(CoderResult.UNDERFLOW, decoder + .flush(CharBuffer.allocate(10))); + } + + + /* + * ---------------------------------- methods to test illegal state + * ----------------------------------- + */ + + // Normal case: just after reset, and it also means reset can be done + // anywhere + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "reset", + args = {} + ) + public void testResetIllegalState() throws CharacterCodingException { + byte[] gb = getUnibytes(); + decoder.reset(); + decoder.decode(ByteBuffer.wrap(gb)); + decoder.reset(); + decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(3), false); + decoder.reset(); + decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(3), true); + decoder.reset(); + } + + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "flush", + args = {java.nio.CharBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "reset", + args = {} + ) + }) + public void testFlushIllegalState() throws CharacterCodingException { + ByteBuffer in = ByteBuffer.wrap(new byte[] { 98, 98 }); + CharBuffer out = CharBuffer.allocate(5); + // Normal case: after decode with endOfInput is true + decoder.reset(); + decoder.decode(in, out, true); + out.rewind(); + CoderResult result = decoder.flush(out); + assertSame(result, CoderResult.UNDERFLOW); + + // Illegal state: flush twice + try { + decoder.flush(out); + fail("should throw IllegalStateException"); + } catch (IllegalStateException e) { + } + + // Illegal state: flush after decode with endOfInput is false + decoder.reset(); + decoder.decode(in, out, false); + try { + decoder.flush(out); + fail("should throw IllegalStateException"); + } catch (IllegalStateException e) { + } + } + + byte[] getUnibytes() { + return unibytes; + } + + // test illegal states for decode facade + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "decode", + args = {java.nio.ByteBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "decode", + args = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} + ) + }) + public void testDecodeFacadeIllegalState() throws CharacterCodingException { + // decode facade can be execute in anywhere + byte[] gb = getUnibytes(); + ByteBuffer in = ByteBuffer.wrap(gb); + // Normal case: just created + decoder.decode(in); + in.rewind(); + + // Normal case: just after decode facade + decoder.decode(in); + in.rewind(); + + // Normal case: just after decode with that endOfInput is true + decoder.reset(); + decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(30), true); + decoder.decode(in); + in.rewind(); + + // Normal case:just after decode with that endOfInput is false + decoder.reset(); + decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(30), false); + decoder.decode(in); + in.rewind(); + + // Normal case: just after flush + decoder.reset(); + decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(30), true); + decoder.flush(CharBuffer.allocate(10)); + decoder.decode(in); + in.rewind(); + } + + // test illegal states for two decode method with endOfInput is true + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "decode", + args = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} + ) + public void testDecodeTrueIllegalState() throws CharacterCodingException { + ByteBuffer in = ByteBuffer.wrap(new byte[] { 98, 98 }); + CharBuffer out = CharBuffer.allocate(100); + // Normal case: just created + decoder.decode(in, out, true); + in.rewind(); + out.rewind(); + + // Normal case: just after decode with that endOfInput is true + decoder.reset(); + decoder.decode(in, CharBuffer.allocate(30), true); + in.rewind(); + decoder.decode(in, out, true); + in.rewind(); + out.rewind(); + + // Normal case:just after decode with that endOfInput is false + decoder.reset(); + decoder.decode(in, CharBuffer.allocate(30), false); + in.rewind(); + decoder.decode(in, out, true); + in.rewind(); + out.rewind(); + + // Illegal state: just after flush + decoder.reset(); + decoder.decode(in, CharBuffer.allocate(30), true); + decoder.flush(CharBuffer.allocate(10)); + in.rewind(); + try { + decoder.decode(in, out, true); + fail("should illegal state"); + } catch (IllegalStateException e) { + } + in.rewind(); + out.rewind(); + + } + + // test illegal states for two decode method with endOfInput is false + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "decode", + args = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} + ) + public void testDecodeFalseIllegalState() throws CharacterCodingException { + ByteBuffer in = ByteBuffer.wrap(new byte[] { 98, 98 }); + CharBuffer out = CharBuffer.allocate(5); + // Normal case: just created + decoder.decode(in, out, false); + in.rewind(); + out.rewind(); + + // Illegal state: just after decode facade + decoder.reset(); + decoder.decode(in); + in.rewind(); + try { + decoder.decode(in, out, false); + fail("should illegal state"); + } catch (IllegalStateException e) { + } + in.rewind(); + out.rewind(); + + // Illegal state: just after decode with that endOfInput is true + decoder.reset(); + decoder.decode(in, CharBuffer.allocate(30), true); + in.rewind(); + try { + decoder.decode(in, out, false); + fail("should illegal state"); + } catch (IllegalStateException e) { + } + in.rewind(); + out.rewind(); + + // Normal case:just after decode with that endOfInput is false + decoder.reset(); + decoder.decode(in, CharBuffer.allocate(30), false); + in.rewind(); + decoder.decode(in, out, false); + in.rewind(); + out.rewind(); + + // Illegal state: just after flush + decoder.reset(); + decoder.decode(in, CharBuffer.allocate(30), true); + in.rewind(); + decoder.flush(CharBuffer.allocate(10)); + try { + decoder.decode(in, out, false); + fail("should illegal state"); + } catch (IllegalStateException e) { + } + } + + /* + * --------------------------------- illegal state test end + * --------------------------------- + */ + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetEncoderTestCase.java b/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetEncoderTestCase.java new file mode 100644 index 0000000..4eb8d4b --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetEncoderTestCase.java @@ -0,0 +1,1048 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; +import dalvik.annotation.TestLevel; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CoderResult; +import java.nio.charset.CodingErrorAction; +import java.nio.charset.MalformedInputException; +import java.nio.charset.UnmappableCharacterException; +import java.nio.charset.UnsupportedCharsetException; +import java.util.Arrays; + +import junit.framework.TestCase; + +@TestTargetClass(CharsetEncoder.class) + +/** + * Super class for concrete charset test suites. + */ +public class AbstractCharsetEncoderTestCase extends TestCase { + + Charset cs; + + // Target encoder (tobj): + CharsetEncoder encoder; + + static final String unistr = " buffer";// \u8000\u8001\u00a5\u3000\r\n"; + + byte[] unibytes = new byte[] { 32, 98, 117, 102, 102, 101, 114 }; + + + // default for Charset abstract class + byte[] defaultReplacement = new byte[] { 63 }; + + // specific for Charset implementation subclass + byte[] specifiedReplacement = new byte[] { 26 }; + + byte[] unibytesWithRep = null; + + byte[] surrogate = new byte[0]; + + + protected void setUp() throws Exception { + super.setUp(); + encoder = cs.newEncoder(); + if (null == unibytesWithRep) { + byte[] replacement = encoder.replacement(); + unibytesWithRep = new byte[replacement.length + unibytes.length]; + System.arraycopy(replacement, 0, unibytesWithRep, 0, + replacement.length); + System.arraycopy(unibytes, 0, unibytesWithRep, replacement.length, + unibytes.length); + } + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + + /* + * Class under test for boolean canEncode(char) + */ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {char.class} + ) + public void testCanEncodechar() throws CharacterCodingException { + // for non-mapped char + assertTrue(encoder.canEncode('\uc2c0')); + // surrogate char for unicode + // 1st byte: d800-dbff + // 2nd byte: dc00-dfff + assertTrue(encoder.canEncode('\ud800')); + // valid surrogate pair + assertTrue(encoder.canEncode('\udc00')); + } + + /*----------------------------------------- + * Class under test for illegal state case + * methods which can change internal states are two encode, flush, two canEncode, reset + * ----------------------------------------- + */ + + // Normal case: just after reset, and it also means reset can be done + // anywhere + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {char.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {java.lang.CharSequence.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "reset", + args = {} + ) + }) + public void testResetIllegalState() throws CharacterCodingException { + assertSame(encoder, encoder.reset()); + encoder.canEncode('\ud901'); + assertSame(encoder, encoder.reset()); + encoder.canEncode("\ud901\udc00"); + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("aaa")); + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), false); + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), true); + assertSame(encoder, encoder.reset()); + } + + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "reset", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "flush", + args = {java.nio.ByteBuffer.class} + ) + }) + public void testFlushIllegalState() throws CharacterCodingException { + CharBuffer in = CharBuffer.wrap("aaa"); + ByteBuffer out = ByteBuffer.allocate(5); + + // Normal case: after encode with endOfInput is true + assertSame(encoder, encoder.reset()); + encoder.encode(in, out, true); + out.rewind(); + CoderResult result = encoder.flush(out); + + // Illegal state: flush twice + try { + encoder.flush(out); + fail("should throw IllegalStateException"); + } catch (IllegalStateException e) { + } + + // Illegal state: flush after encode with endOfInput is false + assertSame(encoder, encoder.reset()); + encoder.encode(in, out, false); + try { + encoder.flush(out); + fail("should throw IllegalStateException"); + } catch (IllegalStateException e) { + } + } + + // test illegal states for encode facade + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {char.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {java.lang.CharSequence.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "flush", + args = {java.nio.ByteBuffer.class} + ) + }) + public void testEncodeFacadeIllegalState() throws CharacterCodingException { + // encode facade can be execute in anywhere + CharBuffer in = CharBuffer.wrap("aaa"); + // Normal case: just created + encoder.encode(in); + in.rewind(); + + // Normal case: just after encode facade + encoder.encode(in); + in.rewind(); + + // Normal case: just after canEncode + assertSame(encoder, encoder.reset()); + encoder.canEncode("\ud902\udc00"); + encoder.encode(in); + in.rewind(); + assertSame(encoder, encoder.reset()); + encoder.canEncode('\ud902'); + encoder.encode(in); + in.rewind(); + + // Normal case: just after encode with that endOfInput is true + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), + ByteBuffer.allocate(30), true); + encoder.encode(in); + in.rewind(); + + // Normal case:just after encode with that endOfInput is false + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), + ByteBuffer.allocate(30), false); + encoder.encode(in); + in.rewind(); + + // Normal case: just after flush + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), + ByteBuffer.allocate(30), true); + encoder.flush(ByteBuffer.allocate(10)); + encoder.encode(in); + in.rewind(); + } + + // test illegal states for two encode method with endOfInput is true + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {char.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {java.lang.CharSequence.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "reset", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "flush", + args = {java.nio.ByteBuffer.class} + ) + }) + public void testEncodeTrueIllegalState() throws CharacterCodingException { + CharBuffer in = CharBuffer.wrap("aaa"); + ByteBuffer out = ByteBuffer.allocate(5); + // Normal case: just created + encoder.encode(in, out, true); + in.rewind(); + out.rewind(); + + in.rewind(); + out.rewind(); + + // Normal case: just after encode with that endOfInput is true + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), + ByteBuffer.allocate(30), true); + encoder.encode(in, out, true); + in.rewind(); + out.rewind(); + + // Normal case:just after encode with that endOfInput is false + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), + ByteBuffer.allocate(30), false); + encoder.encode(in, out, true); + in.rewind(); + out.rewind(); + + // Illegal state: just after flush + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), + ByteBuffer.allocate(30), true); + encoder.flush(ByteBuffer.allocate(10)); + try { + encoder.encode(in, out, true); + fail("should illegal state"); + } catch (IllegalStateException e) { + } + + // Normal case: after canEncode + assertSame(encoder, encoder.reset()); + encoder.canEncode("\ud906\udc00"); + encoder.encode(in, out, true); + in.rewind(); + out.rewind(); + assertSame(encoder, encoder.reset()); + encoder.canEncode('\ud905'); + encoder.encode(in, out, true); + } + + // test illegal states for two encode method with endOfInput is false + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {char.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {java.lang.CharSequence.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "reset", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "flush", + args = {java.nio.ByteBuffer.class} + ) + }) + public void testEncodeFalseIllegalState() throws CharacterCodingException { + CharBuffer in = CharBuffer.wrap("aaa"); + ByteBuffer out = ByteBuffer.allocate(5); + // Normal case: just created + encoder.encode(in, out, false); + in.rewind(); + out.rewind(); + + // Illegal state: just after encode facade + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState1")); + try { + encoder.encode(in, out, false); + fail("should illegal state"); + } catch (IllegalStateException e) { + } + + // Illegal state: just after encode with that endOfInput is true + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), + ByteBuffer.allocate(30), true); + try { + encoder.encode(in, out, false); + fail("should illegal state"); + } catch (IllegalStateException e) { + } + + // Normal case:just after encode with that endOfInput is false + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), + ByteBuffer.allocate(30), false); + encoder.encode(in, out, false); + in.rewind(); + out.rewind(); + + // Illegal state: just after flush + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), + ByteBuffer.allocate(30), true); + encoder.flush(ByteBuffer.allocate(10)); + try { + encoder.encode(in, out, false); + fail("should illegal state"); + } catch (IllegalStateException e) { + } + + // Normal case: after canEncode + assertSame(encoder, encoder.reset()); + encoder.canEncode("\ud906\udc00"); + encoder.encode(in, out, false); + in.rewind(); + out.rewind(); + assertSame(encoder, encoder.reset()); + encoder.canEncode('\ud905'); + encoder.encode(in, out, false); + } + + // test illegal states for two canEncode methods + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {char.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {java.lang.CharSequence.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "reset", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "flush", + args = {java.nio.ByteBuffer.class} + ) + }) + public void testCanEncodeIllegalState() throws CharacterCodingException { + // Normal case: just created + encoder.canEncode("\ud900\udc00"); + encoder.canEncode('\ud900'); + + // Illegal state: just after encode with that endOfInput is true + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), + ByteBuffer.allocate(30), true); + try { + encoder.canEncode("\ud903\udc00"); + fail("should throw illegal state exception"); + } catch (IllegalStateException e) { + } + + // Illegal state:just after encode with that endOfInput is false + assertSame(encoder, encoder.reset()); + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), + ByteBuffer.allocate(30), false); + try { + encoder.canEncode("\ud904\udc00"); + fail("should throw illegal state exception"); + } catch (IllegalStateException e) { + } + + // Normal case: just after flush + encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), + ByteBuffer.allocate(30), true); + encoder.flush(ByteBuffer.allocate(10)); + encoder.canEncode("\ud905\udc00"); + encoder.canEncode('\ud906'); + + // Normal case: after reset again + assertSame(encoder, encoder.reset()); + encoder.canEncode("\ud906\udc00"); + encoder.canEncode('\ud905'); + } + + /* + * --------------------------------- illegal state test end + * --------------------------------- + */ + + /* + * Class under test for boolean canEncode(CharSequence) + */ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "canEncode", + args = {java.lang.CharSequence.class} + ) + public void testCanEncodeCharSequence() { + // for non-mapped char + assertTrue(encoder.canEncode("\uc2c0")); + // surrogate char for unicode + // 1st byte: d800-dbff + // 2nd byte: dc00-dfff + assertTrue(encoder.canEncode("\ud800")); + // valid surrogate pair + assertTrue(encoder.canEncode("\ud800\udc00")); + // invalid surrogate pair + assertTrue(encoder.canEncode("\ud800\udb00")); + } + + + + /* + * Class under test for ByteBuffer encode(CharBuffer) + */ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class} + ) + public void testEncodeCharBuffer() throws CharacterCodingException { + // Null pointer + try { + encoder.encode(null); + fail("should throw null pointer exception"); + } catch (NullPointerException e) { + } + + // empty input buffer + ByteBuffer out = encoder.encode(CharBuffer.wrap("")); + assertEquals(out.position(), 0); + assertByteArray(out, new byte[0]); + // assertByteArray(out, surrogate); + + // normal case + out = encoder.encode(CharBuffer.wrap(unistr)); + assertEquals(out.position(), 0); + assertByteArray(out, addSurrogate(unibytes)); + + // Regression test for harmony-3378 + Charset cs = Charset.forName("UTF-8"); + CharsetEncoder encoder = cs.newEncoder(); + encoder.onMalformedInput(CodingErrorAction.REPLACE); + encoder = encoder.replaceWith(new byte[] { (byte) 0xef, (byte) 0xbf, + (byte) 0xbd, }); + CharBuffer in = CharBuffer.wrap("\ud800"); + out = encoder.encode(in); + assertNotNull(out); + } + + private byte[] addSurrogate(byte[] expected) { + if (surrogate.length > 0) { + byte[] temp = new byte[surrogate.length + expected.length]; + System.arraycopy(surrogate, 0, temp, 0, surrogate.length); + System.arraycopy(expected, 0, temp, surrogate.length, + expected.length); + expected = temp; + } + return expected; + } + + /** + * @return + */ + protected byte[] getEmptyByteArray() { + return new byte[0]; + } + + CharBuffer getMalformedCharBuffer() { + return CharBuffer.wrap("malform buffer"); + } + + CharBuffer getUnmapCharBuffer() { + return CharBuffer.wrap("unmap buffer"); + } + + CharBuffer getExceptionCharBuffer() { + return CharBuffer.wrap("runtime buffer"); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class} + ) + public void testEncodeCharBufferException() throws CharacterCodingException { + ByteBuffer out; + CharBuffer in; + // MalformedException: + in = getMalformedCharBuffer(); + encoder.onMalformedInput(CodingErrorAction.REPORT); + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + if (in != null) { + try { + // regression test for Harmony-1379 + encoder.encode(in); + fail("should throw MalformedInputException"); + } catch (MalformedInputException e) { + } + + encoder.reset(); + in.rewind(); + encoder.onMalformedInput(CodingErrorAction.IGNORE); + out = encoder.encode(in); + assertByteArray(out, addSurrogate(unibytes)); + + encoder.reset(); + in.rewind(); + encoder.onMalformedInput(CodingErrorAction.REPLACE); + out = encoder.encode(in); + assertByteArray(out, addSurrogate(unibytesWithRep)); + } + + // Unmapped Exception: + in = getUnmapCharBuffer(); + encoder.onMalformedInput(CodingErrorAction.REPORT); + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + if (in != null) { + encoder.reset(); + try { + encoder.encode(in); + fail("should throw UnmappableCharacterException"); + } catch (UnmappableCharacterException e) { + } + + encoder.reset(); + in.rewind(); + encoder.onUnmappableCharacter(CodingErrorAction.IGNORE); + out = encoder.encode(in); + assertByteArray(out, unibytes); + + encoder.reset(); + in.rewind(); + encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); + out = encoder.encode(in); + assertByteArray(out, unibytesWithRep); + } + + // RuntimeException + try { + encoder.encode(getExceptionCharBuffer()); + fail("should throw runtime exception"); + } catch (RuntimeException e) { + } + } + + /* + * utility method, extract given bytebuffer to a string and compare with + * give string + */ + void assertByteArray(ByteBuffer out, byte[] expected) { + out = out.duplicate(); + if (out.position() != 0) { + out.flip(); + } + byte[] ba = new byte[out.limit() - out.position()]; + out.get(ba); + // byte[] ba = out.array(); + assertTrue(Arrays.equals(ba, expected)); + } + + /* + * Class under test for CoderResult encode(CharBuffer, ByteBuffer, boolean) + */ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ) + public void testEncodeCharBufferByteBufferboolean() + throws CharacterCodingException { + ByteBuffer out = ByteBuffer.allocate(200); + CharBuffer in = CharBuffer.wrap(unistr); + // Null pointer + try { + encoder.encode(null, out, true); + fail("should throw null pointer exception"); + } catch (NullPointerException e) { + } + try { + encoder.encode(in, null, true); + fail("should throw null pointer exception"); + } catch (NullPointerException e) { + } + + // normal case, one complete operation + assertSame(encoder, encoder.reset()); + in.rewind(); + out.rewind(); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); + assertEquals(out.limit(), 200); + assertTrue(out.position() > 0); + assertTrue(out.remaining() > 0); + assertEquals(out.capacity(), 200); + assertByteArray(out, addSurrogate(unibytes)); + in.rewind(); + + encoder.flush(out); + + // normal case, one complete operation, but call twice, first time set + // endOfInput to false + assertSame(encoder, encoder.reset()); + in.rewind(); + out = ByteBuffer.allocate(200); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, false)); + assertEquals(out.limit(), 200); + assertTrue(out.position() > 0); + assertTrue(out.remaining() > 0); + assertEquals(out.capacity(), 200); + assertByteArray(out, addSurrogate(unibytes)); + + in.rewind(); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, false)); + in.rewind(); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); + assertEquals(out.limit(), 200); + assertTrue(out.position() > 0); + assertTrue(out.remaining() > 0); + assertEquals(out.capacity(), 200); + + assertByteArray(out, addSurrogate(duplicateByteArray(unibytes, 3))); + + // overflow + out = ByteBuffer.allocate(4); + assertSame(encoder, encoder.reset()); + in.rewind(); + out.rewind(); + assertSame(CoderResult.OVERFLOW, encoder.encode(in, out, true)); + assertEquals(out.limit(), 4); + assertEquals(out.position(), 4); + assertEquals(out.remaining(), 0); + assertEquals(out.capacity(), 4); + ByteBuffer temp = ByteBuffer.allocate(200); + out.flip(); + temp.put(out); + out = temp; + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); + assertEquals(out.limit(), 200); + assertTrue(out.position() > 0); + assertTrue(out.remaining() > 0); + assertEquals(out.capacity(), 200); + assertByteArray(out, addSurrogate(unibytes)); + + assertSame(encoder, encoder.reset()); + in.rewind(); + out = ByteBuffer.allocate(4); + assertSame(CoderResult.OVERFLOW, encoder.encode(in, out, false)); + assertEquals(out.limit(), 4); + assertEquals(out.position(), 4); + assertEquals(out.remaining(), 0); + assertEquals(out.capacity(), 4); + temp = ByteBuffer.allocate(200); + out.flip(); + temp.put(out); + out = temp; + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, false)); + assertEquals(out.limit(), 200); + assertTrue(out.position() > 0); + assertTrue(out.remaining() > 0); + assertEquals(out.capacity(), 200); + assertByteArray(out, addSurrogate(unibytes)); + } + + void printByteBuffer(ByteBuffer buffer) { + System.out.println("print buffer"); + if (buffer.position() != 0) { + buffer.flip(); + } + byte[] ba = buffer.array(); + for (int i = 0; i < ba.length; i++) { + System.out.println(Integer.toHexString(ba[i])); + } + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ) + public void testEncodeCharBufferByteBufferbooleanExceptionFalse() + throws CharacterCodingException { + implTestEncodeCharBufferByteBufferbooleanException(false); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ) + public void testEncodeCharBufferByteBufferbooleanExceptionTrue() + throws CharacterCodingException { + implTestEncodeCharBufferByteBufferbooleanException(true); + } + + private byte[] duplicateByteArray(byte[] ba, int times) { + byte[] result = new byte[ba.length * times]; + for (int i = 0; i < times; i++) { + System.arraycopy(ba, 0, result, i * ba.length, ba.length); + } + return result; + } + + protected void implTestEncodeCharBufferByteBufferbooleanException( + boolean endOfInput) throws CharacterCodingException { + ByteBuffer out = ByteBuffer.allocate(100); + + // MalformedException: + CharBuffer in = getMalformedCharBuffer(); + encoder.onMalformedInput(CodingErrorAction.REPORT); + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + if (in != null) { + encoder.reset(); + CoderResult r = encoder.encode(in, out, endOfInput); + assertTrue(r.isMalformed()); + + encoder.reset(); + out.clear(); + in.rewind(); + encoder.onMalformedInput(CodingErrorAction.IGNORE); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, + endOfInput)); + assertCodingErrorAction(endOfInput, out, in, unibytes); + + encoder.reset(); + out.clear(); + in.rewind(); + encoder.onMalformedInput(CodingErrorAction.REPLACE); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, + endOfInput)); + assertCodingErrorAction(endOfInput, out, in, unibytesWithRep); + } else { + // System.out.println("Cannot find malformed char buffer for " + // + cs.name()); + } + + // Unmapped Exception: + in = getUnmapCharBuffer(); + encoder.onMalformedInput(CodingErrorAction.REPORT); + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + if (in != null) { + encoder.reset(); + out.clear(); + assertTrue(encoder.encode(in, out, endOfInput).isUnmappable()); + + encoder.reset(); + out.clear(); + in.rewind(); + encoder.onUnmappableCharacter(CodingErrorAction.IGNORE); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, + endOfInput)); + assertCodingErrorAction(endOfInput, out, in, unibytes); + + encoder.reset(); + out.clear(); + in.rewind(); + encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, + endOfInput)); + assertCodingErrorAction(endOfInput, out, in, unibytesWithRep); + } else { + // System.out.println("Cannot find unmapped char buffer for " + // + cs.name()); + } + + // RuntimeException + try { + encoder.encode(getExceptionCharBuffer()); + fail("should throw runtime exception"); + } catch (RuntimeException e) { + } + } + + private void assertCodingErrorAction(boolean endOfInput, ByteBuffer out, + CharBuffer in, byte[] expect) { + if (endOfInput) { + assertByteArray(out, addSurrogate(expect)); + } else { + in.rewind(); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, + endOfInput)); + in.rewind(); + assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); + assertByteArray(out, addSurrogate(duplicateByteArray(expect, 3))); + } + } + + /* + * Class under test for CoderResult flush(ByteBuffer) + */ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "encode", + args = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} + ) + public void testFlush() throws CharacterCodingException { + ByteBuffer out = ByteBuffer.allocate(6); + CharBuffer in = CharBuffer.wrap("aaa"); + assertEquals(in.remaining(), 3); + + // by encode facade, so that internal state will be wrong + encoder.encode(CharBuffer.wrap("testFlush"), ByteBuffer.allocate(20), + true); + assertSame(CoderResult.UNDERFLOW, encoder + .flush(ByteBuffer.allocate(50))); + } + + /* + * test isLegalReplacement(byte[]) + */ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "isLegalReplacement", + args = {byte[].class} + ) + public void testIsLegalReplacement() { + try { + encoder.isLegalReplacement(null); + fail("should throw null pointer exception"); + } catch (NullPointerException e) { + } + assertTrue(encoder.isLegalReplacement(specifiedReplacement)); + + assertTrue(encoder.isLegalReplacement(new byte[200])); + byte[] ba = getIllegalByteArray(); + if (ba != null) { + assertFalse(encoder.isLegalReplacement(ba)); + } + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "isLegalReplacement", + args = {byte[].class} + ) + public void testIsLegalReplacementEmptyArray() { + // ISO, ASC, GB, UTF8 encoder will throw exception in RI + // others will pass + // try { + assertTrue(encoder.isLegalReplacement(new byte[0])); + // fail("should throw ArrayIndexOutOfBoundsException"); + // } catch (ArrayIndexOutOfBoundsException e) { + // } + } + + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "onMalformedInput", + args = {java.nio.charset.CodingErrorAction.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "malformedInputAction", + args = {} + ) + }) + public void testOnMalformedInput() { + assertSame(CodingErrorAction.REPORT, encoder.malformedInputAction()); + try { + encoder.onMalformedInput(null); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + encoder.onMalformedInput(CodingErrorAction.IGNORE); + assertSame(CodingErrorAction.IGNORE, encoder.malformedInputAction()); + } + + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "onUnmappableCharacter", + args = {java.nio.charset.CodingErrorAction.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "unmappableCharacterAction", + args = {} + ) + }) + public void testOnUnmappableCharacter() { + assertSame(CodingErrorAction.REPORT, encoder + .unmappableCharacterAction()); + try { + encoder.onUnmappableCharacter(null); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + encoder.onUnmappableCharacter(CodingErrorAction.IGNORE); + assertSame(CodingErrorAction.IGNORE, encoder + .unmappableCharacterAction()); + } + + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "replaceWith", + args = {byte[].class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "replacement", + args = {} + ) + }) + public void testReplacement() { + try { + encoder.replaceWith(null); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + try { + encoder.replaceWith(new byte[0]); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + try { + encoder.replaceWith(new byte[100]); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + + byte[] nr = getLegalByteArray(); + assertSame(encoder, encoder.replaceWith(nr)); + assertSame(nr, encoder.replacement()); + + nr = getIllegalByteArray(); + try { + encoder.replaceWith(new byte[100]); + fail("should throw null pointer exception"); + } catch (IllegalArgumentException e) { + } + } + + protected byte[] getLegalByteArray() { + return new byte[] { 'a' }; + } + + protected byte[] getIllegalByteArray() { + return new byte[155]; + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetTestCase.java b/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetTestCase.java index 6ded102..4c69759 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetTestCase.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/AbstractCharsetTestCase.java @@ -1,8 +1,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.ByteBuffer; @@ -10,7 +10,9 @@ import java.nio.CharBuffer; import java.nio.charset.Charset; import junit.framework.TestCase; -@TestTargetClass(java.nio.charset.Charset.class) + +@TestTargetClass(Charset.class) + /** * Super class for concrete charset test suites. */ @@ -64,15 +66,11 @@ public abstract class AbstractCharsetTestCase extends TestCase { /* * Test canEncode. */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "canEncode", + args = {} + ) public void testCanEncode() { assertEquals(this.canEncode, this.testingCharset.canEncode()); } @@ -80,15 +78,11 @@ public abstract class AbstractCharsetTestCase extends TestCase { /* * Test isRegistered. */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "", - targets = { - @TestTarget( - methodName = "isRegistered", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "isRegistered", + args = {} + ) public void testIsRegistered() { assertEquals(this.isRegistered, this.testingCharset.isRegistered()); } @@ -96,15 +90,12 @@ public abstract class AbstractCharsetTestCase extends TestCase { /* * Test name. */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "", - targets = { - @TestTarget( - methodName = "name", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "name", + args = {} + ) public void testName() { assertEquals(this.canonicalName, this.testingCharset.name()); // assertEquals(this.canonicalName, this.testingCharset.displayName()); @@ -115,15 +106,12 @@ public abstract class AbstractCharsetTestCase extends TestCase { /* * Test aliases. */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Test functionality completely missed.", - targets = { - @TestTarget( - methodName = "aliases", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Test functionality completely missed.", + method = "aliases", + args = {} + ) public void testAliases() { for (int i = 0; i < this.aliases.length; i++) { Charset c = Charset.forName(this.aliases[i]); @@ -136,15 +124,12 @@ public abstract class AbstractCharsetTestCase extends TestCase { /* * Test the method encode(String) with null. */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "", + method = "encode", + args = {java.lang.String.class} + ) public void testEncode_String_Null() { try { this.testingCharset.encode((String) null); @@ -157,15 +142,12 @@ public abstract class AbstractCharsetTestCase extends TestCase { /* * Test the method encode(CharBuffer) with null. */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "", + method = "encode", + args = {java.nio.CharBuffer.class} + ) public void testEncode_CharBuffer_Null() { try { this.testingCharset.encode((CharBuffer) null); @@ -193,15 +175,11 @@ public abstract class AbstractCharsetTestCase extends TestCase { /* * Test encoding. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "Super class for testing.", - targets = { - @TestTarget( - methodName = "", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "newEncoder", + args = {} + ) public abstract void testEncode_Normal(); /* @@ -222,14 +200,10 @@ public abstract class AbstractCharsetTestCase extends TestCase { /* * Test decoding. */ - @TestInfo( - level = TestLevel.COMPLETE, - purpose = "Super class for testing.", - targets = { - @TestTarget( - methodName = "", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + method = "newDecoder", + args = {} + ) public abstract void testDecode_Normal(); } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/AllTests.java b/nio_char/src/test/java/tests/api/java/nio/charset/AllTests.java index 666d698..35e7129 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/AllTests.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/AllTests.java @@ -19,10 +19,6 @@ package tests.api.java.nio.charset; import junit.framework.Test; import junit.framework.TestSuite; -/** - * This is autogenerated source file. Includes tests for package tests.api.java.nio.charset; - */ - public class AllTests { public static void main(String[] args) { @@ -30,17 +26,17 @@ public class AllTests { } public static Test suite() { - TestSuite suite = new TestSuite("All tests for package tests.api.java.nio.charset;"); - // $JUnit-BEGIN$ + TestSuite suite = tests.TestSuiteFactory.createTestSuite("All tests for package tests.api.java.nio.charset;"); - suite.addTestSuite(ASCCharsetDecoderTest.class); - suite.addTestSuite(ASCCharsetTest.class); - suite.addTestSuite(CharsetDecoderTest.class); - suite.addTestSuite(CharsetEncoderTest.class); suite.addTestSuite(CharsetProviderTest.class); suite.addTestSuite(CharsetTest.class); + suite.addTestSuite(CharsetDecoderTest.class); + suite.addTestSuite(CharsetEncoderTest.class); suite.addTestSuite(CoderResultTest.class); suite.addTestSuite(CodingErrorActionTest.class); + + suite.addTestSuite(ASCCharsetDecoderTest.class); + suite.addTestSuite(ASCCharsetTest.class); // GBCharset not supported // suite.addTestSuite(GBCharsetDecoderTest.class); // suite.addTestSuite(GBCharsetEncoderTest.class); @@ -60,7 +56,62 @@ public class AllTests { suite.addTestSuite(UTFCharsetDecoderTest.class); suite.addTestSuite(UTFCharsetEncoderTest.class); - // $JUnit-END$ + + suite.addTestSuite(Charset_MultiByte_EUC_KR.class); + suite.addTestSuite(Charset_MultiByte_UTF_8.class); + suite.addTestSuite(Charset_MultiByte_UTF_16BE.class); + suite.addTestSuite(Charset_MultiByte_UTF_16LE.class); + +// suite.addTestSuite(Charset_MultiByte_UTF_16.class); + suite.addTestSuite(Charset_MultiByte_UTF_16_Android.class); +// suite.addTestSuite(Charset_MultiByte_EUC_JP.class); + suite.addTestSuite(Charset_MultiByte_EUC_JP_Android.class); + suite.addTestSuite(Charset_MultiByte_ISO_2022_JP.class); // IS HIDDENLY MAPPED TO ASCII OR WHAT?!? +// suite.addTestSuite(Charset_MultiByte_ISO_2022_JP_Android.class); // IS HIDDENLY MAPPED TO ASCII OR WHAT?!? + +// suite.addTestSuite(Charset_MultiByte_Big5.class); + suite.addTestSuite(Charset_MultiByte_Big5_Android.class); + suite.addTestSuite(Charset_MultiByte_x_windows_950.class); // IS MAPPED TO Big5!!! +// suite.addTestSuite(Charset_MultiByte_x_windows_950_Android.class); // IS MAPPED TO Big5!!! + +// suite.addTestSuite(Charset_MultiByte_GBK.class); + suite.addTestSuite(Charset_MultiByte_GBK_Android.class); + suite.addTestSuite(Charset_MultiByte_GB2312.class); // IS HIDDENLY MAPPED TO ASCII OR WHAT?!? +// suite.addTestSuite(Charset_MultiByte_GB2312_Android.class); // IS MAPPED TO GBK!!! + + suite.addTestSuite(Charset_SingleByte_US_ASCII.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_1.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_2.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_3.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_4.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_5.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_6.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_7.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_8.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_9.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_11.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_13.class); + suite.addTestSuite(Charset_SingleByte_ISO_8859_15.class); + suite.addTestSuite(Charset_SingleByte_IBM864.class); + suite.addTestSuite(Charset_SingleByte_x_IBM874.class); + suite.addTestSuite(Charset_SingleByte_windows_1250.class); + suite.addTestSuite(Charset_SingleByte_windows_1251.class); + suite.addTestSuite(Charset_SingleByte_windows_1252.class); + suite.addTestSuite(Charset_SingleByte_windows_1253.class); + suite.addTestSuite(Charset_SingleByte_windows_1254.class); + suite.addTestSuite(Charset_SingleByte_windows_1255.class); + suite.addTestSuite(Charset_SingleByte_windows_1256.class); + suite.addTestSuite(Charset_SingleByte_windows_1257.class); + suite.addTestSuite(Charset_SingleByte_windows_1258.class); + suite.addTestSuite(Charset_SingleByte_KOI8_R.class); + + // NOT SUPPORTED BY RI: + suite.addTestSuite(Charset_ISO_8859_10.class); + suite.addTestSuite(Charset_ISO_8859_14.class); + suite.addTestSuite(Charset_ISO_8859_16.class); + suite.addTestSuite(Charset_macintosh.class); + suite.addTestSuite(Charset_GSM0338.class); + return suite; } } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java index 74bb852..927a96f 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java @@ -15,131 +15,63 @@ */ package tests.api.java.nio.charset; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; +import dalvik.annotation.TestTargets; -import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import java.nio.CharBuffer; -import java.nio.charset.CharacterCodingException; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CoderResult; import java.nio.charset.CodingErrorAction; -import java.nio.charset.MalformedInputException; -import java.nio.charset.UnmappableCharacterException; - -import junit.framework.TestCase; +import java.nio.charset.UnsupportedCharsetException; @TestTargetClass(CharsetDecoder.class) /** - * API unit test for java.nio.CharsetDecoder + * API unit test for java.nio.charset.CharsetDecoder */ -public class CharsetDecoderTest extends TestCase { - - static final String unistr = " buffer";// \u8000\u8001\u00a5\u3000\r\n"; - - byte[] unibytes = new byte[] { 32, 98, 117, 102, 102, 101, 114 }; +public class CharsetDecoderTest extends AbstractCharsetDecoderTestCase { protected static final int MAX_BYTES = 3; protected static final double AVER_BYTES = 0.5; - // default charset - private static final Charset MOCKCS = new CharsetEncoderTest.MockCharset( - "mock", new String[0]); - - Charset cs = MOCKCS; - - // default decoder - protected static CharsetDecoder decoder; - - String bom = ""; protected void setUp() throws Exception { + cs = new CharsetEncoderTest.MockCharset("mock", new String[0]); + unibytes = new byte[] { 32, 98, 117, 102, 102, 101, 114 }; super.setUp(); - decoder = cs.newDecoder(); - } - - protected void tearDown() throws Exception { - super.tearDown(); } - // FIXME: give up this tests - // /* - // * test default value - // */ - // public void testDefaultCharsPerByte() { - // assertTrue(decoder.averageCharsPerByte() == AVER_BYTES); - // assertTrue(decoder.maxCharsPerByte() == MAX_BYTES); - // } - -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "charset", - methodArgs = {} - ), @TestTarget( - methodName = "detectedCharset", - methodArgs = {} - ), @TestTarget( - methodName = "isCharsetDetected", - methodArgs = {} - ), @TestTarget( - methodName = "isAutoDetecting", - methodArgs = {} - ), @TestTarget( - methodName = "malformedInputAction", - methodArgs = {} - ), @TestTarget( - methodName = "unmappableCharacterAction", - methodArgs = {} - ), @TestTarget( - methodName = "replacement", - methodArgs = {} - ) - }) - public void testDefaultValues() { - assertSame(cs, decoder.charset()); - try { - decoder.detectedCharset(); - fail("should unsupported"); - } catch (UnsupportedOperationException e) { - } - try { - assertTrue(decoder.isCharsetDetected()); - fail("should unsupported"); - } catch (UnsupportedOperationException e) { - } - assertFalse(decoder.isAutoDetecting()); - assertSame(CodingErrorAction.REPORT, decoder.malformedInputAction()); - assertSame(CodingErrorAction.REPORT, decoder - .unmappableCharacterAction()); - assertEquals(decoder.replacement(), "\ufffd"); - } /* * test constructor */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "CharsetDecoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class} - ), @TestTarget( - methodName = "charset", - methodArgs = {} - ), @TestTarget( - methodName = "averageCharsPerByte", - methodArgs = {} - ), @TestTarget( - methodName = "maxCharsPerByte", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "CharsetDecoder", + args = {java.nio.charset.Charset.class, float.class, float.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "charset", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageCharsPerByte", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxCharsPerByte", + args = {} ) }) public void testCharsetDecoder() { @@ -195,701 +127,24 @@ public class CharsetDecoderTest extends TestCase { } } - /* - * test onMalformedInput - */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "malformedInputAction", - methodArgs = {} - ), @TestTarget( - methodName = "onMalformedInput", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ) - }) - public void testOnMalformedInput() { - assertSame(CodingErrorAction.REPORT, decoder.malformedInputAction()); - try { - decoder.onMalformedInput(null); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { - } - decoder.onMalformedInput(CodingErrorAction.IGNORE); - assertSame(CodingErrorAction.IGNORE, decoder.malformedInputAction()); - } - - /* - * test unmappableCharacter - */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "unmappableCharacterAction", - methodArgs = {} - ), @TestTarget( - methodName = "onUnmappableCharacter", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ) - }) - public void testOnUnmappableCharacter() { - assertSame(CodingErrorAction.REPORT, decoder - .unmappableCharacterAction()); - try { - decoder.onUnmappableCharacter(null); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { - } - decoder.onUnmappableCharacter(CodingErrorAction.IGNORE); - assertSame(CodingErrorAction.IGNORE, decoder - .unmappableCharacterAction()); - } - - /* - * test replaceWith - */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "replaceWith", - methodArgs = {java.lang.String.class} - ), @TestTarget( - methodName = "replacement", - methodArgs = {} - ) - }) - public void testReplaceWith() { - try { - decoder.replaceWith(null); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { - } - try { - decoder.replaceWith(""); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { - } - try { - decoder.replaceWith("testReplaceWith"); - fail("should throw illegal argument exception"); - } catch (IllegalArgumentException e) { - } - - decoder.replaceWith("a"); - assertSame("a", decoder.replacement()); - } - - /* - * Class under test for CharBuffer decode(ByteBuffer) - */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException & CharacterCodingException checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) - public void testDecodeByteBuffer() throws CharacterCodingException { - implTestDecodeByteBuffer(); - } - - void implTestDecodeByteBuffer() throws CharacterCodingException { - // Null pointer - try { - decoder.decode(null); - fail("should throw null pointer exception"); - } catch (NullPointerException e) { - } - - // empty input buffer - CharBuffer out = decoder.decode(ByteBuffer.allocate(0)); - assertCharBufferValue(out, ""); - - // normal case - ByteBuffer in = ByteBuffer.wrap(getUnibytes()); - out = decoder.decode(in); - assertEquals(out.position(), 0); - assertEquals(out.limit(), unistr.length()); - assertEquals(out.remaining(), unistr.length()); - assertEquals(new String(out.array(), 0, out.limit()), unistr); - } - -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException & CharacterCodingException checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) - public void testDecodeByteBufferException() - throws CharacterCodingException, UnsupportedEncodingException { - CharBuffer out; - ByteBuffer in; - String replaceStr = decoder.replacement() + " buffer"; - - // MalformedException: - decoder.onMalformedInput(CodingErrorAction.REPORT); - decoder.onUnmappableCharacter(CodingErrorAction.REPORT); - in = getMalformByteBuffer(); - if (in != null) { - try { - CharBuffer buffer = decoder.decode(in); - assertTrue(buffer.remaining() > 0); - fail("should throw MalformedInputException"); - } catch (MalformedInputException e) { - } - - decoder.reset(); - in.rewind(); - decoder.onMalformedInput(CodingErrorAction.IGNORE); - out = decoder.decode(in); - assertCharBufferValue(out, " buffer"); - - decoder.reset(); - in.rewind(); - decoder.onMalformedInput(CodingErrorAction.REPLACE); - out = decoder.decode(in); - assertCharBufferValue(out, replaceStr); - } - - // Unmapped Exception: - decoder.onMalformedInput(CodingErrorAction.REPORT); - decoder.onUnmappableCharacter(CodingErrorAction.REPORT); - in = getUnmappedByteBuffer(); - if (in != null) { - try { - decoder.decode(in); - fail("should throw UnmappableCharacterException"); - } catch (UnmappableCharacterException e) { - } - - decoder.reset(); - in.rewind(); - decoder.onUnmappableCharacter(CodingErrorAction.IGNORE); - out = decoder.decode(in); - assertCharBufferValue(out, " buffer"); - - decoder.reset(); - in.rewind(); - decoder.onUnmappableCharacter(CodingErrorAction.REPLACE); - out = decoder.decode(in); - assertCharBufferValue(out, replaceStr); - } - - // RuntimeException - try { - decoder.decode(getExceptionByteArray()); - fail("should throw runtime exception"); - } catch (RuntimeException e) { - } - } - - /* - * Class under test for CoderResult decode(ByteBuffer, CharBuffer, boolean) - */ - -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} - ) - }) - public void testDecodeByteBufferCharBufferboolean() { - implTestDecodeByteBufferCharBufferboolean(); - } - - void implTestDecodeByteBufferCharBufferboolean() { - byte[] gb = getUnibytes(); - ByteBuffer in = ByteBuffer.wrap(gb); - CharBuffer out = CharBuffer.allocate(100); - - // Null pointer - try { - decoder.decode(null, out, true); - fail("should throw null pointer exception"); - } catch (NullPointerException e) { - } - try { - decoder.decode(in, null, true); - fail("should throw null pointer exception"); - } catch (NullPointerException e) { - } - - // normal case, one complete operation - decoder.reset(); - in.rewind(); - out.rewind(); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, true)); - assertEquals(out.limit(), 100); - assertEquals(out.position(), unistr.length()); - assertEquals(out.remaining(), 100 - unistr.length()); - assertEquals(out.capacity(), 100); - assertCharBufferValue(out, unistr); - decoder.flush(out); - - // normal case, one complete operation, but call twice, first time set - // endOfInput to false - decoder.reset(); - in.rewind(); - out.clear(); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); - assertEquals(out.limit(), 100); - assertEquals(out.position(), unistr.length()); - assertEquals(out.remaining(), 100 - unistr.length()); - assertEquals(out.capacity(), 100); - assertCharBufferValue(out, unistr); - - decoder.reset(); - in.rewind(); - out.clear(); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); - in = ByteBuffer.wrap(unibytes); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); - in.rewind(); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, true)); - assertEquals(out.limit(), 100); - assertTrue(out.position() > 0); - assertEquals(out.remaining(), out.capacity() - out.position()); - assertEquals(out.capacity(), 100); - assertCharBufferValue(out, unistr + unistr + unistr); - - // overflow - out = CharBuffer.allocate(4); - decoder.reset(); - in = ByteBuffer.wrap(getUnibytes()); - out.rewind(); - assertSame(CoderResult.OVERFLOW, decoder.decode(in, out, false)); - - assertEquals(new String(out.array()), unistr.substring(0, 4)); - out = CharBuffer.allocate(100); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); - assertCharBufferValue(out, unistr.substring(4)); - in.rewind(); - out = CharBuffer.allocate(100); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, true)); - assertCharBufferValue(out, bom + unistr); - } - -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} - ) - }) - public void testDecodeCharBufferByteBufferbooleanExceptionTrue() - throws CharacterCodingException, UnsupportedEncodingException { - implTestDecodeCharBufferByteBufferbooleanException(true); - } - -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} - ) - }) - public void testDecodeCharBufferByteBufferbooleanExceptionFalse() - throws CharacterCodingException, UnsupportedEncodingException { - implTestDecodeCharBufferByteBufferbooleanException(false); - } - - void implTestDecodeCharBufferByteBufferbooleanException(boolean endOfInput) - throws CharacterCodingException, UnsupportedEncodingException { - CharBuffer out; - ByteBuffer in; - - // Unmapped Exception: - in = getUnmappedByteBuffer(); - out = CharBuffer.allocate(50); - decoder.onMalformedInput(CodingErrorAction.REPORT); - if (null != in) { - decoder.reset(); - decoder.onUnmappableCharacter(CodingErrorAction.REPORT); - CoderResult result = decoder.decode(in, out, endOfInput); - assertTrue(result.isUnmappable()); - - decoder.reset(); - out.clear(); - in.rewind(); - decoder.onUnmappableCharacter(CodingErrorAction.IGNORE); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, - endOfInput)); - assertCharBufferValue(out, " buffer"); - - decoder.reset(); - out.clear(); - in.rewind(); - decoder.onUnmappableCharacter(CodingErrorAction.REPLACE); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, - endOfInput)); - assertCharBufferValue(out, decoder.replacement() + " buffer"); - } else if (endOfInput) { - // System.err.println("Cannot find unmappable byte array for " - // + cs.name()); - } - - // MalformedException: - in = getMalformByteBuffer(); - out = CharBuffer.allocate(50); - decoder.onUnmappableCharacter(CodingErrorAction.REPORT); - if (null != in) { - decoder.onMalformedInput(CodingErrorAction.REPORT); - CoderResult result = decoder.decode(in, out, endOfInput); - assertTrue(result.isMalformed()); - - decoder.reset(); - out.clear(); - in.rewind(); - decoder.onMalformedInput(CodingErrorAction.IGNORE); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, - endOfInput)); - assertCharBufferValue(out, " buffer"); - - decoder.reset(); - out.clear(); - in.rewind(); - decoder.onMalformedInput(CodingErrorAction.REPLACE); - assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, - endOfInput)); - assertCharBufferValue(out, decoder.replacement() + " buffer"); - } else if (endOfInput) { - // System.err.println("Cannot find malform byte array for " - // + cs.name()); - } - - // RuntimeException - in = getExceptionByteArray(); - try { - decoder.decode(in, out, endOfInput); - fail("should throw runtime exception"); - } catch (RuntimeException e) { - } - } - - ByteBuffer getExceptionByteArray() throws UnsupportedEncodingException { - // "runtime" - return ByteBuffer - .wrap(new byte[] { 114, 117, 110, 116, 105, 109, 101 }); - } - - ByteBuffer getUnmappedByteBuffer() throws UnsupportedEncodingException { - // "unmap buffer" - byte[] ba = new byte[] { 117, 110, 109, 97, 112, 32, 98, 117, 102, 102, - 101, 114 }; - return ByteBuffer.wrap(ba); - } - - ByteBuffer getMalformByteBuffer() throws UnsupportedEncodingException { - // "malform buffer" - byte[] ba = new byte[] { 109, 97, 108, 102, 111, 114, 109, 32, 98, 117, - 102, 102, 101, 114 }; - return ByteBuffer.wrap(ba); - } - - void assertCharBufferValue(CharBuffer out, String expected) { - if (out.position() != 0) { - out.flip(); - } - assertEquals(new String(out.array(), 0, out.limit()), expected); - } - - /* - * test flush - */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "flush", - methodArgs = {java.nio.CharBuffer.class} - ) - }) - public void testFlush() throws CharacterCodingException { - CharBuffer out = CharBuffer.allocate(10); - ByteBuffer in = ByteBuffer.wrap(new byte[] { 12, 12 }); - decoder.decode(in, out, true); - assertSame(CoderResult.UNDERFLOW, decoder.flush(out)); - - decoder.reset(); - decoder.decode((ByteBuffer) in.rewind(), (CharBuffer) out.rewind(), - true); - assertSame(CoderResult.UNDERFLOW, decoder - .flush(CharBuffer.allocate(10))); - } - - /* - * ---------------------------------- methods to test illegal state - * ----------------------------------- - */ - // Normal case: just after reset, and it also means reset can be done - // anywhere -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "reset", - methodArgs = {} - ) - }) - public void testResetIllegalState() throws CharacterCodingException { - byte[] gb = getUnibytes(); - decoder.reset(); - decoder.decode(ByteBuffer.wrap(gb)); - decoder.reset(); - decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(3), false); - decoder.reset(); - decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(3), true); - decoder.reset(); - } - -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "flush", - methodArgs = {java.nio.CharBuffer.class} - ), @TestTarget( - methodName = "reset", - methodArgs = {} - ) - }) - public void testFlushIllegalState() throws CharacterCodingException { - ByteBuffer in = ByteBuffer.wrap(new byte[] { 98, 98 }); - CharBuffer out = CharBuffer.allocate(5); - // Normal case: after decode with endOfInput is true - decoder.reset(); - decoder.decode(in, out, true); - out.rewind(); - CoderResult result = decoder.flush(out); - assertSame(result, CoderResult.UNDERFLOW); - - // Illegal state: flush twice - try { - decoder.flush(out); - fail("should throw IllegalStateException"); - } catch (IllegalStateException e) { - } - - // Illegal state: flush after decode with endOfInput is false - decoder.reset(); - decoder.decode(in, out, false); - try { - decoder.flush(out); - fail("should throw IllegalStateException"); - } catch (IllegalStateException e) { - } - } - - byte[] getUnibytes() { - return unibytes; - } - - // test illegal states for decode facade -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Exceptions checking missed", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ), @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} - ) - }) - public void testDecodeFacadeIllegalState() throws CharacterCodingException { - // decode facade can be execute in anywhere - byte[] gb = getUnibytes(); - ByteBuffer in = ByteBuffer.wrap(gb); - // Normal case: just created - decoder.decode(in); - in.rewind(); - - // Normal case: just after decode facade - decoder.decode(in); - in.rewind(); - - // Normal case: just after decode with that endOfInput is true - decoder.reset(); - decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(30), true); - decoder.decode(in); - in.rewind(); - - // Normal case:just after decode with that endOfInput is false - decoder.reset(); - decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(30), false); - decoder.decode(in); - in.rewind(); - - // Normal case: just after flush - decoder.reset(); - decoder.decode(ByteBuffer.wrap(gb), CharBuffer.allocate(30), true); - decoder.flush(CharBuffer.allocate(10)); - decoder.decode(in); - in.rewind(); - } - - // test illegal states for two decode method with endOfInput is true -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "CoderMalfunctionError checking missed", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} - ) - }) - public void testDecodeTrueIllegalState() throws CharacterCodingException { - ByteBuffer in = ByteBuffer.wrap(new byte[] { 98, 98 }); - CharBuffer out = CharBuffer.allocate(100); - // Normal case: just created - decoder.decode(in, out, true); - in.rewind(); - out.rewind(); - - // Normal case: just after decode with that endOfInput is true - decoder.reset(); - decoder.decode(in, CharBuffer.allocate(30), true); - in.rewind(); - decoder.decode(in, out, true); - in.rewind(); - out.rewind(); - - // Normal case:just after decode with that endOfInput is false - decoder.reset(); - decoder.decode(in, CharBuffer.allocate(30), false); - in.rewind(); - decoder.decode(in, out, true); - in.rewind(); - out.rewind(); - - // Illegal state: just after flush - decoder.reset(); - decoder.decode(in, CharBuffer.allocate(30), true); - decoder.flush(CharBuffer.allocate(10)); - in.rewind(); - try { - decoder.decode(in, out, true); - fail("should illegal state"); - } catch (IllegalStateException e) { - } - in.rewind(); - out.rewind(); - - } - - // test illegal states for two decode method with endOfInput is false -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "CoderMalfunctionError checking missed", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} - ) - }) - public void testDecodeFalseIllegalState() throws CharacterCodingException { - ByteBuffer in = ByteBuffer.wrap(new byte[] { 98, 98 }); - CharBuffer out = CharBuffer.allocate(5); - // Normal case: just created - decoder.decode(in, out, false); - in.rewind(); - out.rewind(); - - // Illegal state: just after decode facade - decoder.reset(); - decoder.decode(in); - in.rewind(); - try { - decoder.decode(in, out, false); - fail("should illegal state"); - } catch (IllegalStateException e) { - } - in.rewind(); - out.rewind(); - - // Illegal state: just after decode with that endOfInput is true - decoder.reset(); - decoder.decode(in, CharBuffer.allocate(30), true); - in.rewind(); - try { - decoder.decode(in, out, false); - fail("should illegal state"); - } catch (IllegalStateException e) { - } - in.rewind(); - out.rewind(); - - // Normal case:just after decode with that endOfInput is false - decoder.reset(); - decoder.decode(in, CharBuffer.allocate(30), false); - in.rewind(); - decoder.decode(in, out, false); - in.rewind(); - out.rewind(); - - // Illegal state: just after flush - decoder.reset(); - decoder.decode(in, CharBuffer.allocate(30), true); - in.rewind(); - decoder.flush(CharBuffer.allocate(10)); - try { - decoder.decode(in, out, false); - fail("should illegal state"); - } catch (IllegalStateException e) { - } - } - - /* - * --------------------------------- illegal state test end - * --------------------------------- - */ - -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "implFlush", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implFlush", + args = {java.nio.CharBuffer.class} + ) public void testImplFlush() { decoder = new MockCharsetDecoder(cs, 1, 3); assertEquals(CoderResult.UNDERFLOW, ((MockCharsetDecoder) decoder) .pubImplFlush(null)); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "implOnMalformedInput", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implOnMalformedInput", + args = {java.nio.charset.CodingErrorAction.class} + ) public void testImplOnMalformedInput() { decoder = new MockCharsetDecoder(cs, 1, 3); assertEquals(CoderResult.UNDERFLOW, ((MockCharsetDecoder) decoder) @@ -897,47 +152,64 @@ public class CharsetDecoderTest extends TestCase { } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "implOnUnmappableCharacter", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implOnUnmappableCharacter", + args = {java.nio.charset.CodingErrorAction.class} + ) public void testImplOnUnmappableCharacter() { decoder = new MockCharsetDecoder(cs, 1, 3); ((MockCharsetDecoder) decoder).pubImplOnUnmappableCharacter(null); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "implReplaceWith", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implReplaceWith", + args = {java.lang.String.class} + ) public void testImplReplaceWith() { decoder = new MockCharsetDecoder(cs, 1, 3); ((MockCharsetDecoder) decoder).pubImplReplaceWith(null); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "implReset", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implReset", + args = {} + ) public void testImplReset() { decoder = new MockCharsetDecoder(cs, 1, 3); ((MockCharsetDecoder) decoder).pubImplReset(); } + + + boolean deCodeLoopCalled = false; + + @TestTargetNew( + level = TestLevel.SUFFICIENT, + notes = "", + method = "decodeLoop", + args = { ByteBuffer.class, CharBuffer.class} + ) + public void testEncodeLoop() throws Exception { + try { + decoder = new MockCharsetDecoder(Charset.forName("US-ASCII"), 1, + MAX_BYTES) { + @Override + protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { + deCodeLoopCalled = true; + return super.decodeLoop(in, out); + } + }; + decoder.decode(ByteBuffer.wrap(new byte[]{ 'a','b','c'})); + } catch (UnsupportedCharsetException e) { + fail("us-ascii not supported"); + } + assertTrue(deCodeLoopCalled); + } /* * mock decoder @@ -1015,7 +287,6 @@ public class CharsetDecoderTest extends TestCase { public void pubImplReset() { super.implReset(); } - } } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java index 475cd87..ea2cb96 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java @@ -15,113 +15,119 @@ */ package tests.api.java.nio.charset; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; +import dalvik.annotation.TestTargets; import java.nio.ByteBuffer; import java.nio.CharBuffer; -import java.nio.charset.CharacterCodingException; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CoderResult; import java.nio.charset.CodingErrorAction; -import java.nio.charset.MalformedInputException; -import java.nio.charset.UnmappableCharacterException; import java.nio.charset.UnsupportedCharsetException; import java.util.Arrays; - -import junit.framework.TestCase; @TestTargetClass(CharsetEncoder.class) /** * API unit test for java.nio.charset.CharsetEncoder */ -public class CharsetEncoderTest extends TestCase { +public class CharsetEncoderTest extends AbstractCharsetEncoderTestCase { static final int MAX_BYTES = 3; static final float AVER_BYTES = 0.5f; - // charset for mock class - private static final Charset MOCKCS = new MockCharset("CharsetEncoderTest_mock", new String[0]); - - Charset cs = MOCKCS; - - // default encoder - CharsetEncoder encoder; - // default for Charset abstract class byte[] defaultReplacement = new byte[] { 63 }; // specific for Charset implementation subclass byte[] specifiedReplacement = new byte[] { 26 }; - static final String unistr = " buffer";// \u8000\u8001\u00a5\u3000\r\n"; - - byte[] unibytes = new byte[] { 32, 98, 117, 102, 102, 101, 114 }; - - byte[] unibytesWithRep = null; - - byte[] surrogate = new byte[0]; protected void setUp() throws Exception { + cs = new MockCharset("CharsetEncoderTest_mock", new String[0]); + unibytes = new byte[] { 32, 98, 117, 102, 102, 101, 114 }; super.setUp(); - encoder = cs.newEncoder(); - if (null == unibytesWithRep) { - byte[] replacement = encoder.replacement(); - unibytesWithRep = new byte[replacement.length + unibytes.length]; - System.arraycopy(replacement, 0, unibytesWithRep, 0, - replacement.length); - System.arraycopy(unibytes, 0, unibytesWithRep, replacement.length, - unibytes.length); - } } - /* - * @see TestCase#tearDown() - */ - protected void tearDown() throws Exception { - super.tearDown(); - } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "averageBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} ) }) public void testSpecificDefaultValue() { assertTrue(encoder.averageBytesPerChar() == AVER_BYTES); assertTrue(encoder.maxBytesPerChar() == MAX_BYTES); } - -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "onMalformedInput & onUnmappableCharacter requires check for IllegalArgumentException", - targets = { - @TestTarget( - methodName = "malformedInputAction", - methodArgs = {} - ), @TestTarget( - methodName = "unmappableCharacterAction", - methodArgs = {} - ), @TestTarget( - methodName = "onMalformedInput", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ), @TestTarget( - methodName = "onUnmappableCharacter", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ), @TestTarget( - methodName = "replacement", - methodArgs = {} + + + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implOnMalformedInput", + args = {java.nio.charset.CodingErrorAction.class} + ) + public void testImplOnMalformedInput() { + encoder = new MockCharsetEncoder(cs, 1, 3); + assertEquals(CoderResult.UNDERFLOW, ((MockCharsetEncoder) encoder) + .pubImplFlush(null)); + + } + + + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implOnUnmappableCharacter", + args = {java.nio.charset.CodingErrorAction.class} + ) + public void testImplOnUnmappableCharacter() { + encoder = new MockCharsetEncoder(cs, 1, 3); + ((MockCharsetEncoder) encoder).pubImplOnUnmappableCharacter(null); + } + + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "onMalformedInput & onUnmappableCharacter requires check for IllegalArgumentException", + method = "malformedInputAction", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "onMalformedInput & onUnmappableCharacter requires check for IllegalArgumentException", + method = "unmappableCharacterAction", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "onMalformedInput & onUnmappableCharacter requires check for IllegalArgumentException", + method = "onMalformedInput", + args = {java.nio.charset.CodingErrorAction.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "onMalformedInput & onUnmappableCharacter requires check for IllegalArgumentException", + method = "onUnmappableCharacter", + args = {java.nio.charset.CodingErrorAction.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "onMalformedInput & onUnmappableCharacter requires check for IllegalArgumentException", + method = "replacement", + args = {} ) }) public void testDefaultValue() { @@ -139,35 +145,78 @@ public class CharsetEncoderTest extends TestCase { } } + + + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implReset", + args = {} + ) + public void testImplReset() { + encoder = new MockCharsetEncoder(cs, 1, 3); + ((MockCharsetEncoder) encoder).pubImplReset(); + } + + + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implFlush", + args = {ByteBuffer.class} + ) + public void testImplFlush() { + encoder = new MockCharsetEncoder(cs, 1, 3); + assertEquals(CoderResult.UNDERFLOW, ((MockCharsetEncoder) encoder) + .pubImplFlush(null)); + } + /* * Class under test for constructor CharsetEncoder(Charset, float, float) */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "charset", - methodArgs = {} - ), @TestTarget( - methodName = "averageBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "malformedInputAction", - methodArgs = {} - ), @TestTarget( - methodName = "unmappableCharacterAction", - methodArgs = {} - ), @TestTarget( - methodName = "CharsetEncoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class} - ), @TestTarget( - methodName = "replacement", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "charset", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedInputAction", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableCharacterAction", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "CharsetEncoder", + args = {java.nio.charset.Charset.class, float.class, float.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "replacement", + args = {} ) }) public void testCharsetEncoderCharsetfloatfloat() { @@ -239,25 +288,36 @@ public class CharsetEncoderTest extends TestCase { * Class under test for constructor CharsetEncoder(Charset, float, float, * byte[]) */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "CharsetEncoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class, byte[].class} - ), @TestTarget( - methodName = "charset", - methodArgs = {} - ), @TestTarget( - methodName = "averageBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "replacement", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "CharsetEncoder", + args = {java.nio.charset.Charset.class, float.class, float.class, byte[].class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "charset", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "replacement", + args = {} ) }) public void testCharsetEncoderCharsetfloatfloatbyteArray() { @@ -331,429 +391,17 @@ public class CharsetEncoderTest extends TestCase { } } - /* - * Class under test for boolean canEncode(char) - */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ) - }) - public void testCanEncodechar() throws CharacterCodingException { - // for non-mapped char - assertTrue(encoder.canEncode('\uc2c0')); - // surrogate char for unicode - // 1st byte: d800-dbff - // 2nd byte: dc00-dfff - assertTrue(encoder.canEncode('\ud800')); - // valid surrogate pair - assertTrue(encoder.canEncode('\udc00')); - } - - /*----------------------------------------- - * Class under test for illegal state case - * methods which can change internal states are two encode, flush, two canEncode, reset - * ----------------------------------------- - */ - - // Normal case: just after reset, and it also means reset can be done - // anywhere -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ), @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ), @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ), @TestTarget( - methodName = "reset", - methodArgs = {} - ) - }) - public void testResetIllegalState() throws CharacterCodingException { - assertSame(encoder, encoder.reset()); - encoder.canEncode('\ud901'); - assertSame(encoder, encoder.reset()); - encoder.canEncode("\ud901\udc00"); - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("aaa")); - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), false); - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), true); - assertSame(encoder, encoder.reset()); - } - -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "reset", - methodArgs = {} - ), @TestTarget( - methodName = "flush", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) - public void testFlushIllegalState() throws CharacterCodingException { - CharBuffer in = CharBuffer.wrap("aaa"); - ByteBuffer out = ByteBuffer.allocate(5); - - // Normal case: after encode with endOfInput is true - assertSame(encoder, encoder.reset()); - encoder.encode(in, out, true); - out.rewind(); - CoderResult result = encoder.flush(out); - - // Illegal state: flush twice - try { - encoder.flush(out); - fail("should throw IllegalStateException"); - } catch (IllegalStateException e) { - } - - // Illegal state: flush after encode with endOfInput is false - assertSame(encoder, encoder.reset()); - encoder.encode(in, out, false); - try { - encoder.flush(out); - fail("should throw IllegalStateException"); - } catch (IllegalStateException e) { - } - } - - // test illegal states for encode facade -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ), @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ), @TestTarget( - methodName = "flush", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) - public void testEncodeFacadeIllegalState() throws CharacterCodingException { - // encode facade can be execute in anywhere - CharBuffer in = CharBuffer.wrap("aaa"); - // Normal case: just created - encoder.encode(in); - in.rewind(); - - // Normal case: just after encode facade - encoder.encode(in); - in.rewind(); - - // Normal case: just after canEncode - assertSame(encoder, encoder.reset()); - encoder.canEncode("\ud902\udc00"); - encoder.encode(in); - in.rewind(); - assertSame(encoder, encoder.reset()); - encoder.canEncode('\ud902'); - encoder.encode(in); - in.rewind(); - - // Normal case: just after encode with that endOfInput is true - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), - ByteBuffer.allocate(30), true); - encoder.encode(in); - in.rewind(); - - // Normal case:just after encode with that endOfInput is false - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), - ByteBuffer.allocate(30), false); - encoder.encode(in); - in.rewind(); - - // Normal case: just after flush - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), - ByteBuffer.allocate(30), true); - encoder.flush(ByteBuffer.allocate(10)); - encoder.encode(in); - in.rewind(); - } - - // test illegal states for two encode method with endOfInput is true -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ), @TestTarget( - methodName = "reset", - methodArgs = {} - ), @TestTarget( - methodName = "flush", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) - public void testEncodeTrueIllegalState() throws CharacterCodingException { - CharBuffer in = CharBuffer.wrap("aaa"); - ByteBuffer out = ByteBuffer.allocate(5); - // Normal case: just created - encoder.encode(in, out, true); - in.rewind(); - out.rewind(); - - in.rewind(); - out.rewind(); - // Normal case: just after encode with that endOfInput is true - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), - ByteBuffer.allocate(30), true); - encoder.encode(in, out, true); - in.rewind(); - out.rewind(); - - // Normal case:just after encode with that endOfInput is false - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), - ByteBuffer.allocate(30), false); - encoder.encode(in, out, true); - in.rewind(); - out.rewind(); - - // Illegal state: just after flush - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), - ByteBuffer.allocate(30), true); - encoder.flush(ByteBuffer.allocate(10)); - try { - encoder.encode(in, out, true); - fail("should illegal state"); - } catch (IllegalStateException e) { - } - - // Normal case: after canEncode - assertSame(encoder, encoder.reset()); - encoder.canEncode("\ud906\udc00"); - encoder.encode(in, out, true); - in.rewind(); - out.rewind(); - assertSame(encoder, encoder.reset()); - encoder.canEncode('\ud905'); - encoder.encode(in, out, true); - } - - // test illegal states for two encode method with endOfInput is false -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ), @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ), @TestTarget( - methodName = "reset", - methodArgs = {} - ), @TestTarget( - methodName = "flush", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) - public void testEncodeFalseIllegalState() throws CharacterCodingException { - CharBuffer in = CharBuffer.wrap("aaa"); - ByteBuffer out = ByteBuffer.allocate(5); - // Normal case: just created - encoder.encode(in, out, false); - in.rewind(); - out.rewind(); - - // Illegal state: just after encode facade - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState1")); - try { - encoder.encode(in, out, false); - fail("should illegal state"); - } catch (IllegalStateException e) { - } - - // Illegal state: just after encode with that endOfInput is true - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), - ByteBuffer.allocate(30), true); - try { - encoder.encode(in, out, false); - fail("should illegal state"); - } catch (IllegalStateException e) { - } - - // Normal case:just after encode with that endOfInput is false - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), - ByteBuffer.allocate(30), false); - encoder.encode(in, out, false); - in.rewind(); - out.rewind(); - - // Illegal state: just after flush - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), - ByteBuffer.allocate(30), true); - encoder.flush(ByteBuffer.allocate(10)); - try { - encoder.encode(in, out, false); - fail("should illegal state"); - } catch (IllegalStateException e) { - } - - // Normal case: after canEncode - assertSame(encoder, encoder.reset()); - encoder.canEncode("\ud906\udc00"); - encoder.encode(in, out, false); - in.rewind(); - out.rewind(); - assertSame(encoder, encoder.reset()); - encoder.canEncode('\ud905'); - encoder.encode(in, out, false); - } - - // test illegal states for two canEncode methods -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ), @TestTarget( - methodName = "reset", - methodArgs = {} - ), @TestTarget( - methodName = "flush", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) - public void testCanEncodeIllegalState() throws CharacterCodingException { - // Normal case: just created - encoder.canEncode("\ud900\udc00"); - encoder.canEncode('\ud900'); - - // Illegal state: just after encode with that endOfInput is true - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), - ByteBuffer.allocate(30), true); - try { - encoder.canEncode("\ud903\udc00"); - fail("should throw illegal state exception"); - } catch (IllegalStateException e) { - } - - // Illegal state:just after encode with that endOfInput is false - assertSame(encoder, encoder.reset()); - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), - ByteBuffer.allocate(30), false); - try { - encoder.canEncode("\ud904\udc00"); - fail("should throw illegal state exception"); - } catch (IllegalStateException e) { - } - - // Normal case: just after flush - encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), - ByteBuffer.allocate(30), true); - encoder.flush(ByteBuffer.allocate(10)); - encoder.canEncode("\ud905\udc00"); - encoder.canEncode('\ud906'); - - // Normal case: after reset again - assertSame(encoder, encoder.reset()); - encoder.canEncode("\ud906\udc00"); - encoder.canEncode('\ud905'); - } - - /* - * --------------------------------- illegal state test end - * --------------------------------- - */ - - /* - * Class under test for boolean canEncode(CharSequence) - */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) - public void testCanEncodeCharSequence() { - // for non-mapped char - assertTrue(encoder.canEncode("\uc2c0")); - // surrogate char for unicode - // 1st byte: d800-dbff - // 2nd byte: dc00-dfff - assertTrue(encoder.canEncode("\ud800")); - // valid surrogate pair - assertTrue(encoder.canEncode("\ud800\udc00")); - // invalid surrogate pair - assertTrue(encoder.canEncode("\ud800\udb00")); - } /* * Class under test for Charset charset() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "", - targets = { - @TestTarget( - methodName = "CharsetEncoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "", + method = "CharsetEncoder", + args = {java.nio.charset.Charset.class, float.class, float.class} + ) public void testCharset() { try { encoder = new MockCharsetEncoder(Charset.forName("gbk"), 1, @@ -765,559 +413,47 @@ public class CharsetEncoderTest extends TestCase { } } - /* - * Class under test for ByteBuffer encode(CharBuffer) - */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) - public void testEncodeCharBuffer() throws CharacterCodingException { - // Null pointer - try { - encoder.encode(null); - fail("should throw null pointer exception"); - } catch (NullPointerException e) { - } - - // empty input buffer - ByteBuffer out = encoder.encode(CharBuffer.wrap("")); - assertEquals(out.position(), 0); - assertByteArray(out, new byte[0]); - // assertByteArray(out, surrogate); - // normal case - out = encoder.encode(CharBuffer.wrap(unistr)); - assertEquals(out.position(), 0); - assertByteArray(out, addSurrogate(unibytes)); - - // Regression test for harmony-3378 - Charset cs = Charset.forName("UTF-8"); - CharsetEncoder encoder = cs.newEncoder(); - encoder.onMalformedInput(CodingErrorAction.REPLACE); - encoder = encoder.replaceWith(new byte[] { (byte) 0xef, (byte) 0xbf, - (byte) 0xbd, }); - CharBuffer in = CharBuffer.wrap("\ud800"); - out = encoder.encode(in); - assertNotNull(out); - } - - private byte[] addSurrogate(byte[] expected) { - if (surrogate.length > 0) { - byte[] temp = new byte[surrogate.length + expected.length]; - System.arraycopy(surrogate, 0, temp, 0, surrogate.length); - System.arraycopy(expected, 0, temp, surrogate.length, - expected.length); - expected = temp; - } - return expected; - } - - /** - * @return - */ - protected byte[] getEmptyByteArray() { - return new byte[0]; - } - - CharBuffer getMalformedCharBuffer() { - return CharBuffer.wrap("malform buffer"); - } - - CharBuffer getUnmapCharBuffer() { - return CharBuffer.wrap("unmap buffer"); - } - - CharBuffer getExceptionCharBuffer() { - return CharBuffer.wrap("runtime buffer"); - } - -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Missed checking for IllegalStateException & CharacterCodingException", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) - public void testEncodeCharBufferException() throws CharacterCodingException { - ByteBuffer out; - CharBuffer in; - // MalformedException: - in = getMalformedCharBuffer(); - encoder.onMalformedInput(CodingErrorAction.REPORT); - encoder.onUnmappableCharacter(CodingErrorAction.REPORT); - if (in != null) { - try { - // regression test for Harmony-1379 - encoder.encode(in); - fail("should throw MalformedInputException"); - } catch (MalformedInputException e) { - } - - encoder.reset(); - in.rewind(); - encoder.onMalformedInput(CodingErrorAction.IGNORE); - out = encoder.encode(in); - assertByteArray(out, addSurrogate(unibytes)); - - encoder.reset(); - in.rewind(); - encoder.onMalformedInput(CodingErrorAction.REPLACE); - out = encoder.encode(in); - assertByteArray(out, addSurrogate(unibytesWithRep)); - } - - // Unmapped Exception: - in = getUnmapCharBuffer(); - encoder.onMalformedInput(CodingErrorAction.REPORT); - encoder.onUnmappableCharacter(CodingErrorAction.REPORT); - if (in != null) { - encoder.reset(); - try { - encoder.encode(in); - fail("should throw UnmappableCharacterException"); - } catch (UnmappableCharacterException e) { - } - - encoder.reset(); - in.rewind(); - encoder.onUnmappableCharacter(CodingErrorAction.IGNORE); - out = encoder.encode(in); - assertByteArray(out, unibytes); - - encoder.reset(); - in.rewind(); - encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); - out = encoder.encode(in); - assertByteArray(out, unibytesWithRep); - } - - // RuntimeException - try { - encoder.encode(getExceptionCharBuffer()); - fail("should throw runtime exception"); - } catch (RuntimeException e) { - } - } - - /* - * utility method, extract given bytebuffer to a string and compare with - * give string - */ - void assertByteArray(ByteBuffer out, byte[] expected) { - out = out.duplicate(); - if (out.position() != 0) { - out.flip(); - } - byte[] ba = new byte[out.limit() - out.position()]; - out.get(ba); - // byte[] ba = out.array(); - assertTrue(Arrays.equals(ba, expected)); - } - - /* - * Class under test for CoderResult encode(CharBuffer, ByteBuffer, boolean) - */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ) - }) - public void testEncodeCharBufferByteBufferboolean() - throws CharacterCodingException { - ByteBuffer out = ByteBuffer.allocate(200); - CharBuffer in = CharBuffer.wrap(unistr); - // Null pointer - try { - encoder.encode(null, out, true); - fail("should throw null pointer exception"); - } catch (NullPointerException e) { - } - try { - encoder.encode(in, null, true); - fail("should throw null pointer exception"); - } catch (NullPointerException e) { - } - - // normal case, one complete operation - assertSame(encoder, encoder.reset()); - in.rewind(); - out.rewind(); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); - assertEquals(out.limit(), 200); - assertTrue(out.position() > 0); - assertTrue(out.remaining() > 0); - assertEquals(out.capacity(), 200); - assertByteArray(out, addSurrogate(unibytes)); - in.rewind(); - - encoder.flush(out); - - // normal case, one complete operation, but call twice, first time set - // endOfInput to false - assertSame(encoder, encoder.reset()); - in.rewind(); - out = ByteBuffer.allocate(200); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, false)); - assertEquals(out.limit(), 200); - assertTrue(out.position() > 0); - assertTrue(out.remaining() > 0); - assertEquals(out.capacity(), 200); - assertByteArray(out, addSurrogate(unibytes)); - - in.rewind(); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, false)); - in.rewind(); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); - assertEquals(out.limit(), 200); - assertTrue(out.position() > 0); - assertTrue(out.remaining() > 0); - assertEquals(out.capacity(), 200); - - assertByteArray(out, addSurrogate(duplicateByteArray(unibytes, 3))); - - // overflow - out = ByteBuffer.allocate(4); - assertSame(encoder, encoder.reset()); - in.rewind(); - out.rewind(); - assertSame(CoderResult.OVERFLOW, encoder.encode(in, out, true)); - assertEquals(out.limit(), 4); - assertEquals(out.position(), 4); - assertEquals(out.remaining(), 0); - assertEquals(out.capacity(), 4); - ByteBuffer temp = ByteBuffer.allocate(200); - out.flip(); - temp.put(out); - out = temp; - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); - assertEquals(out.limit(), 200); - assertTrue(out.position() > 0); - assertTrue(out.remaining() > 0); - assertEquals(out.capacity(), 200); - assertByteArray(out, addSurrogate(unibytes)); - - assertSame(encoder, encoder.reset()); - in.rewind(); - out = ByteBuffer.allocate(4); - assertSame(CoderResult.OVERFLOW, encoder.encode(in, out, false)); - assertEquals(out.limit(), 4); - assertEquals(out.position(), 4); - assertEquals(out.remaining(), 0); - assertEquals(out.capacity(), 4); - temp = ByteBuffer.allocate(200); - out.flip(); - temp.put(out); - out = temp; - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, false)); - assertEquals(out.limit(), 200); - assertTrue(out.position() > 0); - assertTrue(out.remaining() > 0); - assertEquals(out.capacity(), 200); - assertByteArray(out, addSurrogate(unibytes)); - } - - void printByteBuffer(ByteBuffer buffer) { - System.out.println("print buffer"); - if (buffer.position() != 0) { - buffer.flip(); - } - byte[] ba = buffer.array(); - for (int i = 0; i < ba.length; i++) { - System.out.println(Integer.toHexString(ba[i])); - } - } - - @TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ) - }) - public void testEncodeCharBufferByteBufferbooleanExceptionFalse() - throws CharacterCodingException { - implTestEncodeCharBufferByteBufferbooleanException(false); - } - - @TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ) - }) - public void testEncodeCharBufferByteBufferbooleanExceptionTrue() - throws CharacterCodingException { - implTestEncodeCharBufferByteBufferbooleanException(true); - } - - private byte[] duplicateByteArray(byte[] ba, int times) { - byte[] result = new byte[ba.length * times]; - for (int i = 0; i < times; i++) { - System.arraycopy(ba, 0, result, i * ba.length, ba.length); - } - return result; - } - - protected void implTestEncodeCharBufferByteBufferbooleanException( - boolean endOfInput) throws CharacterCodingException { - ByteBuffer out = ByteBuffer.allocate(100); - - // MalformedException: - CharBuffer in = getMalformedCharBuffer(); - encoder.onMalformedInput(CodingErrorAction.REPORT); - encoder.onUnmappableCharacter(CodingErrorAction.REPORT); - if (in != null) { - encoder.reset(); - CoderResult r = encoder.encode(in, out, endOfInput); - assertTrue(r.isMalformed()); - - encoder.reset(); - out.clear(); - in.rewind(); - encoder.onMalformedInput(CodingErrorAction.IGNORE); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, - endOfInput)); - assertCodingErrorAction(endOfInput, out, in, unibytes); - - encoder.reset(); - out.clear(); - in.rewind(); - encoder.onMalformedInput(CodingErrorAction.REPLACE); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, - endOfInput)); - assertCodingErrorAction(endOfInput, out, in, unibytesWithRep); - } else { - // System.out.println("Cannot find malformed char buffer for " - // + cs.name()); - } - - // Unmapped Exception: - in = getUnmapCharBuffer(); - encoder.onMalformedInput(CodingErrorAction.REPORT); - encoder.onUnmappableCharacter(CodingErrorAction.REPORT); - if (in != null) { - encoder.reset(); - out.clear(); - assertTrue(encoder.encode(in, out, endOfInput).isUnmappable()); - - encoder.reset(); - out.clear(); - in.rewind(); - encoder.onUnmappableCharacter(CodingErrorAction.IGNORE); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, - endOfInput)); - assertCodingErrorAction(endOfInput, out, in, unibytes); - - encoder.reset(); - out.clear(); - in.rewind(); - encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, - endOfInput)); - assertCodingErrorAction(endOfInput, out, in, unibytesWithRep); - } else { - // System.out.println("Cannot find unmapped char buffer for " - // + cs.name()); - } - - // RuntimeException - try { - encoder.encode(getExceptionCharBuffer()); - fail("should throw runtime exception"); - } catch (RuntimeException e) { - } - } - - private void assertCodingErrorAction(boolean endOfInput, ByteBuffer out, - CharBuffer in, byte[] expect) { - if (endOfInput) { - assertByteArray(out, addSurrogate(expect)); - } else { - in.rewind(); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, - endOfInput)); - in.rewind(); - assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); - assertByteArray(out, addSurrogate(duplicateByteArray(expect, 3))); - } - } - - /* - * Class under test for CoderResult flush(ByteBuffer) - */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class, java.nio.ByteBuffer.class, boolean.class} - ) - }) - public void testFlush() throws CharacterCodingException { - ByteBuffer out = ByteBuffer.allocate(6); - CharBuffer in = CharBuffer.wrap("aaa"); - assertEquals(in.remaining(), 3); - - // by encode facade, so that internal state will be wrong - encoder.encode(CharBuffer.wrap("testFlush"), ByteBuffer.allocate(20), - true); - assertSame(CoderResult.UNDERFLOW, encoder - .flush(ByteBuffer.allocate(50))); - } - - /* - * test isLegalReplacement(byte[]) - */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "isLegalReplacement", - methodArgs = {byte[].class} - ) - }) - public void testIsLegalReplacement() { - try { - encoder.isLegalReplacement(null); - fail("should throw null pointer exception"); - } catch (NullPointerException e) { - } - assertTrue(encoder.isLegalReplacement(specifiedReplacement)); - - assertTrue(encoder.isLegalReplacement(new byte[200])); - byte[] ba = getIllegalByteArray(); - if (ba != null) { - assertFalse(encoder.isLegalReplacement(ba)); - } - } - -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "isLegalReplacement", - methodArgs = {byte[].class} - ) - }) - public void testIsLegalReplacementEmptyArray() { - // ISO, ASC, GB, UTF8 encoder will throw exception in RI - // others will pass - // try { - assertTrue(encoder.isLegalReplacement(new byte[0])); - // fail("should throw ArrayIndexOutOfBoundsException"); - // } catch (ArrayIndexOutOfBoundsException e) { - // } - } - -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "onMalformedInput", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ), @TestTarget( - methodName = "malformedInputAction", - methodArgs = {} - ) - }) - public void testOnMalformedInput() { - assertSame(CodingErrorAction.REPORT, encoder.malformedInputAction()); - try { - encoder.onMalformedInput(null); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { - } - encoder.onMalformedInput(CodingErrorAction.IGNORE); - assertSame(CodingErrorAction.IGNORE, encoder.malformedInputAction()); - } - -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "onUnmappableCharacter", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ), @TestTarget( - methodName = "unmappableCharacterAction", - methodArgs = {} - ) - }) - public void testOnUnmappableCharacter() { - assertSame(CodingErrorAction.REPORT, encoder - .unmappableCharacterAction()); - try { - encoder.onUnmappableCharacter(null); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { + boolean enCodeLoopCalled = false; + + @TestTargetNew( + level = TestLevel.SUFFICIENT, + notes = "", + method = "encodeLoop", + args = { CharBuffer.class, ByteBuffer.class} + ) + public void testEncodeLoop() throws Exception { + try { + encoder = new MockCharsetEncoder(Charset.forName("US-ASCII"), 1, + MAX_BYTES) { + @Override + protected CoderResult encodeLoop(CharBuffer arg0, + ByteBuffer arg1) { + enCodeLoopCalled = true; + return super.encodeLoop(arg0, arg1); + } + }; + encoder.encode(CharBuffer.wrap("hallo")); + } catch (UnsupportedCharsetException e) { + fail("us-ascii not supported"); } - encoder.onUnmappableCharacter(CodingErrorAction.IGNORE); - assertSame(CodingErrorAction.IGNORE, encoder - .unmappableCharacterAction()); + assertTrue(enCodeLoopCalled); } + + + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "implReplaceWith", + args = { byte[].class} + ) + public void testImplReplaceWith() { + encoder = new MockCharsetEncoder(cs, 1, 3); + ((MockCharsetEncoder) encoder).pubImplReplaceWith(null); + } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "replaceWith", - methodArgs = {byte[].class} - ), @TestTarget( - methodName = "replacement", - methodArgs = {} - ) - }) - public void testReplacement() { - try { - encoder.replaceWith(null); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { - } - try { - encoder.replaceWith(new byte[0]); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { - } - try { - encoder.replaceWith(new byte[100]); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { - } - - byte[] nr = getLegalByteArray(); - assertSame(encoder, encoder.replaceWith(nr)); - assertSame(nr, encoder.replacement()); - - nr = getIllegalByteArray(); - try { - encoder.replaceWith(new byte[100]); - fail("should throw null pointer exception"); - } catch (IllegalArgumentException e) { - } - } + protected byte[] getLegalByteArray() { return new byte[] { 'a' }; } @@ -1413,6 +549,22 @@ public class CharsetEncoderTest extends TestCase { protected void implReplaceWith(byte[] ba) { assertSame(ba, replacement()); } + + public void pubImplReplaceWith(byte[] newReplacement) { + super.implReplaceWith(newReplacement); + } + + public CoderResult pubImplFlush(ByteBuffer out) { + return super.implFlush(out); + } + + public void pubImplOnUnmappableCharacter(CodingErrorAction newAction) { + super.implOnUnmappableCharacter(newAction); + } + + public void pubImplReset() { + super.implReset(); + } } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java index e6b69bc..a0db954 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java @@ -15,24 +15,30 @@ */ package tests.api.java.nio.charset; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; +import dalvik.annotation.TestTargets; + +import junit.framework.TestCase; + +import tests.api.java.nio.charset.CharsetTest.MockCharset; +import tests.api.java.nio.charset.CharsetTest.MockSecurityManager; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; import java.nio.charset.Charset; import java.nio.charset.UnsupportedCharsetException; import java.nio.charset.spi.CharsetProvider; import java.util.Iterator; +import java.util.SortedMap; import java.util.Vector; -import junit.framework.TestCase; -import tests.api.java.nio.charset.CharsetTest.MockCharset; -import tests.api.java.nio.charset.CharsetTest.MockSecurityManager; - @TestTargetClass(CharsetProvider.class) /** * Test charset providers managed by Charset. @@ -51,22 +57,44 @@ public class CharsetProviderTest extends TestCase { static MockCharset charset2 = new MockCharset("mockCharset10", new String[] { "mockCharset11", "mockCharset12" }); - /** - * @param arg0 - */ - public CharsetProviderTest(String arg0) { - super(arg0); - CONFIG_FILE1 = System.getProperty("java.io.tmpdir")+"/bin/test"; + @Override + protected void setUp() { + String tmpDir = System.getProperty("java.io.tmpdir"); + if (tmpDir == null) { + fail("java.io.tmpdir not set"); + } + + File tmpdir = new File(tmpDir); + if (!tmpdir.isDirectory()) { + fail("java.io.tmpdir is not a directory"); + } String sep = System.getProperty("file.separator"); - if (!CONFIG_FILE1.endsWith(sep)) { - CONFIG_FILE1 += sep; + if (!tmpDir.endsWith(sep)) { + tmpDir += sep; } - CONFIG_FILE1 += "META-INF" + sep + "services" + sep + + CONFIG_FILE1 = tmpDir + "META-INF" + sep + "services" + sep + "java.nio.charset.spi.CharsetProvider"; + + URL url = null; + try { + url = new URL("file://" + tmpDir); + } catch (MalformedURLException e) { + fail("unexpected exception: " + e); + } + URLClassLoader urlc = new URLClassLoader(new URL[] { url }); + + Thread.currentThread().setContextClassLoader(urlc); } - + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + Thread.currentThread().setContextClassLoader(null); + } + /* * Write the string to the config file. */ @@ -97,7 +125,14 @@ public class CharsetProviderTest extends TestCase { * Test the method isSupported(String) with charset supported by some * providers (multiple). */ - public void _testIsSupported_And_ForName_NormalProvider() throws Exception { + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsetForName", + args = {String.class} + ) + @KnownFailure("Fixed in ToT") + public void testIsSupported_And_ForName_NormalProvider() throws Exception { try { assertFalse(Charset.isSupported("mockCharset10")); assertFalse(Charset.isSupported("mockCharset11")); @@ -125,20 +160,20 @@ public class CharsetProviderTest extends TestCase { sb.append("#comment\r"); sb.append("\n"); sb.append("\r\n"); - sb - .append(" \ttests.api.java.nio.charset.CharsetTest$MockCharsetProvider \t\n\r"); - sb - .append(" \ttests.api.java.nio.charset.CharsetTest$MockCharsetProvider \t"); + sb.append(" \ttests.api.java.nio.charset." + + "CharsetTest$MockCharsetProvider \t\n\r"); + sb.append(" \ttests.api.java.nio.charset." + + "CharsetTest$MockCharsetProvider \t"); setupFile(CONFIG_FILE1, sb.toString()); sb = new StringBuffer(); sb.append(" #comment\r"); sb.append("\n"); sb.append("\r\n"); - sb - .append(" \ttests.api.java.nio.charset.CharsetProviderTest$MockCharsetProvider \t\n\r"); + sb.append(" \ttests.api.java.nio.charset." + + "CharsetProviderTest$MockCharsetProvider \t\n\r"); setupFile(CONFIG_FILE1, sb.toString()); - + assertTrue(Charset.isSupported("mockCharset10")); // ignore case problem in mock, intended assertTrue(Charset.isSupported("MockCharset11")); @@ -147,7 +182,7 @@ public class CharsetProviderTest extends TestCase { // intended case problem in mock assertTrue(Charset.isSupported("MOCKCharset11")); assertTrue(Charset.isSupported("MOCKCharset12")); - + assertTrue(Charset.forName("mockCharset10") instanceof MockCharset); assertTrue(Charset.forName("mockCharset11") instanceof MockCharset); assertTrue(Charset.forName("mockCharset12") instanceof MockCharset); @@ -165,15 +200,12 @@ public class CharsetProviderTest extends TestCase { * Test the method isSupported(String) when the configuration file contains * a non-existing class name. */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Test for Charset.isSupported", - targets = { - @TestTarget( - methodName = "charsets", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsetForName", + args = {String.class} + ) public void testIsSupported_NonExistingClass() throws Exception { try { StringBuffer sb = new StringBuffer(); @@ -193,7 +225,14 @@ public class CharsetProviderTest extends TestCase { * Test the method isSupported(String) when the configuration file contains * a non-CharsetProvider class name. */ - public void _testIsSupported_NotCharsetProviderClass() throws Exception { + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsetForName", + args = {String.class} + ) + @KnownFailure("Fixed in ToT") + public void testIsSupported_NotCharsetProviderClass() throws Exception { try { StringBuffer sb = new StringBuffer(); sb.append("java.lang.String\r"); @@ -212,7 +251,13 @@ public class CharsetProviderTest extends TestCase { * Test the method isSupported(String) with insufficient privilege to use * charset provider. */ - public void _testIsSupported_InsufficientPrivilege() throws Exception { + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsetForName", + args = {String.class} + ) + public void testIsSupported_InsufficientPrivilege() throws Exception { SecurityManager oldMan = System.getSecurityManager(); System.setSecurityManager(new MockSecurityManager()); try { @@ -220,14 +265,13 @@ public class CharsetProviderTest extends TestCase { try { StringBuffer sb = new StringBuffer(); - sb - .append("tests.api.java.nio.charset.CharsetProviderTest$MockCharsetProvider\r"); + sb.append("tests.api.java.nio.charset." + + "CharsetProviderTest$MockCharsetProvider\r"); setupFile(CONFIG_FILE1, sb.toString()); - Charset.isSupported("gb180300000"); - fail("Should throw SecurityException!"); + assertFalse(Charset.isSupported("gb180300000")); } catch (SecurityException e) { - // expected + fail("unexpected SecurityException!:" + e); } finally { cleanupFile(CONFIG_FILE1); } @@ -235,29 +279,71 @@ public class CharsetProviderTest extends TestCase { System.setSecurityManager(oldMan); } } + + /* + * Test the method isSupported(String) with insufficient privilege to use + * charset provider. + */ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsetForName", + args = {String.class} + ) + public void testForName_InsufficientPrivilege() throws Exception { + SecurityManager oldMan = System.getSecurityManager(); + System.setSecurityManager(new MockSecurityManager()); + try { + Charset.forName("UTF-8"); + + try { + StringBuffer sb = new StringBuffer(); + sb.append("tests.api.java.nio.charset." + + "CharsetProviderTest$MockCharsetProvider\r"); + setupFile(CONFIG_FILE1, sb.toString()); + + Charset.forName("gb180300000"); + fail("expected UnsupportedCharsetException!"); + } catch (SecurityException e) { + fail("unexpected SecurityException!:" + e); + } catch (UnsupportedCharsetException e) { + // ok + } finally { + cleanupFile(CONFIG_FILE1); + } + } finally { + System.setSecurityManager(oldMan); + } + } /* * Test the method forName(String) when the charset provider supports a * built-in charset. */ - @TestInfo( - level = TestLevel.PARTIAL, - purpose = "Test for Charset.isSupported", - targets = { - @TestTarget( - methodName = "charsets", - methodArgs = {} - ) - }) + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsets", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsetForName", + args = {String.class} + ) + }) public void testForName_DuplicateWithBuiltInCharset() throws Exception { try { StringBuffer sb = new StringBuffer(); - sb - .append("tests.api.java.nio.charset.CharsetProviderTest$MockCharsetProviderACSII\r"); + sb.append("tests.api.java.nio.charset." + + "CharsetProviderTest$MockCharsetProviderACSII\r"); setupFile(CONFIG_FILE1, sb.toString()); assertFalse(Charset.forName("us-ascii") instanceof MockCharset); - assertFalse(Charset.availableCharsets().get("us-ascii") instanceof MockCharset); + Charset charset = Charset.availableCharsets().get("us-ascii"); + assertFalse(charset instanceof MockCharset); } finally { cleanupFile(CONFIG_FILE1); } @@ -267,7 +353,14 @@ public class CharsetProviderTest extends TestCase { * Test the method forName(String) when the configuration file contains a * non-existing class name. */ - public void _testForName_NonExistingClass() throws Exception { + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsetForName", + args = {String.class} + ) + @KnownFailure("Fixed in ToT") + public void testForName_NonExistingClass() throws Exception { try { StringBuffer sb = new StringBuffer(); sb.append("impossible\r"); @@ -286,7 +379,14 @@ public class CharsetProviderTest extends TestCase { * Test the method forName(String) when the configuration file contains a * non-CharsetProvider class name. */ - public void _testForName_NotCharsetProviderClass() throws Exception { + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsetForName", + args = {String.class} + ) + @KnownFailure("Fixed in ToT") + public void testForName_NotCharsetProviderClass() throws Exception { try { StringBuffer sb = new StringBuffer(); sb.append("java.lang.String\r"); @@ -305,7 +405,14 @@ public class CharsetProviderTest extends TestCase { * Test the method availableCharsets() with charset supported by some * providers (multiple). */ - public void _testAvailableCharsets_NormalProvider() throws Exception { + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsets", + args = {} + ) + @KnownFailure("Fixed in ToT") + public void testAvailableCharsets_NormalProvider() throws Exception { try { assertFalse(Charset.availableCharsets() .containsKey("mockCharset10")); @@ -318,43 +425,47 @@ public class CharsetProviderTest extends TestCase { sb.append("#comment\r"); sb.append("\n"); sb.append("\r\n"); - sb - .append(" \ttests.api.java.nio.charset.CharsetTest$MockCharsetProvider \t\n\r"); - sb - .append(" \ttests.api.java.nio.charset.CharsetTest$MockCharsetProvider \t"); - setupFile(CONFIG_FILE1, sb.toString()); - - sb = new StringBuffer(); + sb.append("\ttests.api.java.nio.charset." + + "CharsetTest$MockCharsetProvider \t\n\r"); + sb.append("\ttests.api.java.nio.charset." + + "CharsetTest$MockCharsetProvider \t"); sb.append("#comment\r"); sb.append("\n"); sb.append("\r\n"); - sb - .append(" \ttests.api.java.nio.charset.CharsetProviderTest$MockCharsetProvider \t\n\r"); + sb.append(" \ttests.api.java.nio.charset." + + "CharsetProviderTest$MockCharsetProvider \t\n\r"); setupFile(CONFIG_FILE1, sb.toString()); - assertTrue(Charset.availableCharsets().containsKey("mockCharset00")); - assertTrue(Charset.availableCharsets().containsKey("MOCKCharset00")); - assertTrue(Charset.availableCharsets().get("mockCharset00") instanceof MockCharset); - assertTrue(Charset.availableCharsets().get("MOCKCharset00") instanceof MockCharset); - assertFalse(Charset.availableCharsets() - .containsKey("mockCharset01")); - assertFalse(Charset.availableCharsets() - .containsKey("mockCharset02")); + SortedMap<String, Charset> availableCharsets = Charset + .availableCharsets(); + assertTrue(availableCharsets.containsKey("mockCharset00")); + assertTrue(availableCharsets.containsKey("MOCKCharset00")); + Charset charset = availableCharsets.get("mockCharset00"); + assertTrue(charset instanceof MockCharset); - assertTrue(Charset.availableCharsets().get("mockCharset10") == charset2); - assertTrue(Charset.availableCharsets().get("MOCKCharset10") == charset2); - assertFalse(Charset.availableCharsets() - .containsKey("mockCharset11")); - assertFalse(Charset.availableCharsets() - .containsKey("mockCharset12")); + charset = availableCharsets.get("MOCKCharset00"); + assertTrue(charset instanceof MockCharset); - assertTrue(Charset.availableCharsets().containsKey("mockCharset10")); - assertTrue(Charset.availableCharsets().containsKey("MOCKCharset10")); - assertTrue(Charset.availableCharsets().get("mockCharset10") == charset2); - assertFalse(Charset.availableCharsets() - .containsKey("mockCharset11")); - assertFalse(Charset.availableCharsets() - .containsKey("mockCharset12")); + assertFalse(availableCharsets.containsKey("mockCharset01")); + assertFalse(availableCharsets.containsKey("mockCharset02")); + + charset = availableCharsets.get("mockCharset10"); + assertTrue(charset == charset2); + + charset = availableCharsets.get("MOCKCharset10"); + assertTrue(charset == charset2); + + assertFalse(availableCharsets.containsKey("mockCharset11")); + assertFalse(availableCharsets.containsKey("mockCharset12")); + + assertTrue(availableCharsets.containsKey("mockCharset10")); + assertTrue(availableCharsets.containsKey("MOCKCharset10")); + + charset = availableCharsets.get("mockCharset10"); + assertTrue(charset == charset2); + + assertFalse(availableCharsets.containsKey("mockCharset11")); + assertFalse(availableCharsets.containsKey("mockCharset12")); } finally { cleanupFile(CONFIG_FILE1); } @@ -364,15 +475,12 @@ public class CharsetProviderTest extends TestCase { * Test the method availableCharsets(String) when the configuration file * contains a non-existing class name. */ - @TestInfo( - level = TestLevel.PARTIAL, - purpose = "Test for Charset.isSupported", - targets = { - @TestTarget( - methodName = "charsets", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsets", + args = {} + ) public void testAvailableCharsets_NonExistingClass() throws Exception { try { StringBuffer sb = new StringBuffer(); @@ -392,7 +500,14 @@ public class CharsetProviderTest extends TestCase { * Test the method availableCharsets(String) when the configuration file * contains a non-CharsetProvider class name. */ - public void _testAvailableCharsets_NotCharsetProviderClass() + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsets", + args = {} + ) + @KnownFailure("Fixed in ToT") + public void testAvailableCharsets_NotCharsetProviderClass() throws Exception { try { StringBuffer sb = new StringBuffer(); @@ -412,15 +527,12 @@ public class CharsetProviderTest extends TestCase { * Test the method availableCharsets(String) when the configuration file * contains an illegal string. */ - @TestInfo( - level = TestLevel.PARTIAL, - purpose = "Test for Charset.isSupported", - targets = { - @TestTarget( - methodName = "charsets", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "charsets", + args = {} + ) public void testAvailableCharsets_IllegalString() throws Exception { try { StringBuffer sb = new StringBuffer(); @@ -450,8 +562,8 @@ public class CharsetProviderTest extends TestCase { return null; } - public Iterator charsets() { - Vector v = new Vector(); + public Iterator<Charset> charsets() { + Vector<Charset> v = new Vector<Charset>(); v.add(charset2); return v.iterator(); } @@ -470,8 +582,8 @@ public class CharsetProviderTest extends TestCase { return null; } - public Iterator charsets() { - Vector v = new Vector(); + public Iterator<Charset> charsets() { + Vector<Charset> v = new Vector<Charset>(); v.add(new MockCharset("US-ASCII", new String[] { "ASCII" })); return v.iterator(); } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java index 22d2f8b..21392af 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.ByteBuffer; @@ -67,19 +67,24 @@ public class CharsetTest extends TestCase { /* * Test the required 6 charsets are supported. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "Test is OK for availableCharsets. For forName & isSupported only functionality tested.", - targets = { - @TestTarget( - methodName = "isSupported", - methodArgs = {java.lang.String.class} - ), @TestTarget( - methodName = "forName", - methodArgs = {java.lang.String.class} - ), @TestTarget( - methodName = "availableCharsets", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Test is OK for availableCharsets. For forName & isSupported only functionality tested.", + method = "isSupported", + args = {java.lang.String.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Test is OK for availableCharsets. For forName & isSupported only functionality tested.", + method = "forName", + args = {java.lang.String.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Test is OK for availableCharsets. For forName & isSupported only functionality tested.", + method = "availableCharsets", + args = {} ) }) public void testRequiredCharsetSupported() { @@ -115,19 +120,54 @@ public class CharsetTest extends TestCase { assertTrue(Charset.availableCharsets().containsKey("UTF-16BE")); assertTrue(Charset.availableCharsets().containsKey("UTF-16LE")); } + + + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "contains", + args = { Charset.class } + ) + public void testContains() { + assertTrue(Charset.forName("US-ASCII").contains(Charset.forName("US-ASCII"))); + assertFalse(Charset.forName("US-ASCII").contains(Charset.forName("UTF-16"))); + + assertTrue(Charset.forName("ISO-8859-1").contains(Charset.forName("ISO-8859-1"))); + assertTrue(Charset.forName("ISO-8859-1").contains(Charset.forName("US-ASCII"))); + assertFalse(Charset.forName("ISO-8859-1").contains(Charset.forName("UTF-8"))); + + assertTrue(Charset.forName("UTF-16").contains(Charset.forName("UTF-16"))); + assertTrue(Charset.forName("UTF-16").contains(Charset.forName("UTF-16LE"))); + assertTrue(Charset.forName("UTF-16").contains(Charset.forName("UTF-16BE"))); + assertTrue(Charset.forName("UTF-16").contains(Charset.forName("UTF-8"))); + + assertTrue(Charset.forName("UTF-16LE").contains(Charset.forName("UTF-16LE"))); + assertTrue(Charset.forName("UTF-16LE").contains(Charset.forName("UTF-16BE"))); + assertTrue(Charset.forName("UTF-16LE").contains(Charset.forName("UTF-16"))); + assertTrue(Charset.forName("UTF-16LE").contains(Charset.forName("UTF-8"))); + + assertTrue(Charset.forName("UTF-16BE").contains(Charset.forName("UTF-16BE"))); + assertTrue(Charset.forName("UTF-16BE").contains(Charset.forName("UTF-16LE"))); + assertTrue(Charset.forName("UTF-16BE").contains(Charset.forName("UTF-16"))); + assertTrue(Charset.forName("UTF-16BE").contains(Charset.forName("UTF-8"))); + + assertTrue(Charset.forName("UTF-8").contains(Charset.forName("UTF-8"))); + assertTrue(Charset.forName("UTF-8").contains(Charset.forName("US-ASCII"))); + assertTrue(Charset.forName("UTF-8").contains(Charset.forName("ISO-8859-1"))); + assertTrue(Charset.forName("UTF-8").contains(Charset.forName("UTF-16"))); + assertTrue(Charset.forName("UTF-8").contains(Charset.forName("UTF-16BE"))); + assertTrue(Charset.forName("UTF-8").contains(Charset.forName("UTF-16LE"))); + } /* * Test the method isSupported(String) with null. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "IllegalArgumentException checked.", - targets = { - @TestTarget( - methodName = "isSupported", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "IllegalArgumentException checked.", + method = "isSupported", + args = {java.lang.String.class} + ) public void testIsSupported_Null() { try { Charset.isSupported(null); @@ -141,15 +181,12 @@ public class CharsetTest extends TestCase { * Test the method isSupported(String) with empty string. * */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "check test on target vm and fix, now it is dummy", - targets = { - @TestTarget( - methodName = "isSupported", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "check test on target vm and fix, now it is dummy", + method = "isSupported", + args = {java.lang.String.class} + ) public void testIsSupported_EmptyString() { try { Charset.isSupported(""); @@ -163,15 +200,12 @@ public class CharsetTest extends TestCase { * Test the method isSupported(String) with a string starting with ".". * */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "isSupported", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "isSupported", + args = {java.lang.String.class} + ) public void testIsSupported_InvalidInitialCharacter() { try { Charset.isSupported(".char"); @@ -183,15 +217,12 @@ public class CharsetTest extends TestCase { /* * Test the method isSupported(String) with illegal charset name. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "IllegalArgumentException checked.", - targets = { - @TestTarget( - methodName = "isSupported", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "IllegalArgumentException checked.", + method = "isSupported", + args = {java.lang.String.class} + ) public void testIsSupported_IllegalName() { try { Charset.isSupported(" ///#$$"); @@ -204,15 +235,12 @@ public class CharsetTest extends TestCase { /* * Test the method isSupported(String) with not supported charset name. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "isSupported", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "isSupported", + args = {java.lang.String.class} + ) public void testIsSupported_NotSupported() { assertFalse(Charset.isSupported("impossible")); } @@ -220,15 +248,12 @@ public class CharsetTest extends TestCase { /* * Test the method forName(String) with null. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "forName", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "forName", + args = {java.lang.String.class} + ) public void testForName_Null() { try { Charset.forName(null); @@ -241,15 +266,12 @@ public class CharsetTest extends TestCase { /* * Test the method forName(String) with empty string. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "forName", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "forName", + args = {java.lang.String.class} + ) public void testForName_EmptyString() { try { Charset.forName(""); @@ -262,15 +284,12 @@ public class CharsetTest extends TestCase { /* * Test the method forName(String) with a string starting with ".". */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "forName", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "forName", + args = {java.lang.String.class} + ) public void testForName_InvalidInitialCharacter() { try { Charset.forName(".char"); @@ -283,15 +302,12 @@ public class CharsetTest extends TestCase { /* * Test the method forName(String) with illegal charset name. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "forName", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "forName", + args = {java.lang.String.class} + ) public void testForName_IllegalName() { try { Charset.forName(" ///#$$"); @@ -304,15 +320,12 @@ public class CharsetTest extends TestCase { /* * Test the method forName(String) with not supported charset name. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "forName", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "forName", + args = {java.lang.String.class} + ) public void testForName_NotSupported() { try { Charset.forName("impossible"); @@ -325,22 +338,30 @@ public class CharsetTest extends TestCase { /* * Test the constructor with normal parameter values. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "name", - methodArgs = {} - ), @TestTarget( - methodName = "displayName", - methodArgs = {} - ), @TestTarget( - methodName = "aliases", - methodArgs = {} - ), @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "name", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "displayName", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "aliases", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} ) }) public void testConstructor_Normal() { @@ -357,15 +378,12 @@ public class CharsetTest extends TestCase { * Test the constructor with empty canonical name. * */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "check test on target vm and fix, now it is dummy", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "check test on target vm and fix, now it is dummy", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ) public void testConstructor_EmptyCanonicalName() { try { new MockCharset("", new String[0]); @@ -380,15 +398,12 @@ public class CharsetTest extends TestCase { * digit nor a letter. * */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ) public void testConstructor_IllegalCanonicalName_Initial() { try { new MockCharset("-123", new String[] { "mock" }); @@ -401,15 +416,12 @@ public class CharsetTest extends TestCase { * Test the constructor with illegal canonical name, illegal character in * the middle. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ) public void testConstructor_IllegalCanonicalName_Middle() { try { new MockCharset("1%%23", new String[] { "mock" }); @@ -428,15 +440,12 @@ public class CharsetTest extends TestCase { /* * Test the constructor with null canonical name. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ) public void testConstructor_NullCanonicalName() { try { MockCharset c = new MockCharset(null, new String[] { "mock" }); @@ -449,27 +458,38 @@ public class CharsetTest extends TestCase { /* * Test the constructor with null aliases. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ), @TestTarget( - methodName = "name", - methodArgs = {} - ), @TestTarget( - methodName = "displayName", - methodArgs = {} - ), @TestTarget( - methodName = "displayName", - methodArgs = {java.util.Locale.class} - ), @TestTarget( - methodName = "aliases", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "name", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "displayName", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "displayName", + args = {java.util.Locale.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "aliases", + args = {} ) - }) + }) public void testConstructor_NullAliases() { MockCharset c = new MockCharset("mockChar", null); assertEquals("mockChar", c.name()); @@ -481,15 +501,12 @@ public class CharsetTest extends TestCase { /* * Test the constructor with a null aliases. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ) public void testConstructor_NullAliase() { try { new MockCharset("mockChar", new String[] { "mock", null }); @@ -502,27 +519,38 @@ public class CharsetTest extends TestCase { /* * Test the constructor with no aliases. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ), @TestTarget( - methodName = "name", - methodArgs = {} - ), @TestTarget( - methodName = "displayName", - methodArgs = {} - ), @TestTarget( - methodName = "displayName", - methodArgs = {java.util.Locale.class} - ), @TestTarget( - methodName = "aliases", - methodArgs = {} - ) - }) + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "name", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "displayName", + args = {} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "displayName", + args = {java.util.Locale.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "aliases", + args = {} + ) + }) public void testConstructor_NoAliases() { MockCharset c = new MockCharset("mockChar", new String[0]); assertEquals("mockChar", c.name()); @@ -535,15 +563,12 @@ public class CharsetTest extends TestCase { * Test the constructor with empty aliases. * */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ) public void testConstructor_EmptyAliases() { try { new MockCharset("mockChar", new String[] { "" }); @@ -558,15 +583,12 @@ public class CharsetTest extends TestCase { * nor a letter. * */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ) public void testConstructor_IllegalAliases_Initial() { try { new MockCharset("mockChar", new String[] { "mock", "-123" }); @@ -579,15 +601,12 @@ public class CharsetTest extends TestCase { * Test the constructor with illegal aliase, illegal character in the * middle. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "Charset", - methodArgs = {java.lang.String.class, java.lang.String[].class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "Charset", + args = {java.lang.String.class, java.lang.String[].class} + ) public void testConstructor_IllegalAliases_Middle() { try { new MockCharset("mockChar", new String[] { "mock", "22##ab" }); @@ -607,15 +626,12 @@ public class CharsetTest extends TestCase { * Test the method aliases() with multiple aliases. Most conditions have * been tested in the testcases for the constructors. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "aliases", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "aliases", + args = {} + ) public void testAliases_Multiple() { final String mockName = "mockChar1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.:-_"; MockCharset c = new MockCharset("mockChar", new String[] { "mock", @@ -638,15 +654,12 @@ public class CharsetTest extends TestCase { * Test the method aliases() with duplicate aliases, one same with its * canonical name. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "aliases", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "aliases", + args = {} + ) public void testAliases_Duplicate() { final String mockName = "mockChar1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.:-_"; MockCharset c = new MockCharset("mockChar", new String[] { "mockChar", @@ -662,15 +675,12 @@ public class CharsetTest extends TestCase { /* * Test the method canEncode(). Test the default return value. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "canEncode", + args = {} + ) public void testCanEncode() { MockCharset c = new MockCharset("mock", null); assertTrue(c.canEncode()); @@ -679,65 +689,26 @@ public class CharsetTest extends TestCase { /* * Test the method isRegistered(). Test the default return value. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isRegistered", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isRegistered", + args = {} + ) public void testIsRegistered() { MockCharset c = new MockCharset("mock", null); assertTrue(c.isRegistered()); } /* - * The name() method has been tested by the testcases for the constructor. - */ -@TestInfo( - level = TestLevel.TODO, - purpose = "Test is empty", - targets = { - @TestTarget( - methodName = "name", - methodArgs = {} - ) - }) - public void testName() { - // already covered by testConstructor_XXX series - } - - /* - * The displayName() method have been tested by the testcases for the - * constructor. - */ -@TestInfo( - level = TestLevel.TODO, - purpose = "Test is empty", - targets = { - @TestTarget( - methodName = "displayName", - methodArgs = {} - ) - }) - public void testDisplayName() { - // already covered by testConstructor_XXX series - } - - /* * Test displayName(Locale) with null. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "displayName", - methodArgs = {java.util.Locale.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "displayName", + args = {java.util.Locale.class} + ) public void testDisplayName_Locale_Null() { MockCharset c = new MockCharset("mock", null); assertEquals("mock", c.displayName(null)); @@ -746,15 +717,12 @@ public class CharsetTest extends TestCase { /* * Test the method compareTo(Object) with normal conditions. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "compareTo", - methodArgs = {java.nio.charset.Charset.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "compareTo", + args = {java.nio.charset.Charset.class} + ) public void testCompareTo_Normal() { MockCharset c1 = new MockCharset("mock", null); assertEquals(0, c1.compareTo(c1)); @@ -790,15 +758,12 @@ public class CharsetTest extends TestCase { /* * Test the method compareTo(Object) with null param. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "compareTo", - methodArgs = {java.lang.Object.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "compareTo", + args = {java.lang.Object.class} + ) public void testCompareTo_Null() { MockCharset c1 = new MockCharset("mock", null); try { @@ -812,15 +777,12 @@ public class CharsetTest extends TestCase { /* * Test the method compareTo(Object) with another kind of charset object. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "compareTo", - methodArgs = {java.nio.charset.Charset.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "compareTo", + args = {java.nio.charset.Charset.class} + ) public void testCompareTo_DiffCharsetClass() { MockCharset c1 = new MockCharset("mock", null); MockCharset2 c2 = new MockCharset2("Mock", new String[] { "myname" }); @@ -831,15 +793,12 @@ public class CharsetTest extends TestCase { /* * Test the method equals(Object) with null param. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "equals", - methodArgs = {java.lang.Object.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "equals", + args = {java.lang.Object.class} + ) public void testEquals_Normal() { MockCharset c1 = new MockCharset("mock", null); MockCharset2 c2 = new MockCharset2("mock", null); @@ -854,15 +813,12 @@ public class CharsetTest extends TestCase { /* * Test the method equals(Object) with normal conditions. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "equals", - methodArgs = {java.lang.Object.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "equals", + args = {java.lang.Object.class} + ) public void testEquals_Null() { MockCharset c1 = new MockCharset("mock", null); assertFalse(c1.equals(null)); @@ -871,15 +827,12 @@ public class CharsetTest extends TestCase { /* * Test the method equals(Object) with another kind of charset object. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "equals", - methodArgs = {java.lang.Object.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "equals", + args = {java.lang.Object.class} + ) public void testEquals_NonCharsetObject() { MockCharset c1 = new MockCharset("mock", null); assertFalse(c1.equals("test")); @@ -888,15 +841,12 @@ public class CharsetTest extends TestCase { /* * Test the method equals(Object) with another kind of charset object. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "equals", - methodArgs = {java.lang.Object.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "equals", + args = {java.lang.Object.class} + ) public void testEquals_DiffCharsetClass() { MockCharset c1 = new MockCharset("mock", null); MockCharset2 c2 = new MockCharset2("mock", null); @@ -907,15 +857,12 @@ public class CharsetTest extends TestCase { /* * Test the method hashCode(). */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "hashCode", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "hashCode", + args = {} + ) public void testHashCode_DiffCharsetClass() { MockCharset c1 = new MockCharset("mock", null); assertEquals(c1.hashCode(), "mock".hashCode()); @@ -929,15 +876,12 @@ public class CharsetTest extends TestCase { /* * Test the method encode(CharBuffer) under normal condition. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "encode", + args = {java.nio.CharBuffer.class} + ) public void testEncode_CharBuffer_Normal() throws Exception { MockCharset c1 = new MockCharset("testEncode_CharBuffer_Normal_mock", null); ByteBuffer bb = c1.encode(CharBuffer.wrap("abcdefg")); @@ -949,18 +893,14 @@ public class CharsetTest extends TestCase { /* * Test the method encode(CharBuffer) with an unmappable char. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ), @TestTarget( - methodName = "newEncoder", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "encode", + args = {java.nio.CharBuffer.class} ) - }) + }) public void testEncode_CharBuffer_Unmappable() throws Exception { Charset c1 = Charset.forName("iso8859-1"); ByteBuffer bb = c1.encode(CharBuffer.wrap("abcd\u5D14efg")); @@ -972,15 +912,12 @@ public class CharsetTest extends TestCase { /* * Test the method encode(CharBuffer) with null CharBuffer. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "encode", + args = {java.nio.CharBuffer.class} + ) public void testEncode_CharBuffer_NullCharBuffer() { MockCharset c = new MockCharset("mock", null); try { @@ -994,15 +931,12 @@ public class CharsetTest extends TestCase { /* * Test the method encode(CharBuffer) with null encoder. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "encode", + args = {java.nio.CharBuffer.class} + ) public void testEncode_CharBuffer_NullEncoder() { MockCharset2 c = new MockCharset2("mock2", null); try { @@ -1016,15 +950,12 @@ public class CharsetTest extends TestCase { /* * Test the method encode(String) under normal condition. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "encode", + args = {java.lang.String.class} + ) public void testEncode_String_Normal() throws Exception { MockCharset c1 = new MockCharset("testEncode_String_Normal_mock", null); ByteBuffer bb = c1.encode("abcdefg"); @@ -1036,18 +967,20 @@ public class CharsetTest extends TestCase { /* * Test the method encode(String) with an unmappable char. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ), @TestTarget( - methodName = "newEncoder", - methodArgs = {} - ) - }) + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "encode", + args = {java.lang.String.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "newEncoder", + args = {} + ) + }) public void testEncode_String_Unmappable() throws Exception { Charset c1 = Charset.forName("iso8859-1"); ByteBuffer bb = c1.encode("abcd\u5D14efg"); @@ -1059,15 +992,12 @@ public class CharsetTest extends TestCase { /* * Test the method encode(String) with null CharBuffer. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "encode", + args = {java.lang.String.class} + ) public void testEncode_String_NullString() { MockCharset c = new MockCharset("mock", null); try { @@ -1081,15 +1011,12 @@ public class CharsetTest extends TestCase { /* * Test the method encode(String) with null encoder. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.nio.CharBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "encode", + args = {java.lang.String.class} + ) public void testEncode_String_NullEncoder() { MockCharset2 c = new MockCharset2("mock2", null); @@ -1104,15 +1031,12 @@ public class CharsetTest extends TestCase { /* * Test the method decode(ByteBuffer) under normal condition. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void testDecode_Normal() throws Exception { MockCharset c1 = new MockCharset("mock", null); CharBuffer cb = c1.decode(ByteBuffer.wrap("abcdefg" @@ -1125,15 +1049,12 @@ public class CharsetTest extends TestCase { /* * Test the method decode(ByteBuffer) with a malformed input. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void testDecode_Malformed() throws Exception { Charset c1 = Charset.forName("iso8859-1"); CharBuffer cb = c1.decode(ByteBuffer.wrap("abcd\u5D14efg" @@ -1146,15 +1067,12 @@ public class CharsetTest extends TestCase { /* * Test the method decode(ByteBuffer) with null CharBuffer. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void testDecode_NullByteBuffer() { MockCharset c = new MockCharset("mock", null); try { @@ -1168,15 +1086,12 @@ public class CharsetTest extends TestCase { /* * Test the method decode(ByteBuffer) with null encoder. */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + notes = "", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void testDecode_NullDecoder() { MockCharset2 c = new MockCharset2("mock2", null); try { @@ -1190,70 +1105,16 @@ public class CharsetTest extends TestCase { /* * Test the method toString(). */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "toString", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "toString", + args = {} + ) public void testToString() { MockCharset c1 = new MockCharset("mock", null); assertTrue(-1 != c1.toString().indexOf("mock")); } - - /** - * @tests java.nio.charset.Charset#availableCharsets() - */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "availableCharsets", - methodArgs = {} - ) - }) - public void _test_availableCharsets() throws Exception { - // regression test for Harmony-1051 - ClassLoader originalClassLoader = Thread.currentThread() - .getContextClassLoader(); - try { - Thread.currentThread().setContextClassLoader(null); - SortedMap<String, Charset> charsets = Charset.availableCharsets(); - // make sure "mockCharset00" is loaded by MockCharsetProvider - assertTrue(charsets.containsKey("mockCharset00")); - } finally { - Thread.currentThread().setContextClassLoader(originalClassLoader); - } - } - - /** - * @tests java.nio.charset.Charset#availableCharsets() - */ -@TestInfo( - level = TestLevel.PARTIAL_OK, - purpose = "", - targets = { - @TestTarget( - methodName = "forName", - methodArgs = {java.lang.String.class} - ) - }) - public void _test_forNameLString() throws Exception { - // regression test for Harmony-1051 - ClassLoader originalClassLoader = Thread.currentThread() - .getContextClassLoader(); - try { - Thread.currentThread().setContextClassLoader(null); - // make sure "mockCharset00" is loaded by MockCharsetProvider - assertNotNull(Charset.forName("mockCharset00")); - } finally { - Thread.currentThread().setContextClassLoader(originalClassLoader); - } - } /* * Mock charset class. diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_AbstractTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_AbstractTest.java new file mode 100644 index 0000000..d4447a6 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_AbstractTest.java @@ -0,0 +1,338 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; +import java.util.Arrays; + +@TestTargetClass(targets.Charsets._Abstract.class) +/** + * Super class for concrete charset test suites. + */ +public class Charset_AbstractTest extends TestCase { + + static String charsetName; + static private Charset charset; + static CharsetDecoder decoder; + static CharsetEncoder encoder; + + static final int[] codes = Charset_TestGenerator.codes; + + static final char[] chars = new char[codes.length]; // Is filled with + // contents of codes. + + static char[] testChars; + static byte[] testBytes; + + static char[] theseChars (int[] codes) { + char[] chars = new char[codes.length]; + for (int i = 0; i < codes.length; i++) chars[i] = (char) codes[i]; + return chars; + } + + static byte[] theseBytes (int[] codes) { + byte[] bytes = new byte[codes.length]; + for (int i = 0; i < codes.length; i++) bytes[i] = (byte) codes[i]; + return bytes; + } + + + @Override + protected void setUp() throws Exception { + charset = charset.forName(charsetName); + decoder = charset.newDecoder(); + encoder = charset.newEncoder(); + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "functionalCoDec_REPR", + args = {} + ) + public void test_nameMatch () { + assertEquals("Name of charset must match!", charsetName, charset.name()); + } + + @TestTargetNew( + level = TestLevel.ADDITIONAL, + method = "functionalCoDec_REPR", + args = {} + ) + public void test_dumpEncodableChars () { + if (testChars.length > 0) return; + System.out.format("\ntest_dumpEncodableChars() for name %s => %s (class = %s)\n", + charsetName, charset.name(), getClass().getName()); + Charset_TestGenerator.Dumper out = new Charset_TestGenerator.Dumper1(16); + int code = 0; + while (code < 256) { + while (!encoder.canEncode((char) code)) code ++; + if (code < 65536) { + out.consume(code); + code += 1; + } + } + while (code < 65536) { + while (!encoder.canEncode((char) code)) code ++; + if (code < 65536) { + out.consume(code); + code += 20; + } + } + System.out.println(); + System.out.println("Encodable Chars dumped for Test Class " + getClass().getName()); + fail("Encodable Chars dumped for Test Class " + getClass().getName()); + } + + @TestTargetNew( + level = TestLevel.ADDITIONAL, + method = "functionalCoDec_REPR", + args = {} + ) + public void test_dumpEncoded () throws CharacterCodingException { + if (testChars.length == 0) return; + if (testBytes.length > 0) return; + System.out.format("\ntest_dumpEncoded() for name %s => %s (class = %s)\n", + charsetName, charset.name(), getClass().getName()); + Charset_TestGenerator.Dumper out = new Charset_TestGenerator.Dumper1(); + CharBuffer inputCB = CharBuffer.wrap(testChars); + ByteBuffer outputBB; + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + outputBB = encoder.encode(inputCB); + outputBB.rewind(); + while (outputBB.hasRemaining()) { + out.consume(outputBB.get() & 0xff); + } + System.out.println(); + System.out.println("Encoded Bytes dumped for Test Class " + getClass().getName()); + fail("Encoded Bytes dumped for Test Class " + getClass().getName()); + } + + + static void decode (byte[] input, char[] expectedOutput) throws CharacterCodingException { + ByteBuffer inputBB = ByteBuffer.wrap(input); + CharBuffer outputCB; + decoder.onMalformedInput(CodingErrorAction.REPORT); + outputCB = decoder.decode(inputBB); + outputCB.rewind(); + +// assertTrue("Decoded charactes must match!", +// Arrays.equals(expectedOutput, outputCB.array())); + assertEqualChars("Decoded charactes must match!", + expectedOutput, outputCB); + +// assertEqualChars2("Decoded charactes must match!", +// expectedOutput, +// outputCB.array(), +// input); +// assertTrue("Decoded charactes (REPLACEed ones INCLUSIVE) must match!", +// Arrays.equals(expectedOutput, outputCB.array())); + +// assertEqualChars("Decoded charactes (REPLACEed ones INCLUSIVE) must match!", +// expectedOutput, +// outputCB.array()); + +// assertEquals("Decoded charactes must match!", +// String.valueOf(allChars), +// outputCB.toString()); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "functionalCoDec_REPR", + args = {} + ) + public void test_Decode () throws CharacterCodingException { + decode(testBytes, testChars); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "functionalCoDec_REPR", + args = {} + ) + public void test_Encode () throws CharacterCodingException { + CharBuffer inputCB = CharBuffer.wrap(testChars); + ByteBuffer outputBB; + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + outputBB = encoder.encode(inputCB); + outputBB.rewind(); +// assertTrue("Encoded bytes must match!", +// Arrays.equals(testBytes, outputBB.array())); + assertEqualBytes("Encoded bytes must match!", testBytes, outputBB); + } + + + public void NNtest_CodecDynamicIndividuals () throws CharacterCodingException { + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + decoder.onMalformedInput(CodingErrorAction.REPORT); + + for (int code = 32; code <= 65533; code ++) { + if (encoder.canEncode((char) code)) { +// inputCB.rewind(); + CharBuffer inputCB = CharBuffer.allocate(1); + inputCB.put((char) code); + inputCB.rewind(); + ByteBuffer intermediateBB = encoder.encode(inputCB); + inputCB.rewind(); + intermediateBB.rewind(); + try { + CharBuffer outputCB = decoder.decode(intermediateBB); + outputCB.rewind(); + assertEqualCBs("decode(encode(A)) must be identical with A = " + code, + inputCB, outputCB); + if (code == 165) { + outputCB.rewind(); + System.out.println("WOW:" + outputCB.get()); + } + } catch (CharacterCodingException e) { + fail("failed to decode(encode(" + code + "))"); + } + } + } + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "functionalCoDec_REPR", + args = {} + ) + public void test_CodecDynamic () throws CharacterCodingException { + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + decoder.onMalformedInput(CodingErrorAction.REPORT); + CharBuffer inputCB = CharBuffer.allocate(65536); + for (int code = 32; code <= 65533; code ++) { + if (encoder.canEncode((char) code)) { + inputCB.put((char) code); + } + } + inputCB.rewind(); + ByteBuffer intermediateBB = encoder.encode(inputCB); + inputCB.rewind(); + intermediateBB.rewind(); + CharBuffer outputCB = decoder.decode(intermediateBB); + outputCB.rewind(); + assertEqualCBs("decode(encode(A)) must be identical with A!", + inputCB, outputCB); + } + + static void assertEqualCBs (String msg, CharBuffer expectedCB, CharBuffer actualCB) { + boolean match = true; + boolean lenMatch = true; + char expected, actual; + int len = actualCB.length(); + if (expectedCB.length() != len) { + lenMatch = false; + if (expectedCB.length() < len) len = expectedCB.length(); + } + for (int i = 0; i < len; i++) { + expected = expectedCB.get(); + actual = actualCB.get(); + if (actual != expected) { + System.out.format("Mismatch at index %d: %d instead of expected %d.\n", + i, (int) actual, (int) expected); + match = false; + fail(msg); + } +// else { +// System.out.format("Match index %d: %d = %d\n", +// i, (int) actual[i], (int) expected[i]); +// } + } + assertTrue(msg, match); + assertTrue(msg + "(IN LENGTH ALSO!)", lenMatch); +// assertTrue(msg, Arrays.equals(actual, expected)); + } + + static void assertEqualChars (String msg, char[] expected, CharBuffer actualCB) { + boolean match = true; + boolean lenMatch = true; + char actual; + int len = actualCB.length(); + if (expected.length != len) { + lenMatch = false; + if (expected.length < len) len = expected.length; + } + for (int i = 0; i < len; i++) { + actual = actualCB.get(); + if (actual != expected[i]) { + System.out.format("Mismatch at index %d: %d instead of expected %d.\n", + i, (int) actual, (int) expected[i]); + match = false; + fail(msg); + } +// else { +// System.out.format("Match index %d: %d = %d\n", +// i, (int) actual[i], (int) expected[i]); +// } + } + assertTrue(msg, match); + assertTrue(msg + "(IN LENGTH ALSO!)", lenMatch); +// assertTrue(msg, Arrays.equals(actual, expected)); + } + + static void assertEqualBytes (String msg, byte[] expected, ByteBuffer actualBB) { + boolean match = true; + boolean lenMatch = true; + byte actual; + int len = actualBB.remaining(); + if (expected.length != len) { + lenMatch = false; + if (expected.length < len) len = expected.length; + } + for (int i = 0; i < len; i++) { + actual = actualBB.get(); + if (actual != expected[i]) { + System.out.format("Mismatch at index %d: %d instead of expected %d.\n", + i, actual & 0xff, expected[i] & 0xff); + match = false; + fail(msg); + } + } + assertTrue(msg, match); + assertTrue(msg + "(IN LENGTH ALSO!)", lenMatch); + } + + + static abstract class CodesGenerator { + int row = 0, col = 0; + + abstract void consume(int code); + + boolean isAccepted(int code) { + return Character.isLetterOrDigit(code); + } + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_GSM0338.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_GSM0338.java new file mode 100644 index 0000000..10be214 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_GSM0338.java @@ -0,0 +1,61 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.AndroidOnly; +import dalvik.annotation.TestTargetClass; + +import java.nio.charset.CharacterCodingException; + +@TestTargetClass(targets.Charsets.GSM0338.class) +@AndroidOnly("gsm specific") +public class Charset_GSM0338 extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { +// charsetName = "GSM0338"; + charsetName = "x-gsm-03.38-2000"; + + testChars = theseChars(new int[]{ +10, 13, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, +46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, +62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, +78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 95, 97, 98, +99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, +115, 116, 117, 118, 119, 120, 121, 122, 161, 163, 164, 165, 167, 191, 196, 197, +198, 201, 209, 214, 216, 220, 223, 224, 228, 229, 230, 231, 232, 233, 236, 241, +242, 246, 248, 249, 252, 915, 916 + }); + + testBytes = theseBytes(new int[]{ +10, 13, 32, 33, 34, 35, 2, 37, 38, 39, 40, 41, 42, 43, 44, 45, +46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, +62, 63, 0, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, +78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 17, 97, 98, +99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, +115, 116, 117, 118, 119, 120, 121, 122, 64, 1, 36, 3, 95, 96, 91, 14, +28, 31, 93, 92, 11, 94, 30, 127, 123, 15, 29, 9, 4, 5, 7, 125, +8, 124, 12, 6, 126, 19, 16 + }); + + super.setUp(); + } + + @Override + public void test_CodecDynamic () throws CharacterCodingException { + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_ISO_8859_10.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_ISO_8859_10.java new file mode 100644 index 0000000..8eec28c --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_ISO_8859_10.java @@ -0,0 +1,66 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.AndroidOnly; +import dalvik.annotation.TestTargetClass; + +@TestTargetClass(targets.Charsets.ISO_8859_10.class) +@AndroidOnly("icu") +public class Charset_ISO_8859_10 extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "ISO-8859-10"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 167, 173, 176, 183, 193, 194, 195, 196, 197, 198, 201, 203, 205, 206, 207, +208, 211, 212, 213, 214, 216, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, +229, 230, 233, 235, 237, 238, 239, 240, 243, 244, 245, 246, 248, 250, 251, 252, +253, 254, 256, 257, 290, 325, 358, 8213 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 167, 173, 176, 183, 193, 194, 195, 196, 197, 198, 201, 203, 205, 206, 207, +208, 211, 212, 213, 214, 216, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, +229, 230, 233, 235, 237, 238, 239, 240, 243, 244, 245, 246, 248, 250, 251, 252, +253, 254, 192, 224, 163, 209, 171, 189 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_ISO_8859_14.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_ISO_8859_14.java new file mode 100644 index 0000000..ade25ae --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_ISO_8859_14.java @@ -0,0 +1,80 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.AndroidOnly; +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_14.class) +@AndroidOnly("icu") +public class Charset_ISO_8859_14 extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "ISO-8859-14"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 163, 167, 169, 173, 174, 182, 192, 193, 194, 195, 196, 197, 198, 199, 200, +201, 202, 203, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 216, 217, 218, +219, 220, 221, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, +236, 237, 238, 239, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, +255, 266, 372, 7682, 7744, 7776, 7808, 7922 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 163, 167, 169, 173, 174, 182, 192, 193, 194, 195, 196, 197, 198, 199, 200, +201, 202, 203, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 216, 217, 218, +219, 220, 221, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, +236, 237, 238, 239, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, +255, 164, 208, 161, 180, 187, 168, 172 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_ISO_8859_16.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_ISO_8859_16.java new file mode 100644 index 0000000..127eeb4 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_ISO_8859_16.java @@ -0,0 +1,66 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.AndroidOnly; +import dalvik.annotation.TestTargetClass; + +@TestTargetClass(targets.Charsets.ISO_8859_16.class) +@AndroidOnly("icu") +public class Charset_ISO_8859_16 extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "ISO-8859-16"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 167, 169, 171, 173, 176, 177, 182, 183, 187, 192, 193, 194, 196, 198, 199, +200, 201, 202, 203, 204, 205, 206, 207, 210, 211, 212, 214, 217, 218, 219, 220, +223, 224, 225, 226, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 242, +243, 244, 246, 249, 250, 251, 252, 255, 258, 321, 352, 382, 536, 8221, 8364 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 167, 169, 171, 173, 176, 177, 182, 183, 187, 192, 193, 194, 196, 198, 199, +200, 201, 202, 203, 204, 205, 206, 207, 210, 211, 212, 214, 217, 218, 219, 220, +223, 224, 225, 226, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 242, +243, 244, 246, 249, 250, 251, 252, 255, 195, 163, 166, 184, 170, 181, 164 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_.java new file mode 100644 index 0000000..ef5e0b7 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_.java @@ -0,0 +1,54 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets._Abstract.class) + +public class Charset_MultiByte_ extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = ""; + + testChars = theseChars(new int[]{ + + }); + + testBytes = theseBytes(new int[]{ + + }); + +//testChars = new char[0]; +//testBytes = new byte[0]; + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_Big5.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_Big5.java new file mode 100644 index 0000000..e409a71 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_Big5.java @@ -0,0 +1,434 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +// SEE correspondig_Android test class: +//@TestTargetClass(targets.Charsets.Big5.class) + +public class Charset_MultiByte_Big5 extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "Big5"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +162, 163, 165, 167, 176, 177, 183, 215, 247, 711, 713, 729, 913, 923, 933, 945, +955, 965, 1025, 1044, 1059, 1069, 1079, 1089, 1099, 8211, 8221, 8242, 8254, 8451, 8544, 8592, +8730, 8741, 8756, 8786, 8800, 8869, 8895, 9312, 9332, 9472, 9484, 9496, 9508, 9524, 9552, 9566, +9578, 9601, 9611, 9621, 9632, 9650, 9660, 9670, 9698, 9733, 9792, 12288, 12298, 12308, 12318, 12328, +12353, 12363, 12373, 12383, 12393, 12403, 12413, 12423, 12433, 12445, 12455, 12465, 12475, 12485, 12495, 12505, +12515, 12525, 12542, 12552, 12562, 12572, 12582, 12963, 13198, 13212, 13252, 13262, 19968, 19978, 19988, 19998, +20011, 20024, 20034, 20045, 20056, 20073, 20083, 20094, 20104, 20114, 20126, 20136, 20147, 20160, 20170, 20180, +20190, 20200, 20210, 20221, 20232, 20242, 20253, 20268, 20278, 20289, 20300, 20310, 20320, 20330, 20340, 20350, +20360, 20370, 20380, 20398, 20409, 20419, 20429, 20439, 20449, 20460, 20470, 20480, 20491, 20501, 20511, 20521, +20531, 20544, 20554, 20565, 20575, 20585, 20595, 20605, 20615, 20625, 20635, 20652, 20662, 20673, 20683, 20693, +20704, 20714, 20725, 20735, 20745, 20755, 20767, 20777, 20787, 20797, 20807, 20818, 20828, 20839, 20849, 20860, +20871, 20881, 20894, 20906, 20918, 20932, 20942, 20952, 20976, 20986, 20998, 21008, 21020, 21032, 21042, 21057, +21067, 21077, 21087, 21097, 21108, 21119, 21129, 21139, 21151, 21161, 21179, 21191, 21202, 21213, 21225, 21235, +21246, 21256, 21266, 21276, 21290, 21300, 21310, 21320, 21330, 21340, 21350, 21360, 21371, 21386, 21396, 21406, +21420, 21433, 21443, 21453, 21463, 21473, 21483, 21493, 21505, 21515, 21528, 21540, 21550, 21560, 21570, 21582, +21600, 21611, 21621, 21631, 21643, 21653, 21664, 21674, 21686, 21696, 21710, 21726, 21736, 21746, 21756, 21766, +21776, 21786, 21798, 21808, 21819, 21829, 21839, 21852, 21862, 21877, 21887, 21897, 21907, 21917, 21927, 21937, +21947, 21957, 21967, 21977, 21987, 21999, 22009, 22020, 22030, 22043, 22055, 22066, 22077, 22088, 22099, 22110, +22120, 22130, 22142, 22156, 22167, 22181, 22194, 22204, 22214, 22225, 22235, 22245, 22256, 22266, 22276, 22290, +22300, 22312, 22323, 22334, 22345, 22369, 22379, 22389, 22400, 22411, 22421, 22431, 22446, 22456, 22466, 22476, +22492, 22503, 22513, 22523, 22533, 22544, 22555, 22565, 22575, 22585, 22600, 22610, 22621, 22632, 22644, 22654, +22664, 22675, 22685, 22696, 22707, 22717, 22727, 22737, 22747, 22759, 22772, 22782, 22796, 22806, 22816, 22826, +22839, 22852, 22862, 22872, 22882, 22893, 22903, 22913, 22925, 22935, 22945, 22958, 22969, 22979, 22989, 23000, +23011, 23021, 23031, 23041, 23052, 23062, 23072, 23085, 23095, 23105, 23116, 23126, 23136, 23146, 23159, 23171, +23182, 23194, 23205, 23215, 23225, 23236, 23253, 23263, 23273, 23283, 23293, 23303, 23315, 23325, 23335, 23346, +23356, 23367, 23377, 23387, 23397, 23408, 23418, 23428, 23438, 23448, 23458, 23468, 23478, 23488, 23498, 23508, +23518, 23528, 23538, 23553, 23563, 23573, 23583, 23594, 23607, 23617, 23627, 23637, 23648, 23658, 23668, 23678, +23688, 23698, 23709, 23719, 23729, 23750, 23760, 23770, 23784, 23796, 23807, 23819, 23830, 23840, 23854, 23864, +23874, 23884, 23897, 23907, 23919, 23929, 23940, 23954, 23964, 23975, 23985, 23996, 24006, 24017, 24029, 24039, +24049, 24061, 24074, 24084, 24095, 24105, 24115, 24125, 24138, 24148, 24159, 24169, 24179, 24189, 24199, 24213, +24224, 24234, 24244, 24254, 24264, 24274, 24284, 24294, 24305, 24318, 24328, 24338, 24349, 24359, 24369, 24380, +24390, 24404, 24418, 24428, 24438, 24448, 24458, 24470, 24480, 24490, 24501, 24511, 24521, 24532, 24542, 24552, +24563, 24573, 24585, 24595, 24605, 24615, 24626, 24640, 24652, 24664, 24674, 24684, 24703, 24713, 24724, 24735, +24752, 24762, 24772, 24782, 24792, 24802, 24816, 24826, 24836, 24846, 24856, 24867, 24878, 24891, 24901, 24911, +24922, 24933, 24944, 24954, 24969, 24979, 24989, 24999, 25009, 25020, 25030, 25046, 25056, 25066, 25077, 25087, +25097, 25108, 25119, 25129, 25139, 25149, 25159, 25169, 25179, 25189, 25199, 25209, 25219, 25230, 25240, 25256, +25267, 25277, 25287, 25297, 25307, 25323, 25333, 25343, 25353, 25363, 25384, 25394, 25404, 25414, 25424, 25434, +25445, 25455, 25466, 25476, 25486, 25496, 25506, 25516, 25533, 25543, 25554, 25564, 25575, 25585, 25606, 25616, +25626, 25636, 25646, 25657, 25667, 25677, 25688, 25701, 25711, 25721, 25733, 25743, 25753, 25763, 25773, 25787, +25797, 25807, 25817, 25827, 25837, 25847, 25857, 25868, 25878, 25888, 25898, 25910, 25921, 25935, 25945, 25955, +25967, 25977, 25987, 26000, 26011, 26021, 26031, 26041, 26051, 26061, 26071, 26081, 26092, 26106, 26116, 26126, +26140, 26150, 26161, 26177, 26188, 26201, 26212, 26222, 26232, 26244, 26256, 26269, 26280, 26290, 26301, 26311, +26322, 26332, 26342, 26352, 26364, 26376, 26386, 26397, 26407, 26417, 26427, 26437, 26447, 26457, 26474, 26484, +26494, 26505, 26515, 26525, 26542, 26552, 26562, 26572, 26584, 26594, 26604, 26614, 26642, 26652, 26662, 26673, +26683, 26693, 26703, 26731, 26741, 26751, 26761, 26771, 26781, 26791, 26801, 26820, 26830, 26840, 26851, 26862, +26872, 26884, 26894, 26917, 26927, 26937, 26948, 26958, 26968, 26978, 26988, 26998, 27010, 27021, 27031, 27041, +27051, 27061, 27071, 27081, 27091, 27106, 27116, 27126, 27136, 27146, 27156, 27166, 27176, 27186, 27196, 27206, +27216, 27226, 27236, 27247, 27262, 27273, 27283, 27294, 27304, 27315, 27325, 27335, 27345, 27355, 27365, 27375, +27385, 27395, 27407, 27417, 27427, 27437, 27447, 27457, 27467, 27477, 27487, 27498, 27510, 27520, 27530, 27540, +27550, 27562, 27573, 27583, 27593, 27603, 27614, 27624, 27634, 27644, 27654, 27664, 27674, 27684, 27694, 27704, +27714, 27724, 27735, 27745, 27755, 27766, 27776, 27786, 27796, 27819, 27830, 27840, 27850, 27860, 27870, 27880, +27890, 27904, 27914, 27926, 27936, 27946, 27956, 27966, 27992, 28002, 28012, 28022, 28032, 28042, 28052, 28074, +28084, 28094, 28104, 28114, 28124, 28134, 28144, 28154, 28165, 28185, 28195, 28205, 28216, 28227, 28237, 28248, +28258, 28270, 28280, 28296, 28306, 28316, 28326, 28336, 28346, 28356, 28366, 28376, 28395, 28405, 28415, 28425, +28435, 28446, 28457, 28467, 28478, 28494, 28504, 28514, 28524, 28534, 28544, 28555, 28565, 28576, 28586, 28596, +28607, 28617, 28628, 28638, 28648, 28658, 28668, 28678, 28689, 28699, 28710, 28720, 28730, 28740, 28753, 28763, +28773, 28784, 28794, 28804, 28814, 28824, 28836, 28846, 28856, 28869, 28879, 28889, 28900, 28911, 28921, 28932, +28942, 28953, 28963, 28974, 28986, 28996, 29006, 29016, 29026, 29036, 29048, 29058, 29071, 29081, 29092, 29103, +29113, 29123, 29134, 29144, 29154, 29164, 29176, 29186, 29196, 29209, 29219, 29229, 29240, 29250, 29260, 29270, +29280, 29290, 29300, 29310, 29320, 29330, 29341, 29351, 29364, 29375, 29385, 29396, 29407, 29417, 29427, 29437, +29447, 29457, 29467, 29477, 29488, 29498, 29508, 29518, 29528, 29538, 29548, 29558, 29568, 29578, 29588, 29599, +29609, 29619, 29630, 29640, 29650, 29660, 29671, 29684, 29694, 29704, 29718, 29728, 29738, 29748, 29759, 29770, +29780, 29790, 29801, 29811, 29821, 29831, 29842, 29852, 29862, 29872, 29882, 29893, 29903, 29913, 29923, 29934, +29947, 29959, 29969, 29980, 29990, 30000, 30010, 30023, 30036, 30047, 30058, 30070, 30080, 30090, 30100, 30114, +30128, 30138, 30148, 30158, 30168, 30178, 30189, 30199, 30209, 30219, 30229, 30239, 30249, 30259, 30269, 30279, +30290, 30300, 30313, 30325, 30335, 30345, 30355, 30365, 30378, 30388, 30398, 30408, 30418, 30428, 30438, 30448, +30458, 30468, 30480, 30490, 30501, 30511, 30521, 30532, 30542, 30553, 30563, 30573, 30585, 30595, 30605, 30615, +30625, 30635, 30645, 30655, 30665, 30675, 30686, 30696, 30706, 30716, 30726, 30736, 30749, 30759, 30769, 30787, +30797, 30812, 30824, 30841, 30851, 30862, 30872, 30882, 30892, 30906, 30916, 30926, 30938, 30949, 30959, 30969, +30980, 30990, 31001, 31011, 31021, 31032, 31042, 31052, 31062, 31072, 31082, 31092, 31103, 31114, 31124, 31136, +31146, 31156, 31166, 31176, 31186, 31196, 31206, 31222, 31232, 31242, 31252, 31262, 31272, 31287, 31300, 31310, +31320, 31330, 31340, 31350, 31360, 31370, 31380, 31390, 31400, 31410, 31422, 31434, 31448, 31459, 31469, 31479, +31489, 31502, 31512, 31522, 31532, 31544, 31556, 31566, 31576, 31587, 31597, 31607, 31618, 31628, 31638, 31648, +31660, 31671, 31681, 31691, 31701, 31711, 31721, 31731, 31741, 31751, 31761, 31772, 31782, 31792, 31803, 31813, +31824, 31834, 31844, 31854, 31864, 31876, 31889, 31902, 31912, 31922, 31932, 31944, 31954, 31964, 31975, 31985, +31995, 32005, 32015, 32025, 32040, 32050, 32060, 32070, 32080, 32091, 32102, 32112, 32122, 32132, 32142, 32156, +32166, 32176, 32186, 32196, 32206, 32216, 32227, 32238, 32249, 32259, 32269, 32279, 32289, 32299, 32309, 32319, +32329, 32339, 32350, 32360, 32370, 32380, 32390, 32401, 32411, 32566, 32579, 32589, 32600, 32611, 32621, 32631, +32643, 32653, 32666, 32676, 32687, 32697, 32707, 32717, 32727, 32737, 32747, 32757, 32767, 32779, 32789, 32799, +32809, 32819, 32829, 32839, 32849, 32860, 32871, 32881, 32893, 32903, 32914, 32924, 32937, 32948, 32962, 32972, +32982, 32992, 33005, 33016, 33026, 33045, 33055, 33065, 33081, 33091, 33101, 33115, 33125, 33135, 33145, 33155, +33165, 33175, 33186, 33196, 33207, 33218, 33228, 33239, 33249, 33260, 33271, 33281, 33291, 33301, 33311, 33322, +33332, 33343, 33353, 33363, 33374, 33384, 33394, 33404, 33418, 33428, 33438, 33448, 33459, 33469, 33489, 33499, +33509, 33519, 33529, 33539, 33549, 33559, 33570, 33580, 33590, 33600, 33610, 33620, 33651, 33661, 33671, 33682, +33693, 33703, 33725, 33735, 33745, 33755, 33765, 33775, 33785, 33795, 33805, 33819, 33833, 33843, 33853, 33863, +33873, 33883, 33893, 33903, 33913, 33926, 33936, 33946, 33956, 33966, 33976, 33986, 33996, 34006, 34023, 34033, +34043, 34054, 34065, 34076, 34086, 34096, 34107, 34117, 34129, 34139, 34149, 34161, 34171, 34181, 34191, 34201, +34211, 34223, 34233, 34243, 34253, 34263, 34273, 34283, 34294, 34304, 34314, 34327, 34337, 34348, 34358, 34368, +34379, 34389, 34399, 34409, 34419, 34437, 34448, 34458, 34468, 34479, 34489, 34499, 34512, 34522, 34532, 34549, +34560, 34570, 34584, 34594, 34604, 34615, 34625, 34636, 34646, 34656, 34666, 34676, 34689, 34701, 34711, 34722, +34732, 34742, 34752, 34762, 34772, 34782, 34792, 34802, 34812, 34822, 34832, 34843, 34853, 34863, 34873, 34883, +34893, 34903, 34913, 34923, 34933, 34943, 34953, 34963, 34974, 34984, 34994, 35004, 35017, 35028, 35038, 35048, +35058, 35068, 35078, 35088, 35098, 35109, 35119, 35131, 35142, 35152, 35162, 35172, 35182, 35193, 35203, 35215, +35227, 35238, 35250, 35261, 35282, 35292, 35302, 35312, 35322, 35332, 35342, 35352, 35362, 35372, 35382, 35392, +35402, 35412, 35422, 35432, 35442, 35452, 35462, 35473, 35486, 35496, 35506, 35516, 35526, 35537, 35547, 35558, +35568, 35578, 35588, 35598, 35608, 35618, 35628, 35638, 35648, 35658, 35668, 35679, 35690, 35700, 35710, 35720, +35730, 35740, 35895, 35905, 35915, 35925, 35935, 35945, 35955, 35965, 35977, 35987, 35997, 36007, 36018, 36028, +36039, 36049, 36060, 36070, 36080, 36090, 36100, 36111, 36121, 36196, 36206, 36216, 36228, 36238, 36249, 36259, +36269, 36279, 36289, 36299, 36309, 36319, 36329, 36339, 36349, 36359, 36369, 36379, 36389, 36400, 36412, 36423, +36435, 36445, 36455, 36466, 36476, 36486, 36496, 36506, 36516, 36530, 36541, 36553, 36563, 36573, 36583, 36593, +36603, 36613, 36624, 36634, 36644, 36654, 36664, 36674, 36685, 36695, 36705, 36763, 36774, 36784, 36799, 36809, +36819, 36832, 36842, 36852, 36862, 36875, 36885, 36895, 36909, 36920, 36930, 36941, 36952, 36962, 36973, 36983, +36993, 37003, 37013, 37023, 37034, 37044, 37054, 37064, 37076, 37087, 37097, 37107, 37117, 37127, 37137, 37147, +37158, 37168, 37178, 37188, 37198, 37208, 37218, 37228, 37239, 37249, 37259, 37273, 37283, 37293, 37303, 37313, +37323, 37333, 37346, 37356, 37367, 37377, 37388, 37398, 37411, 37421, 37431, 37445, 37455, 37466, 37476, 37487, +37497, 37507, 37517, 37527, 37537, 37547, 37557, 37568, 37578, 37589, 37599, 37609, 37623, 37633, 37643, 37653, +37663, 37673, 37683, 37702, 37712, 37722, 37732, 37744, 37754, 37768, 37778, 37789, 37799, 37809, 37824, 37834, +37844, 37854, 37864, 37877, 37887, 37897, 37907, 37920, 37930, 37941, 37951, 37961, 37973, 37984, 37994, 38004, +38014, 38263, 38274, 38284, 38296, 38307, 38317, 38327, 38339, 38349, 38362, 38372, 38428, 38440, 38450, 38460, +38474, 38484, 38494, 38506, 38516, 38526, 38536, 38546, 38556, 38567, 38577, 38587, 38597, 38610, 38620, 38632, +38642, 38653, 38663, 38673, 38684, 38694, 38704, 38714, 38724, 38738, 38748, 38758, 38768, 38778, 38788, 38798, +38808, 38818, 38828, 38838, 38849, 38859, 38869, 38879, 38893, 38904, 38914, 38924, 38934, 38944, 38955, 38965, +38977, 38988, 38999, 39010, 39023, 39080, 39090, 39100, 39110, 39131, 39141, 39151, 39161, 39171, 39184, 39194, +39204, 39214, 39226, 39237, 39248, 39259, 39318, 39329, 39339, 39349, 39361, 39371, 39381, 39391, 39401, 39412, +39422, 39433, 39444, 39454, 39465, 39476, 39486, 39496, 39506, 39518, 39528, 39592, 39603, 39614, 39626, 39636, +39647, 39659, 39670, 39681, 39691, 39701, 39711, 39721, 39731, 39742, 39752, 39762, 39775, 39788, 39798, 39808, +39824, 39834, 39844, 39854, 39864, 39875, 39891, 39902, 39912, 39927, 39941, 39954, 39964, 39976, 39986, 39996, +40006, 40016, 40030, 40040, 40051, 40165, 40177, 40187, 40197, 40208, 40219, 40229, 40239, 40251, 40261, 40271, +40281, 40295, 40305, 40315, 40325, 40336, 40346, 40356, 40367, 40377, 40387, 40397, 40407, 40417, 40427, 40437, +40447, 40457, 40467, 40477, 40565, 40575, 40585, 40595, 40605, 40615, 40628, 40638, 40648, 40659, 40669, 40679, +40690, 40700, 40710, 40720, 40730, 40740, 40750, 40760, 40770, 40780, 40790, 40800, 40810, 40820, 40830, 40845, +40856, 40866, 64012, 65072, 65082, 65092, 65102, 65113, 65123, 65281, 65291, 65301, 65311, 65321, 65331, 65343, +65353, 65363, 65373, 65536 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +162, 70, 162, 71, 162, 68, 161, 177, 162, 88, 161, 211, 161, 80, 161, 209, +161, 210, 163, 190, 163, 188, 163, 187, 163, 68, 163, 78, 163, 87, 163, 92, +163, 102, 163, 111, 199, 179, 199, 177, 199, 187, 199, 197, 199, 208, 199, 218, +199, 228, 161, 86, 161, 168, 161, 172, 161, 194, 162, 74, 162, 185, 161, 246, +161, 212, 161, 252, 161, 239, 161, 220, 161, 218, 161, 230, 161, 233, 199, 233, +199, 243, 162, 119, 162, 122, 162, 125, 162, 116, 162, 114, 162, 164, 162, 165, +162, 166, 162, 98, 162, 110, 162, 121, 161, 189, 161, 182, 161, 191, 161, 187, +162, 168, 161, 185, 161, 240, 161, 64, 161, 109, 161, 101, 161, 170, 162, 202, +198, 165, 198, 175, 198, 185, 198, 195, 198, 205, 198, 215, 198, 225, 198, 235, +198, 245, 198, 162, 198, 254, 199, 73, 199, 83, 199, 93, 199, 103, 199, 113, +199, 123, 199, 167, 198, 161, 163, 119, 163, 163, 163, 173, 163, 183, 161, 192, +162, 85, 162, 80, 162, 87, 162, 83, 164, 64, 164, 87, 165, 66, 165, 224, +164, 88, 164, 89, 201, 64, 165, 69, 173, 188, 165, 228, 168, 197, 176, 174, +164, 169, 164, 172, 168, 200, 166, 235, 173, 189, 164, 176, 164, 181, 165, 74, +165, 81, 201, 101, 165, 242, 165, 247, 201, 179, 201, 187, 201, 180, 201, 173, +167, 68, 202, 100, 203, 189, 202, 90, 167, 65, 203, 191, 203, 185, 168, 219, +168, 215, 203, 200, 203, 197, 171, 86, 205, 238, 171, 80, 205, 221, 171, 85, +171, 72, 205, 239, 208, 212, 173, 206, 173, 211, 212, 91, 173, 201, 173, 197, +208, 209, 212, 99, 212, 89, 176, 186, 212, 93, 212, 94, 212, 101, 176, 176, +216, 95, 179, 199, 216, 81, 182, 202, 220, 195, 220, 190, 220, 193, 185, 178, +224, 254, 224, 246, 187, 248, 228, 230, 187, 252, 232, 245, 192, 118, 236, 190, +195, 95, 247, 208, 165, 251, 168, 224, 176, 194, 164, 186, 166, 64, 173, 221, +201, 78, 171, 96, 203, 205, 190, 173, 167, 77, 208, 226, 208, 229, 225, 64, +176, 196, 165, 88, 164, 192, 201, 191, 202, 108, 167, 83, 203, 209, 168, 239, +171, 103, 208, 235, 208, 234, 179, 209, 179, 207, 182, 207, 188, 66, 190, 176, +165, 92, 167, 85, 168, 241, 171, 105, 176, 199, 179, 211, 225, 67, 190, 177, +164, 196, 166, 73, 216, 98, 201, 108, 173, 234, 232, 250, 176, 208, 164, 200, +168, 242, 164, 82, 168, 246, 166, 76, 171, 111, 201, 196, 203, 218, 208, 239, +225, 70, 201, 88, 176, 209, 164, 207, 168, 252, 232, 251, 165, 115, 165, 114, +166, 83, 166, 84, 202, 126, 202, 165, 167, 109, 167, 108, 167, 102, 167, 96, +203, 235, 203, 225, 168, 254, 203, 220, 169, 81, 169, 66, 206, 72, 171, 125, +206, 69, 171, 115, 171, 117, 206, 78, 173, 239, 173, 245, 173, 243, 173, 246, +173, 240, 208, 247, 208, 240, 212, 124, 212, 168, 212, 126, 176, 221, 176, 227, +176, 213, 212, 113, 216, 120, 179, 239, 216, 109, 179, 220, 179, 217, 179, 237, +179, 235, 182, 229, 220, 216, 220, 223, 182, 224, 182, 226, 225, 85, 225, 83, +185, 199, 185, 192, 225, 71, 188, 74, 229, 67, 228, 246, 188, 78, 233, 69, +190, 185, 233, 68, 236, 198, 236, 193, 239, 188, 195, 96, 243, 254, 196, 90, +246, 215, 197, 241, 165, 124, 202, 169, 167, 120, 169, 84, 174, 70, 182, 233, +233, 71, 166, 98, 166, 96, 167, 163, 202, 173, 169, 89, 203, 245, 203, 250, +203, 249, 171, 172, 206, 94, 206, 82, 171, 177, 209, 82, 174, 71, 209, 74, +212, 177, 212, 197, 212, 200, 212, 173, 176, 237, 212, 196, 216, 170, 216, 168, +179, 243, 216, 175, 216, 167, 182, 246, 220, 235, 220, 227, 225, 93, 185, 209, +225, 101, 185, 211, 229, 75, 190, 165, 188, 88, 233, 74, 190, 194, 192, 164, +241, 248, 247, 211, 206, 95, 225, 105, 204, 66, 165, 126, 176, 247, 164, 211, +166, 105, 169, 97, 171, 182, 174, 78, 176, 248, 188, 93, 201, 209, 166, 113, +167, 176, 202, 181, 202, 187, 169, 103, 169, 102, 204, 77, 169, 107, 171, 185, +171, 187, 206, 118, 206, 110, 171, 194, 174, 91, 209, 92, 174, 87, 209, 93, +216, 194, 176, 250, 212, 231, 212, 236, 212, 206, 176, 253, 180, 64, 216, 198, +212, 227, 180, 65, 216, 190, 216, 181, 221, 70, 220, 244, 225, 110, 225, 124, +185, 224, 225, 115, 229, 86, 229, 94, 233, 86, 190, 197, 236, 211, 236, 208, +239, 193, 245, 200, 164, 109, 167, 184, 204, 86, 177, 69, 192, 169, 201, 115, +202, 188, 169, 120, 171, 200, 209, 104, 174, 97, 212, 242, 216, 213, 216, 211, +185, 230, 185, 235, 236, 217, 171, 202, 180, 77, 201, 212, 221, 75, 202, 191, +192, 170, 167, 190, 171, 206, 174, 105, 177, 79, 239, 195, 201, 118, 201, 217, +202, 194, 202, 197, 204, 104, 204, 103, 169, 167, 206, 171, 206, 121, 206, 162, +174, 111, 174, 115, 209, 109, 212, 245, 177, 86, 212, 248, 213, 68, 216, 236, +216, 233, 180, 79, 216, 232, 221, 78, 183, 68, 225, 176, 185, 241, 229, 101, +229, 106, 233, 97, 233, 95, 192, 172, 244, 68, 246, 222, 164, 116, 165, 169, +164, 118, 180, 83, 202, 203, 204, 110, 171, 212, 209, 115, 177, 98, 180, 85, +221, 90, 185, 247, 188, 109, 229, 110, 165, 173, 171, 213, 167, 200, 169, 179, +171, 214, 209, 119, 213, 72, 177, 104, 183, 72, 225, 188, 225, 185, 233, 113, +245, 203, 164, 123, 171, 217, 183, 73, 202, 211, 169, 183, 174, 122, 180, 93, +185, 251, 204, 116, 167, 206, 177, 108, 202, 213, 169, 185, 171, 222, 213, 79, +177, 116, 180, 96, 188, 120, 242, 64, 201, 123, 201, 225, 204, 120, 202, 218, +202, 220, 169, 191, 204, 175, 204, 172, 171, 228, 169, 202, 204, 125, 206, 202, +206, 201, 206, 207, 171, 236, 171, 239, 177, 118, 177, 120, 174, 172, 174, 169, +213, 85, 213, 86, 216, 253, 216, 252, 177, 166, 216, 251, 180, 107, 180, 105, +217, 79, 180, 112, 217, 75, 180, 104, 221, 108, 225, 210, 221, 105, 221, 111, +186, 70, 225, 209, 188, 162, 225, 207, 229, 126, 229, 162, 233, 118, 188, 165, +229, 123, 236, 225, 233, 123, 239, 207, 236, 227, 239, 204, 195, 106, 197, 116, +201, 124, 204, 177, 180, 117, 225, 214, 194, 87, 204, 178, 174, 176, 165, 183, +166, 170, 201, 236, 167, 232, 167, 229, 202, 231, 202, 233, 167, 233, 169, 225, +204, 187, 169, 226, 169, 230, 204, 181, 169, 219, 206, 218, 206, 215, 174, 179, +171, 246, 206, 225, 174, 193, 213, 102, 209, 189, 174, 185, 174, 189, 209, 199, +213, 103, 213, 114, 177, 204, 177, 193, 213, 113, 177, 184, 177, 180, 177, 197, +213, 107, 217, 107, 180, 161, 217, 102, 221, 183, 221, 120, 183, 112, 221, 122, +221, 178, 221, 126, 221, 185, 221, 166, 221, 162, 225, 218, 186, 75, 225, 242, +188, 176, 188, 177, 229, 177, 229, 180, 188, 193, 229, 184, 188, 189, 190, 216, +190, 213, 233, 167, 233, 174, 236, 234, 192, 195, 194, 94, 239, 213, 242, 70, +244, 76, 246, 225, 197, 205, 166, 172, 206, 231, 177, 211, 177, 208, 180, 178, +221, 188, 229, 191, 192, 197, 180, 180, 177, 216, 165, 184, 180, 181, 164, 232, +209, 208, 213, 168, 186, 88, 201, 94, 166, 175, 169, 244, 204, 198, 169, 250, +206, 239, 206, 240, 172, 82, 174, 208, 174, 206, 213, 172, 177, 224, 180, 182, +221, 199, 183, 121, 221, 194, 186, 92, 186, 91, 229, 198, 233, 185, 190, 232, +236, 242, 194, 96, 196, 102, 164, 234, 176, 210, 164, 235, 209, 215, 180, 194, +196, 103, 166, 182, 201, 242, 202, 253, 167, 246, 203, 64, 170, 87, 204, 220, +170, 81, 170, 80, 170, 85, 170, 75, 207, 91, 172, 101, 207, 81, 207, 90, +207, 67, 172, 107, 172, 90, 207, 78, 209, 236, 209, 227, 209, 238, 209, 226, +209, 222, 174, 233, 209, 224, 213, 196, 213, 189, 177, 236, 213, 206, 177, 234, +177, 248, 177, 239, 177, 238, 177, 243, 217, 205, 180, 198, 180, 208, 180, 203, +217, 197, 217, 172, 180, 213, 217, 216, 221, 242, 221, 210, 221, 228, 221, 204, +221, 230, 221, 205, 221, 218, 221, 229, 183, 167, 226, 74, 226, 93, 226, 90, +186, 103, 226, 96, 226, 78, 225, 254, 186, 98, 229, 213, 229, 212, 229, 235, +229, 202, 188, 212, 229, 220, 188, 207, 233, 202, 233, 194, 233, 215, 233, 221, +233, 209, 233, 203, 233, 208, 233, 212, 192, 207, 236, 247, 236, 253, 236, 251, +237, 66, 194, 98, 239, 223, 239, 229, 242, 79, 192, 205, 195, 111, 244, 90, +244, 87, 245, 208, 247, 226, 248, 242, 170, 89, 209, 247, 213, 216, 221, 250, +226, 101, 233, 222, 194, 106, 172, 110, 230, 209, 204, 234, 174, 237, 217, 222, +226, 102, 233, 226, 172, 113, 183, 181, 239, 233, 183, 182, 204, 236, 210, 64, +217, 228, 221, 254, 233, 232, 165, 194, 203, 74, 174, 244, 180, 225, 165, 195, +168, 68, 202, 64, 166, 189, 166, 195, 203, 77, 168, 90, 205, 69, 205, 67, +168, 92, 170, 106, 204, 243, 205, 71, 170, 121, 204, 244, 205, 70, 170, 96, +204, 254, 207, 124, 207, 116, 210, 100, 207, 168, 172, 120, 207, 110, 172, 163, +210, 76, 210, 77, 175, 64, 210, 72, 210, 98, 175, 71, 175, 75, 178, 101, +213, 226, 213, 240, 213, 236, 178, 89, 213, 242, 178, 104, 213, 249, 178, 76, +178, 77, 181, 65, 180, 237, 180, 244, 180, 229, 180, 251, 180, 248, 180, 240, +217, 240, 180, 243, 218, 78, 217, 236, 222, 95, 183, 200, 222, 87, 222, 85, +183, 196, 183, 201, 226, 108, 222, 93, 226, 170, 226, 109, 186, 161, 226, 117, +186, 118, 226, 183, 186, 120, 186, 115, 186, 121, 226, 118, 188, 239, 230, 67, +230, 73, 230, 72, 192, 223, 230, 90, 230, 93, 191, 73, 233, 251, 191, 74, +233, 253, 234, 65, 237, 81, 237, 87, 237, 91, 237, 88, 239, 246, 194, 112, +194, 114, 195, 115, 239, 245, 196, 106, 244, 100, 245, 212, 197, 120, 247, 228, +249, 163, 166, 199, 203, 95, 205, 85, 170, 162, 205, 81, 172, 183, 172, 182, +172, 181, 210, 119, 175, 81, 175, 79, 175, 78, 178, 109, 178, 105, 214, 79, +214, 91, 181, 72, 218, 94, 218, 92, 218, 100, 222, 161, 183, 206, 222, 120, +222, 114, 183, 213, 222, 116, 226, 191, 226, 192, 186, 179, 230, 109, 230, 99, +191, 81, 191, 85, 191, 82, 234, 84, 237, 98, 192, 236, 194, 119, 242, 108, +242, 105, 245, 220, 248, 177, 170, 167, 170, 168, 210, 125, 181, 80, 188, 248, +168, 101, 205, 91, 172, 187, 214, 92, 218, 104, 186, 185, 234, 89, 196, 235, +202, 67, 203, 97, 205, 95, 205, 98, 207, 194, 172, 188, 210, 168, 175, 86, +214, 98, 214, 99, 178, 114, 181, 84, 218, 111, 222, 173, 186, 187, 188, 250, +230, 117, 230, 161, 234, 94, 239, 254, 197, 122, 201, 167, 203, 107, 170, 179, +170, 177, 172, 197, 207, 210, 207, 201, 210, 180, 210, 179, 210, 176, 214, 120, +178, 123, 214, 121, 218, 126, 218, 169, 181, 88, 181, 94, 183, 233, 222, 178, +222, 190, 183, 231, 188, 252, 226, 207, 230, 167, 230, 162, 234, 102, 191, 88, +192, 245, 192, 244, 244, 111, 242, 116, 196, 110, 246, 242, 195, 164, 207, 216, +218, 171, 230, 173, 237, 112, 178, 162, 181, 100, 165, 208, 203, 109, 207, 218, +175, 96, 210, 194, 181, 102, 183, 237, 234, 106, 197, 124, 203, 111, 172, 207, +210, 195, 210, 202, 210, 198, 214, 124, 181, 107, 181, 103, 222, 210, 222, 202, +183, 241, 186, 198, 226, 221, 189, 69, 189, 68, 234, 111, 234, 110, 237, 119, +194, 161, 240, 74, 196, 238, 249, 204, 202, 71, 214, 166, 181, 113, 230, 185, +244, 113, 181, 114, 244, 114, 172, 213, 178, 176, 181, 115, 234, 117, 205, 120, +207, 231, 207, 226, 210, 207, 210, 214, 214, 176, 214, 169, 214, 168, 218, 188, +218, 192, 222, 225, 183, 254, 222, 226, 184, 64, 226, 234, 230, 188, 234, 161, +234, 120, 237, 123, 237, 122, 194, 163, 242, 121, 196, 239, 218, 195, 207, 233, +244, 120, 205, 123, 207, 234, 207, 238, 175, 124, 175, 122, 210, 229, 178, 185, +214, 182, 218, 200, 218, 207, 222, 238, 222, 237, 184, 72, 184, 75, 226, 246, +226, 245, 189, 84, 230, 201, 230, 197, 191, 106, 234, 164, 193, 70, 237, 172, +237, 174, 194, 166, 195, 170, 244, 122, 245, 225, 248, 181, 205, 162, 207, 245, +175, 170, 175, 168, 214, 191, 218, 210, 184, 83, 226, 249, 226, 253, 230, 205, +193, 73, 246, 247, 165, 221, 170, 196, 172, 237, 210, 243, 175, 179, 214, 198, +181, 125, 218, 215, 184, 90, 184, 92, 227, 72, 189, 94, 234, 175, 191, 111, +237, 180, 194, 169, 244, 163, 168, 115, 207, 254, 210, 251, 214, 201, 223, 68, +227, 74, 230, 211, 237, 183, 197, 209, 210, 253, 181, 164, 186, 220, 244, 165, +208, 67, 211, 70, 214, 211, 214, 208, 178, 196, 214, 219, 218, 224, 218, 227, +218, 229, 223, 83, 223, 72, 184, 95, 227, 93, 227, 85, 227, 83, 189, 105, +230, 217, 230, 214, 189, 104, 230, 215, 234, 187, 234, 198, 191, 122, 237, 195, +237, 201, 193, 76, 191, 117, 240, 97, 240, 104, 240, 108, 242, 172, 244, 170, +196, 240, 246, 254, 197, 210, 198, 89, 208, 69, 211, 73, 211, 74, 218, 232, +218, 233, 223, 84, 227, 96, 230, 224, 234, 199, 193, 83, 194, 179, 247, 65, +168, 116, 172, 245, 211, 89, 175, 200, 214, 240, 178, 216, 178, 209, 178, 204, +181, 178, 184, 108, 181, 185, 181, 187, 223, 93, 223, 100, 223, 94, 186, 238, +227, 117, 186, 237, 186, 246, 227, 108, 227, 107, 189, 112, 189, 116, 230, 239, +189, 123, 230, 233, 234, 219, 234, 206, 234, 205, 193, 95, 193, 103, 193, 104, +237, 215, 240, 119, 194, 182, 242, 184, 242, 182, 196, 126, 245, 235, 247, 66, +249, 65, 166, 206, 234, 223, 245, 237, 208, 77, 214, 241, 223, 103, 189, 125, +242, 187, 208, 79, 178, 220, 184, 115, 189, 126, 195, 188, 211, 99, 214, 248, +219, 68, 187, 66, 230, 246, 239, 168, 244, 177, 181, 192, 175, 209, 214, 254, +234, 230, 166, 213, 175, 212, 215, 66, 219, 69, 227, 163, 230, 252, 193, 109, +197, 165, 187, 70, 203, 119, 203, 120, 170, 211, 170, 212, 208, 91, 173, 73, +173, 68, 208, 88, 175, 218, 175, 221, 175, 215, 215, 78, 215, 74, 178, 231, +181, 200, 219, 74, 219, 80, 223, 119, 184, 123, 223, 126, 184, 161, 227, 166, +227, 168, 231, 68, 231, 66, 234, 239, 234, 242, 193, 117, 237, 234, 242, 193, +249, 68, 175, 229, 219, 84, 211, 112, 244, 181, 227, 171, 166, 224, 175, 232, +215, 86, 219, 90, 223, 164, 231, 71, 240, 163, 244, 182, 166, 226, 202, 75, +203, 161, 208, 106, 205, 188, 205, 191, 170, 218, 170, 222, 173, 98, 173, 86, +173, 89, 173, 102, 208, 109, 173, 83, 206, 65, 175, 250, 211, 126, 211, 179, +175, 249, 175, 251, 175, 240, 175, 239, 215, 94, 215, 104, 215, 119, 178, 247, +215, 107, 179, 65, 178, 245, 219, 163, 219, 164, 219, 175, 219, 111, 181, 216, +219, 94, 181, 209, 181, 211, 219, 174, 223, 199, 223, 217, 184, 168, 223, 215, +223, 177, 184, 175, 223, 176, 223, 211, 223, 173, 223, 179, 187, 96, 227, 187, +227, 173, 227, 180, 187, 93, 227, 178, 227, 196, 227, 201, 231, 115, 223, 169, +231, 88, 189, 183, 189, 176, 231, 87, 231, 114, 231, 122, 231, 77, 234, 249, +235, 70, 235, 74, 235, 86, 235, 75, 237, 251, 238, 81, 237, 245, 238, 75, +237, 250, 193, 166, 194, 202, 240, 167, 194, 197, 242, 205, 242, 202, 242, 198, +244, 190, 244, 189, 196, 173, 196, 244, 245, 250, 247, 74, 247, 76, 247, 241, +249, 199, 179, 66, 184, 185, 240, 186, 208, 169, 211, 196, 211, 205, 211, 195, +176, 68, 179, 76, 215, 167, 215, 174, 181, 241, 219, 182, 181, 240, 223, 232, +184, 190, 184, 196, 187, 106, 187, 103, 227, 224, 187, 108, 227, 225, 189, 193, +231, 161, 189, 187, 231, 176, 189, 185, 235, 97, 191, 196, 235, 93, 191, 195, +238, 93, 238, 107, 193, 172, 238, 105, 240, 197, 238, 111, 240, 208, 194, 206, +242, 228, 242, 227, 244, 197, 246, 66, 247, 81, 247, 215, 197, 251, 211, 207, +173, 108, 181, 243, 191, 197, 173, 109, 211, 210, 211, 215, 215, 178, 215, 195, +179, 79, 215, 180, 219, 205, 219, 202, 219, 207, 184, 199, 223, 245, 187, 116, +227, 248, 227, 252, 231, 201, 189, 197, 187, 117, 191, 200, 235, 122, 193, 182, +240, 214, 240, 215, 242, 234, 196, 176, 246, 74, 249, 72, 181, 247, 179, 87, +223, 251, 191, 204, 194, 209, 196, 253, 168, 164, 224, 67, 224, 68, 231, 210, +246, 76, 208, 176, 176, 81, 176, 79, 179, 96, 215, 203, 182, 70, 219, 218, +219, 226, 182, 64, 181, 252, 184, 229, 184, 211, 184, 217, 224, 70, 187, 165, +187, 121, 187, 163, 189, 210, 189, 203, 231, 213, 231, 216, 189, 219, 191, 205, +235, 169, 191, 206, 193, 195, 193, 188, 238, 161, 238, 166, 194, 213, 240, 232, +242, 249, 242, 248, 242, 252, 196, 183, 244, 207, 196, 254, 247, 86, 248, 67, +197, 254, 198, 109, 168, 166, 193, 197, 224, 83, 168, 168, 219, 229, 228, 82, +193, 199, 215, 209, 184, 232, 191, 223, 168, 169, 179, 104, 184, 237, 182, 75, +184, 234, 187, 172, 189, 231, 189, 225, 235, 183, 193, 200, 240, 244, 196, 185, +248, 69, 168, 170, 235, 186, 211, 228, 219, 237, 224, 96, 187, 175, 189, 236, +243, 77, 211, 230, 215, 218, 182, 91, 219, 247, 184, 242, 224, 109, 184, 245, +228, 91, 228, 94, 231, 251, 231, 249, 231, 245, 235, 198, 235, 195, 238, 191, +238, 188, 241, 67, 240, 254, 195, 219, 195, 218, 244, 215, 247, 97, 247, 95, +249, 80, 184, 250, 235, 200, 249, 172, 211, 233, 215, 221, 220, 69, 220, 73, +182, 97, 224, 120, 228, 100, 232, 74, 232, 72, 235, 202, 191, 233, 193, 212, +194, 225, 244, 220, 197, 175, 168, 175, 191, 236, 168, 176, 203, 166, 203, 165, +205, 206, 208, 182, 173, 125, 176, 106, 211, 234, 215, 227, 179, 119, 179, 116, +220, 77, 182, 104, 185, 69, 185, 77, 187, 184, 187, 189, 190, 68, 190, 69, +193, 218, 195, 229, 176, 111, 203, 167, 168, 184, 205, 212, 208, 188, 208, 191, +215, 238, 211, 247, 215, 241, 215, 237, 179, 163, 220, 90, 224, 167, 228, 113, +232, 89, 190, 70, 241, 75, 246, 91, 212, 64, 215, 243, 220, 96, 185, 83, +187, 197, 232, 94, 190, 76, 238, 200, 193, 222, 243, 95, 244, 227, 198, 93, +196, 192, 212, 66, 212, 67, 215, 247, 216, 65, 220, 98, 220, 105, 220, 119, +182, 116, 228, 186, 185, 87, 185, 100, 224, 188, 185, 103, 185, 95, 224, 191, +228, 164, 224, 182, 228, 126, 228, 165, 228, 175, 228, 163, 232, 161, 232, 101, +232, 115, 232, 120, 232, 106, 232, 108, 235, 244, 235, 233, 236, 64, 192, 67, +235, 224, 235, 249, 191, 248, 235, 234, 238, 216, 193, 237, 238, 208, 193, 236, +235, 227, 241, 96, 241, 85, 241, 88, 241, 90, 241, 100, 243, 115, 243, 108, +243, 109, 243, 96, 195, 245, 244, 243, 244, 254, 244, 251, 244, 232, 244, 234, +246, 102, 197, 75, 246, 94, 247, 111, 248, 75, 197, 224, 198, 68, 249, 114, +198, 113, 170, 248, 173, 172, 220, 122, 185, 104, 187, 213, 190, 91, 238, 243, +238, 241, 236, 71, 243, 119, 246, 108, 170, 250, 203, 174, 168, 190, 205, 218, +208, 198, 208, 194, 176, 165, 179, 173, 179, 178, 220, 125, 220, 126, 224, 209, +187, 217, 192, 71, 193, 244, 176, 166, 182, 174, 187, 220, 194, 248, 171, 66, +182, 179, 224, 215, 190, 95, 192, 76, 193, 247, 243, 126, 196, 197, 246, 111, +198, 71, 171, 67, 192, 82, 192, 83, 220, 170, 228, 192, 228, 198, 232, 178, +192, 84, 241, 161, 241, 121, 243, 163, 197, 183, 173, 179, 239, 66, 243, 166, +173, 180, 236, 88, 179, 187, 185, 124, 228, 203, 232, 187, 190, 102, 236, 89, +239, 69, 195, 68, 243, 170, 245, 79, 197, 227, 173, 183, 232, 190, 196, 66, +246, 116, 173, 184, 216, 79, 182, 186, 224, 227, 187, 229, 192, 92, 192, 97, +236, 92, 195, 75, 241, 174, 196, 67, 245, 84, 247, 119, 173, 186, 239, 87, +249, 178, 224, 231, 187, 233, 232, 207, 190, 114, 190, 111, 236, 104, 239, 90, +239, 97, 241, 177, 243, 192, 243, 190, 245, 96, 245, 91, 197, 91, 247, 125, +247, 162, 248, 211, 249, 195, 176, 169, 232, 210, 239, 100, 245, 101, 197, 233, +212, 73, 232, 212, 236, 110, 239, 103, 243, 194, 246, 163, 248, 85, 241, 190, +236, 114, 228, 221, 239, 105, 246, 168, 228, 225, 232, 227, 232, 222, 236, 115, +236, 124, 239, 106, 239, 113, 194, 65, 241, 201, 241, 197, 241, 202, 243, 202, +196, 72, 245, 108, 245, 109, 245, 110, 246, 171, 246, 174, 247, 180, 247, 177, +247, 170, 248, 89, 248, 218, 249, 90, 249, 120, 179, 190, 228, 226, 232, 236, +232, 238, 236, 172, 192, 112, 236, 163, 239, 123, 194, 69, 239, 161, 241, 209, +241, 213, 239, 120, 243, 221, 243, 235, 243, 233, 245, 125, 245, 167, 245, 121, +197, 97, 246, 191, 246, 187, 246, 199, 197, 195, 248, 105, 248, 101, 247, 196, +248, 229, 248, 228, 249, 124, 249, 207, 179, 191, 179, 192, 239, 171, 196, 83, +197, 101, 228, 229, 196, 84, 190, 163, 239, 174, 232, 241, 194, 75, 245, 182, +248, 118, 243, 245, 248, 120, 232, 243, 246, 208, 239, 178, 245, 185, 248, 122, +247, 204, 241, 233, 243, 250, 245, 187, 197, 198, 248, 235, 249, 211, 192, 115, +249, 213, 247, 207, 201, 74, 161, 74, 161, 104, 161, 124, 161, 201, 161, 125, +161, 223, 161, 73, 161, 207, 162, 180, 161, 72, 162, 215, 162, 225, 161, 196, +162, 241, 162, 251, 161, 98, 0 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_Big5_Android.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_Big5_Android.java new file mode 100644 index 0000000..9619154 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_Big5_Android.java @@ -0,0 +1,315 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.Big5.class) + +public class Charset_MultiByte_Big5_Android extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "Big5"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 167, 175, 176, 177, 183, 215, 247, 711, 713, 913, 933, 953, 8211, 8231, 8251, +8364, 8451, 8544, 8592, 8725, 8745, 8786, 8806, 8853, 8895, 9472, 9492, 9516, 9552, 9572, 9601, +9621, 9650, 9670, 9698, 9733, 9792, 12288, 12308, 12328, 12549, 12569, 12963, 13198, 13252, 19968, 19988, +20011, 20034, 20054, 20083, 20104, 20126, 20147, 20167, 20188, 20208, 20228, 20248, 20268, 20289, 20309, 20329, +20349, 20369, 20398, 20418, 20438, 20460, 20480, 20500, 20520, 20540, 20561, 20581, 20602, 20622, 20642, 20662, +20682, 20704, 20725, 20745, 20767, 20787, 20807, 20827, 20849, 20871, 20894, 20918, 20938, 20958, 20979, 20999, +21020, 21040, 21060, 21082, 21102, 21122, 21142, 21162, 21182, 21202, 21222, 21242, 21262, 21282, 21303, 21324, +21344, 21365, 21386, 21406, 21426, 21448, 21471, 21491, 21511, 21531, 21552, 21573, 21600, 21620, 21640, 21664, +21686, 21710, 21730, 21751, 21771, 21798, 21819, 21839, 21859, 21879, 21899, 21919, 21939, 21959, 21979, 21999, +22020, 22043, 22063, 22085, 22105, 22125, 22145, 22165, 22186, 22206, 22227, 22247, 22271, 22291, 22312, 22334, +22354, 22374, 22395, 22415, 22435, 22456, 22476, 22496, 22516, 22536, 22556, 22576, 22600, 22621, 22641, 22661, +22684, 22705, 22725, 22745, 22767, 22787, 22807, 22827, 22848, 22868, 22889, 22909, 22930, 22950, 22970, 22990, +23011, 23031, 23052, 23072, 23093, 23113, 23133, 23159, 23179, 23199, 23219, 23239, 23259, 23283, 23303, 23323, +23343, 23363, 23383, 23403, 23423, 23443, 23463, 23487, 23507, 23527, 23553, 23573, 23594, 23614, 23636, 23656, +23676, 23696, 23716, 23736, 23756, 23784, 23805, 23825, 23845, 23865, 23886, 23906, 23927, 23949, 23969, 23989, +24009, 24029, 24049, 24070, 24090, 24115, 24138, 24159, 24179, 24199, 24219, 24240, 24260, 24280, 24300, 24321, +24341, 24361, 24384, 24404, 24425, 24445, 24465, 24485, 24505, 24525, 24545, 24565, 24585, 24605, 24626, 24646, +24666, 24686, 24707, 24727, 24752, 24772, 24792, 24816, 24836, 24856, 24876, 24896, 24916, 24936, 24956, 24976, +24996, 25016, 25036, 25056, 25077, 25097, 25119, 25139, 25159, 25179, 25199, 25219, 25239, 25259, 25279, 25299, +25323, 25343, 25363, 25384, 25404, 25424, 25445, 25466, 25486, 25506, 25533, 25554, 25575, 25606, 25626, 25646, +25667, 25688, 25708, 25730, 25750, 25771, 25791, 25812, 25832, 25852, 25872, 25892, 25912, 25935, 25955, 25975, +25996, 26016, 26038, 26059, 26079, 26099, 26119, 26140, 26161, 26181, 26201, 26222, 26244, 26264, 26286, 26308, +26328, 26348, 26368, 26388, 26408, 26428, 26448, 26474, 26494, 26514, 26542, 26562, 26584, 26604, 26642, 26662, +26682, 26702, 26731, 26751, 26771, 26791, 26820, 26840, 26860, 26884, 26917, 26937, 26958, 26978, 26998, 27021, +27041, 27061, 27081, 27106, 27126, 27146, 27166, 27186, 27206, 27226, 27247, 27267, 27287, 27308, 27330, 27353, +27374, 27394, 27414, 27436, 27457, 27477, 27498, 27518, 27540, 27562, 27583, 27603, 27623, 27643, 27663, 27683, +27704, 27724, 27744, 27764, 27784, 27804, 27824, 27844, 27865, 27885, 27905, 27926, 27946, 27966, 27992, 28012, +28032, 28052, 28074, 28094, 28114, 28134, 28154, 28185, 28205, 28225, 28245, 28265, 28296, 28316, 28336, 28356, +28376, 28396, 28416, 28436, 28457, 28478, 28498, 28518, 28538, 28558, 28578, 28598, 28618, 28638, 28658, 28678, +28698, 28719, 28739, 28759, 28779, 28802, 28822, 28843, 28869, 28889, 28911, 28932, 28953, 28974, 28994, 29014, +29034, 29056, 29076, 29096, 29116, 29136, 29156, 29176, 29196, 29218, 29238, 29258, 29278, 29298, 29318, 29338, +29358, 29378, 29398, 29418, 29438, 29458, 29478, 29498, 29518, 29538, 29558, 29578, 29599, 29619, 29639, 29659, +29684, 29704, 29725, 29745, 29766, 29786, 29806, 29827, 29847, 29867, 29887, 29908, 29928, 29949, 29969, 29989, +30009, 30030, 30050, 30070, 30090, 30114, 30134, 30154, 30174, 30194, 30216, 30236, 30256, 30278, 30298, 30318, +30338, 30358, 30378, 30398, 30418, 30438, 30458, 30480, 30501, 30521, 30541, 30561, 30585, 30605, 30625, 30645, +30665, 30686, 30706, 30726, 30749, 30769, 30789, 30812, 30832, 30852, 30872, 30892, 30913, 30933, 30953, 30973, +30993, 31013, 31033, 31055, 31075, 31097, 31117, 31137, 31158, 31179, 31199, 31222, 31242, 31262, 31287, 31307, +31327, 31348, 31368, 31390, 31410, 31431, 31455, 31478, 31498, 31518, 31538, 31558, 31584, 31604, 31624, 31644, +31665, 31686, 31706, 31728, 31749, 31769, 31789, 31811, 31831, 31851, 31871, 31892, 31912, 31932, 31952, 31975, +31995, 32015, 32040, 32060, 32080, 32102, 32122, 32142, 32162, 32183, 32203, 32223, 32243, 32264, 32284, 32304, +32324, 32344, 32365, 32385, 32405, 32566, 32586, 32606, 32626, 32646, 32666, 32687, 32707, 32727, 32747, 32767, +32788, 32808, 32829, 32849, 32871, 32893, 32914, 32937, 32962, 32982, 33005, 33025, 33045, 33065, 33085, 33105, +33125, 33145, 33165, 33186, 33207, 33228, 33248, 33268, 33288, 33308, 33330, 33351, 33371, 33391, 33411, 33432, +33452, 33472, 33492, 33512, 33534, 33558, 33578, 33599, 33619, 33651, 33671, 33691, 33711, 33731, 33751, 33771, +33791, 33811, 33833, 33853, 33873, 33893, 33913, 33933, 33953, 33974, 33994, 34023, 34043, 34063, 34083, 34107, +34129, 34149, 34169, 34189, 34209, 34229, 34249, 34269, 34289, 34309, 34329, 34349, 34371, 34393, 34413, 34437, +34457, 34479, 34499, 34519, 34539, 34560, 34584, 34604, 34624, 34644, 34664, 34689, 34710, 34730, 34750, 34770, +34790, 34810, 34832, 34852, 34872, 34892, 34913, 34933, 34953, 34974, 34994, 35017, 35037, 35057, 35077, 35097, +35117, 35137, 35158, 35178, 35198, 35219, 35242, 35262, 35282, 35302, 35322, 35342, 35362, 35382, 35402, 35422, +35442, 35462, 35482, 35504, 35524, 35544, 35565, 35585, 35605, 35626, 35646, 35666, 35686, 35706, 35726, 35895, +35915, 35935, 35955, 35977, 35997, 36018, 36039, 36060, 36080, 36100, 36121, 36196, 36216, 36236, 36256, 36276, +36296, 36316, 36336, 36356, 36376, 36398, 36418, 36438, 36458, 36481, 36501, 36521, 36541, 36561, 36581, 36601, +36621, 36643, 36663, 36683, 36703, 36763, 36783, 36804, 36832, 36852, 36875, 36895, 36916, 36937, 36957, 36978, +36998, 37019, 37039, 37059, 37079, 37099, 37119, 37140, 37160, 37182, 37202, 37224, 37248, 37273, 37293, 37313, +37333, 37353, 37373, 37393, 37413, 37433, 37453, 37473, 37494, 37514, 37536, 37556, 37576, 37597, 37617, 37638, +37658, 37678, 37702, 37722, 37744, 37768, 37789, 37809, 37831, 37852, 37877, 37897, 37920, 37941, 37961, 37981, +38001, 38263, 38283, 38303, 38325, 38345, 38366, 38428, 38448, 38468, 38488, 38508, 38528, 38548, 38568, 38588, +38610, 38632, 38653, 38673, 38693, 38713, 38738, 38758, 38778, 38798, 38818, 38838, 38859, 38879, 38899, 38919, +38939, 38959, 38979, 38999, 39019, 39080, 39100, 39131, 39151, 39171, 39191, 39211, 39231, 39251, 39318, 39339, +39361, 39381, 39401, 39421, 39441, 39461, 39481, 39501, 39522, 39592, 39612, 39632, 39654, 39674, 39694, 39714, +39735, 39755, 39775, 39796, 39816, 39838, 39861, 39881, 39902, 39927, 39947, 39969, 39990, 40010, 40030, 40051, +40165, 40185, 40208, 40229, 40251, 40271, 40295, 40315, 40336, 40356, 40376, 40396, 40417, 40437, 40457, 40477, +40565, 40585, 40605, 40628, 40648, 40668, 40688, 40710, 40730, 40750, 40770, 40790, 40810, 40830, 40850, 57344, +57364, 57384, 57404, 57424, 57444, 57464, 57484, 57504, 57524, 57544, 57564, 57584, 57604, 57624, 57644, 57664, +57684, 57704, 57724, 57744, 57764, 57784, 57804, 57824, 57844, 57864, 57884, 57904, 57924, 57944, 57964, 57984, +58004, 58024, 58044, 58064, 58084, 58104, 58124, 58144, 58164, 58184, 58204, 58224, 58244, 58264, 58284, 58304, +58324, 58344, 58364, 58384, 58404, 58424, 58444, 58464, 58484, 58504, 58524, 58544, 58564, 58584, 58604, 58624, +58644, 58664, 58684, 58704, 58724, 58744, 58764, 58784, 58804, 58824, 58844, 58864, 58884, 58904, 58924, 58944, +58964, 58984, 59004, 59024, 59044, 59064, 59084, 59104, 59124, 59144, 59164, 59184, 59204, 59224, 59244, 59264, +59284, 59304, 59324, 59344, 59364, 59384, 59404, 59424, 59444, 59464, 59484, 59504, 59524, 59544, 59564, 59584, +59604, 59624, 59644, 59664, 59684, 59704, 59724, 59744, 59764, 59784, 59804, 59824, 59844, 59864, 59884, 59904, +59924, 59944, 59964, 59984, 60004, 60024, 60044, 60064, 60084, 60104, 60124, 60144, 60164, 60184, 60204, 60224, +60244, 60264, 60284, 60304, 60324, 60344, 60364, 60384, 60404, 60424, 60444, 60464, 60484, 60504, 60524, 60544, +60564, 60584, 60604, 60624, 60644, 60664, 60684, 60704, 60724, 60744, 60764, 60784, 60804, 60824, 60844, 60864, +60884, 60904, 60924, 60944, 60964, 60984, 61004, 61024, 61044, 61064, 61084, 61104, 61124, 61144, 61164, 61184, +61204, 61224, 61244, 61264, 61284, 61304, 61324, 61344, 61364, 61384, 61404, 61424, 61444, 61464, 61484, 61504, +61524, 61544, 61564, 61584, 61604, 61624, 61644, 61664, 61684, 61704, 61724, 61744, 61764, 61784, 61804, 61824, +61844, 61864, 61884, 61904, 61924, 61944, 61964, 61984, 62004, 62024, 62044, 62064, 62084, 62104, 62124, 62144, +62164, 62184, 62204, 62224, 62244, 62264, 62284, 62304, 62324, 62344, 62364, 62384, 62404, 62424, 62444, 62464, +62484, 62504, 62524, 62544, 62564, 62584, 62604, 62624, 62644, 62664, 62684, 62704, 62724, 62744, 62764, 62784, +62804, 62824, 62844, 62864, 62884, 62904, 62924, 62944, 62964, 62984, 63004, 63024, 63044, 63064, 63084, 63104, +63124, 63144, 63164, 63184, 63204, 63224, 63244, 63264, 63284, 63304, 63324, 63344, 63364, 63384, 63404, 63424, +63444, 63464, 63484, 63504, 63524, 63544, 63736, 64012, 65072, 65092, 65113, 65281, 65301, 65321, 65343, 65363, +65504 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 161, 177, 161, 194, 162, 88, 161, 211, 161, 80, 161, 209, 161, 210, 163, +190, 163, 188, 163, 68, 163, 87, 163, 100, 161, 86, 161, 69, 161, 176, 163, +225, 162, 74, 162, 185, 161, 246, 162, 65, 161, 228, 161, 220, 161, 216, 161, +242, 161, 233, 162, 119, 162, 124, 162, 115, 249, 249, 249, 231, 162, 98, 162, +121, 161, 182, 161, 187, 162, 168, 161, 185, 161, 240, 161, 64, 161, 101, 162, +202, 163, 116, 163, 170, 161, 192, 162, 85, 162, 87, 164, 64, 165, 66, 164, +88, 201, 64, 168, 196, 168, 197, 164, 169, 168, 200, 173, 189, 164, 179, 201, +102, 165, 245, 201, 185, 201, 172, 201, 173, 202, 100, 166, 243, 168, 216, 203, +181, 168, 221, 171, 86, 171, 89, 205, 235, 205, 239, 173, 206, 173, 207, 173, +208, 173, 200, 212, 103, 176, 183, 176, 175, 216, 89, 179, 195, 220, 195, 220, +185, 224, 254, 187, 248, 187, 252, 192, 118, 195, 95, 165, 251, 162, 90, 166, +64, 201, 78, 203, 205, 167, 77, 208, 225, 232, 249, 185, 185, 164, 193, 202, +108, 168, 236, 205, 240, 208, 231, 212, 108, 185, 187, 241, 237, 167, 86, 168, +240, 176, 199, 182, 211, 164, 99, 208, 238, 201, 193, 243, 253, 201, 109, 165, +101, 167, 90, 201, 196, 208, 239, 188, 70, 164, 83, 173, 238, 165, 107, 201, +197, 167, 103, 202, 118, 202, 122, 203, 235, 203, 230, 203, 224, 206, 72, 206, +69, 171, 117, 208, 241, 209, 66, 209, 71, 208, 240, 212, 168, 176, 221, 176, +229, 216, 106, 179, 227, 179, 231, 179, 229, 182, 222, 220, 203, 182, 226, 225, +83, 185, 192, 188, 83, 216, 107, 190, 178, 233, 67, 236, 201, 194, 80, 241, +244, 245, 198, 248, 165, 202, 168, 171, 170, 182, 234, 166, 98, 167, 163, 202, +175, 169, 90, 203, 251, 206, 90, 171, 174, 209, 82, 209, 74, 176, 240, 212, +178, 212, 182, 216, 169, 179, 247, 216, 167, 220, 235, 220, 241, 185, 214, 188, +89, 229, 76, 190, 195, 194, 82, 167, 167, 201, 90, 201, 112, 164, 210, 202, +177, 169, 98, 185, 221, 166, 110, 167, 170, 202, 178, 204, 69, 204, 71, 171, +187, 206, 110, 174, 91, 174, 87, 212, 212, 176, 251, 212, 222, 180, 64, 216, +199, 216, 183, 183, 64, 220, 243, 225, 118, 225, 115, 229, 94, 233, 83, 236, +213, 196, 93, 166, 114, 174, 93, 197, 112, 204, 87, 209, 102, 177, 74, 180, +74, 185, 231, 171, 202, 201, 212, 202, 191, 167, 192, 209, 107, 192, 171, 201, +214, 167, 193, 204, 92, 169, 164, 206, 123, 174, 111, 174, 108, 177, 88, 212, +253, 216, 234, 216, 225, 221, 86, 225, 169, 225, 175, 229, 107, 233, 98, 196, +96, 164, 116, 164, 118, 166, 124, 169, 170, 177, 98, 221, 90, 188, 109, 165, +173, 167, 200, 206, 184, 206, 181, 180, 92, 225, 181, 195, 102, 165, 175, 164, +222, 169, 184, 221, 98, 204, 116, 177, 109, 204, 119, 174, 124, 216, 246, 185, +253, 167, 212, 202, 221, 169, 192, 204, 175, 171, 228, 204, 125, 171, 237, 209, +125, 206, 209, 209, 168, 209, 171, 213, 85, 216, 253, 177, 166, 180, 107, 217, +79, 217, 75, 225, 194, 221, 113, 225, 206, 180, 110, 188, 161, 188, 166, 188, +171, 233, 162, 233, 125, 236, 227, 195, 106, 201, 124, 180, 117, 194, 87, 174, +176, 166, 170, 167, 232, 202, 231, 167, 220, 169, 220, 169, 215, 169, 221, 206, +218, 174, 179, 206, 225, 174, 193, 209, 189, 174, 189, 213, 103, 177, 204, 213, +113, 177, 180, 213, 107, 180, 161, 221, 183, 183, 112, 221, 178, 221, 185, 221, +162, 186, 75, 225, 239, 225, 230, 229, 175, 188, 190, 190, 223, 190, 225, 236, +237, 239, 215, 242, 67, 197, 117, 167, 241, 177, 211, 180, 178, 188, 197, 217, +121, 225, 245, 236, 240, 177, 219, 244, 79, 202, 250, 170, 64, 206, 239, 172, +82, 174, 207, 213, 172, 180, 182, 183, 121, 183, 122, 188, 199, 190, 231, 239, +220, 197, 206, 179, 204, 174, 210, 164, 236, 201, 245, 167, 247, 170, 87, 170, +81, 204, 214, 207, 91, 207, 81, 207, 67, 172, 90, 209, 236, 209, 238, 209, +242, 209, 232, 213, 196, 177, 236, 177, 234, 177, 239, 177, 243, 180, 198, 217, +175, 217, 172, 217, 216, 221, 210, 221, 204, 221, 205, 221, 229, 226, 74, 226, +90, 226, 96, 225, 254, 229, 213, 229, 235, 188, 212, 188, 207, 233, 194, 233, +221, 233, 203, 233, 212, 237, 65, 192, 208, 194, 99, 194, 103, 242, 80, 244, +89, 245, 206, 198, 86, 209, 245, 221, 250, 233, 222, 172, 110, 204, 235, 217, +222, 233, 226, 183, 181, 183, 182, 210, 67, 221, 253, 164, 243, 174, 240, 165, +195, 202, 64, 166, 192, 168, 88, 168, 72, 203, 88, 205, 75, 170, 110, 204, +242, 204, 253, 207, 161, 210, 100, 172, 120, 172, 163, 210, 76, 175, 64, 210, +98, 175, 75, 178, 101, 213, 240, 178, 89, 178, 104, 178, 76, 181, 65, 180, +244, 217, 243, 218, 81, 181, 70, 217, 236, 183, 200, 222, 85, 183, 201, 222, +93, 186, 173, 230, 83, 186, 116, 186, 120, 186, 121, 230, 77, 188, 227, 188, +235, 188, 234, 234, 64, 191, 71, 233, 244, 237, 87, 237, 88, 194, 112, 195, +118, 244, 93, 245, 211, 246, 234, 164, 245, 205, 88, 205, 87, 172, 175, 210, +119, 175, 79, 178, 109, 214, 79, 181, 72, 218, 92, 222, 119, 183, 220, 222, +117, 226, 189, 186, 178, 188, 247, 234, 85, 191, 77, 237, 96, 194, 119, 242, +105, 247, 230, 164, 247, 207, 185, 202, 66, 172, 185, 218, 106, 230, 116, 201, +165, 168, 103, 205, 92, 207, 195, 210, 166, 218, 109, 218, 118, 222, 173, 188, +250, 230, 161, 239, 254, 201, 167, 170, 179, 172, 197, 207, 209, 210, 181, 214, +120, 214, 121, 218, 167, 218, 164, 222, 188, 183, 228, 226, 212, 188, 254, 237, +102, 237, 104, 194, 123, 196, 237, 205, 111, 222, 194, 237, 112, 181, 99, 203, +110, 172, 202, 178, 166, 183, 237, 197, 124, 172, 207, 210, 201, 178, 172, 181, +108, 183, 242, 226, 219, 230, 179, 234, 115, 192, 247, 240, 80, 197, 125, 168, +109, 181, 112, 244, 113, 244, 114, 178, 176, 234, 117, 207, 231, 210, 207, 214, +176, 214, 168, 218, 189, 186, 206, 184, 64, 230, 188, 234, 120, 237, 122, 242, +121, 218, 195, 244, 120, 207, 234, 175, 124, 210, 229, 214, 186, 218, 200, 218, +205, 222, 232, 184, 75, 226, 245, 186, 207, 189, 87, 234, 163, 237, 166, 240, +93, 244, 121, 248, 250, 210, 232, 214, 192, 222, 246, 186, 215, 230, 204, 248, +183, 172, 238, 175, 178, 214, 198, 218, 215, 184, 92, 189, 94, 191, 114, 240, +96, 165, 222, 175, 183, 223, 68, 230, 211, 196, 117, 179, 186, 196, 118, 211, +69, 178, 199, 214, 218, 181, 167, 184, 97, 223, 73, 227, 78, 227, 79, 189, +99, 189, 102, 234, 189, 237, 203, 237, 186, 240, 99, 240, 102, 196, 120, 246, +250, 248, 252, 208, 71, 214, 222, 218, 233, 227, 96, 234, 202, 194, 179, 168, +116, 211, 89, 214, 240, 178, 209, 181, 178, 181, 185, 223, 93, 223, 94, 186, +247, 227, 99, 227, 110, 230, 240, 229, 114, 191, 162, 234, 212, 237, 220, 237, +223, 240, 113, 195, 181, 244, 174, 247, 238, 166, 206, 242, 186, 211, 93, 184, +112, 242, 188, 178, 220, 189, 126, 211, 99, 219, 68, 230, 246, 244, 177, 208, +84, 191, 174, 175, 212, 219, 69, 230, 252, 197, 165, 203, 119, 170, 211, 208, +91, 173, 68, 175, 218, 211, 109, 215, 78, 178, 231, 219, 79, 181, 198, 184, +123, 184, 161, 227, 168, 231, 66, 234, 242, 237, 234, 249, 67, 173, 80, 191, +179, 181, 207, 215, 87, 184, 165, 237, 240, 168, 125, 203, 162, 205, 182, 170, +226, 205, 179, 173, 97, 208, 111, 208, 108, 211, 168, 211, 164, 211, 122, 211, +177, 215, 94, 215, 119, 215, 108, 215, 113, 219, 167, 219, 172, 219, 106, 219, +113, 219, 166, 223, 199, 184, 168, 223, 177, 223, 176, 223, 173, 223, 175, 227, +174, 227, 203, 187, 99, 231, 115, 231, 88, 231, 78, 189, 177, 231, 77, 235, +70, 235, 86, 238, 82, 238, 74, 238, 67, 240, 170, 194, 199, 195, 192, 242, +199, 244, 193, 245, 247, 196, 245, 248, 188, 215, 123, 205, 201, 211, 196, 211, +198, 179, 76, 215, 174, 219, 189, 219, 185, 184, 190, 187, 106, 227, 224, 227, +217, 231, 168, 189, 190, 235, 97, 235, 98, 238, 89, 238, 88, 193, 175, 240, +188, 242, 220, 244, 197, 246, 68, 248, 189, 166, 230, 191, 197, 211, 210, 215, +178, 179, 79, 219, 205, 219, 207, 184, 203, 227, 247, 231, 194, 231, 200, 235, +115, 238, 117, 195, 205, 196, 251, 202, 80, 179, 86, 191, 203, 247, 84, 168, +164, 224, 68, 246, 76, 176, 81, 179, 96, 182, 70, 219, 226, 181, 252, 184, +211, 224, 70, 187, 166, 189, 214, 189, 206, 231, 224, 191, 217, 191, 214, 238, +169, 240, 218, 240, 227, 243, 66, 196, 181, 246, 80, 248, 65, 168, 166, 224, +83, 219, 229, 193, 199, 184, 232, 168, 169, 184, 237, 184, 234, 189, 231, 235, +183, 240, 244, 248, 69, 168, 170, 211, 228, 224, 95, 231, 239, 173, 119, 219, +249, 219, 245, 224, 103, 228, 99, 232, 66, 231, 247, 191, 228, 240, 251, 243, +82, 196, 188, 247, 93, 249, 171, 235, 200, 211, 232, 220, 67, 220, 64, 228, +103, 232, 76, 235, 206, 241, 73, 197, 70, 168, 175, 197, 71, 168, 180, 208, +182, 176, 106, 215, 227, 179, 116, 220, 78, 224, 162, 187, 190, 191, 240, 235, +211, 202, 84, 205, 213, 173, 168, 211, 251, 215, 239, 220, 83, 224, 169, 241, +74, 241, 77, 176, 115, 221, 115, 232, 97, 238, 200, 243, 95, 198, 93, 212, +66, 179, 171, 220, 109, 182, 122, 220, 100, 185, 101, 185, 99, 224, 193, 228, +120, 228, 176, 228, 123, 232, 164, 232, 116, 232, 110, 232, 105, 235, 225, 191, +254, 192, 68, 235, 234, 193, 237, 193, 236, 241, 96, 241, 88, 241, 100, 243, +97, 195, 237, 244, 243, 244, 251, 244, 234, 197, 75, 247, 111, 248, 76, 249, +85, 170, 248, 182, 125, 224, 205, 236, 77, 238, 240, 245, 69, 170, 250, 203, +173, 170, 254, 176, 164, 179, 181, 220, 163, 185, 106, 192, 72, 212, 71, 187, +220, 171, 66, 224, 215, 192, 76, 241, 120, 197, 82, 171, 67, 192, 83, 228, +192, 232, 178, 241, 161, 243, 163, 173, 179, 243, 166, 173, 181, 220, 172, 232, +188, 236, 90, 239, 74, 243, 170, 197, 184, 173, 183, 196, 66, 173, 184, 182, +186, 187, 229, 232, 196, 239, 76, 195, 73, 245, 89, 173, 186, 249, 178, 187, +233, 190, 114, 236, 104, 239, 96, 241, 180, 243, 182, 246, 120, 197, 187, 198, +106, 176, 169, 192, 102, 247, 164, 187, 236, 236, 111, 243, 196, 198, 75, 243, +198, 241, 194, 228, 225, 232, 219, 236, 162, 239, 108, 241, 200, 195, 85, 243, +202, 245, 108, 245, 106, 246, 177, 247, 182, 248, 90, 248, 218, 249, 120, 179, +190, 232, 235, 236, 172, 236, 163, 194, 69, 241, 209, 239, 120, 243, 235, 245, +125, 245, 121, 197, 100, 246, 197, 248, 105, 247, 196, 248, 228, 249, 207, 179, +191, 239, 171, 197, 101, 196, 84, 239, 174, 194, 74, 247, 200, 248, 120, 246, +208, 245, 185, 247, 204, 243, 250, 197, 198, 249, 211, 246, 213, 250, 64, 250, +84, 250, 104, 250, 124, 250, 178, 250, 198, 250, 218, 250, 238, 251, 67, 251, +87, 251, 107, 251, 161, 251, 181, 251, 201, 251, 221, 251, 241, 252, 70, 252, +90, 252, 110, 252, 164, 252, 184, 252, 204, 252, 224, 252, 244, 253, 73, 253, +93, 253, 113, 253, 167, 253, 187, 253, 207, 253, 227, 253, 247, 254, 76, 254, +96, 254, 116, 254, 170, 254, 190, 254, 210, 254, 230, 254, 250, 142, 79, 142, +99, 142, 119, 142, 173, 142, 193, 142, 213, 142, 233, 142, 253, 143, 82, 143, +102, 143, 122, 143, 176, 143, 196, 143, 216, 143, 236, 144, 65, 144, 85, 144, +105, 144, 125, 144, 179, 144, 199, 144, 219, 144, 239, 145, 68, 145, 88, 145, +108, 145, 162, 145, 182, 145, 202, 145, 222, 145, 242, 146, 71, 146, 91, 146, +111, 146, 165, 146, 185, 146, 205, 146, 225, 146, 245, 147, 74, 147, 94, 147, +114, 147, 168, 147, 188, 147, 208, 147, 228, 147, 248, 148, 77, 148, 97, 148, +117, 148, 171, 148, 191, 148, 211, 148, 231, 148, 251, 149, 80, 149, 100, 149, +120, 149, 174, 149, 194, 149, 214, 149, 234, 149, 254, 150, 83, 150, 103, 150, +123, 150, 177, 150, 197, 150, 217, 150, 237, 151, 66, 151, 86, 151, 106, 151, +126, 151, 180, 151, 200, 151, 220, 151, 240, 152, 69, 152, 89, 152, 109, 152, +163, 152, 183, 152, 203, 152, 223, 152, 243, 153, 72, 153, 92, 153, 112, 153, +166, 153, 186, 153, 206, 153, 226, 153, 246, 154, 75, 154, 95, 154, 115, 154, +169, 154, 189, 154, 209, 154, 229, 154, 249, 155, 78, 155, 98, 155, 118, 155, +172, 155, 192, 155, 212, 155, 232, 155, 252, 156, 81, 156, 101, 156, 121, 156, +175, 156, 195, 156, 215, 156, 235, 157, 64, 157, 84, 157, 104, 157, 124, 157, +178, 157, 198, 157, 218, 157, 238, 158, 67, 158, 87, 158, 107, 158, 161, 158, +181, 158, 201, 158, 221, 158, 241, 159, 70, 159, 90, 159, 110, 159, 164, 159, +184, 159, 204, 159, 224, 159, 244, 160, 73, 160, 93, 160, 113, 160, 167, 160, +187, 160, 207, 160, 227, 160, 247, 129, 76, 129, 96, 129, 116, 129, 170, 129, +190, 129, 210, 129, 230, 129, 250, 130, 79, 130, 99, 130, 119, 130, 173, 130, +193, 130, 213, 130, 233, 130, 253, 131, 82, 131, 102, 131, 122, 131, 176, 131, +196, 131, 216, 131, 236, 132, 65, 132, 85, 132, 105, 132, 125, 132, 179, 132, +199, 132, 219, 132, 239, 133, 68, 133, 88, 133, 108, 133, 162, 133, 182, 133, +202, 133, 222, 133, 242, 134, 71, 134, 91, 134, 111, 134, 165, 134, 185, 134, +205, 134, 225, 134, 245, 135, 74, 135, 94, 135, 114, 135, 168, 135, 188, 135, +208, 135, 228, 135, 248, 136, 77, 136, 97, 136, 117, 136, 171, 136, 191, 136, +211, 136, 231, 136, 251, 137, 80, 137, 100, 137, 120, 137, 174, 137, 194, 137, +214, 137, 234, 137, 254, 138, 83, 138, 103, 138, 123, 138, 177, 138, 197, 138, +217, 138, 237, 139, 66, 139, 86, 139, 106, 139, 126, 139, 180, 139, 200, 139, +220, 139, 240, 140, 69, 140, 89, 140, 109, 140, 163, 140, 183, 140, 203, 140, +223, 140, 243, 141, 72, 141, 92, 141, 112, 141, 166, 141, 186, 141, 206, 141, +226, 141, 246, 198, 172, 198, 192, 198, 212, 198, 232, 198, 252, 199, 81, 199, +101, 199, 121, 199, 175, 199, 195, 199, 215, 199, 235, 200, 64, 200, 84, 200, +104, 200, 124, 200, 178, 200, 198, 200, 218, 200, 238, 255, 201, 74, 161, 74, +161, 124, 161, 125, 161, 73, 162, 180, 162, 215, 161, 196, 162, 251, 162, 70 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_EUC_JP.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_EUC_JP.java new file mode 100644 index 0000000..995f757 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_EUC_JP.java @@ -0,0 +1,533 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +// SEE correspondig_Android test class: +//@TestTargetClass(targets.Charsets.EUC_JP.class) + +public class Charset_MultiByte_EUC_JP extends Charset_AbstractTest { + + protected void setUp() throws Exception { + charsetName = "EUC-JP"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +161, 162, 163, 164, /*165,*/ 166, 167, 168, 169, 170, 172, 174, 175, 176, 177, 180, +182, 184, 186, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, +204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, +221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, +237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, +253, 254, 255, 256, 266, 278, 288, 298, 308, 318, 328, 338, 348, 358, 368, 378, +461, 471, 501, 711, 728, 900, 910, 920, 931, 941, 951, 961, 971, 1025, 1035, 1045, +1055, 1065, 1075, 1085, 1095, 1105, 1115, 8208, 8220, 8230, 8240, 8251, 8451, 8470, 8482, 8592, +8658, 8704, 8715, 8730, 8743, 8756, 8786, 8800, 8810, 8834, 8869, 8978, 9472, 9484, 9495, 9507, +9519, 9531, 9547, 9632, 9650, 9660, 9670, 9711, 9733, 9792, 9834, 12288, 12298, 12308, 12353, 12363, +12373, 12383, 12393, 12403, 12413, 12423, 12433, 12443, 12453, 12463, 12473, 12483, 12493, 12503, 12513, 12523, +12533, 19968, 19978, 19988, 19998, 20008, 20018, 20028, 20039, 20049, 20060, 20072, 20083, 20094, 20104, 20114, +20124, 20134, 20144, 20154, 20164, 20174, 20184, 20194, 20205, 20215, 20225, 20235, 20245, 20270, 20280, 20290, +20300, 20310, 20320, 20330, 20341, 20351, 20361, 20371, 20381, 20395, 20405, 20415, 20425, 20436, 20447, 20462, +20472, 20484, 20494, 20504, 20514, 20524, 20534, 20544, 20554, 20565, 20575, 20586, 20596, 20608, 20618, 20628, +20638, 20650, 20660, 20670, 20681, 20691, 20701, 20711, 20721, 20731, 20742, 20752, 20762, 20775, 20785, 20795, +20805, 20815, 20826, 20836, 20846, 20856, 20866, 20876, 20886, 20896, 20906, 20916, 20926, 20936, 20946, 20956, +20966, 20976, 20986, 20996, 21006, 21016, 21026, 21038, 21048, 21059, 21069, 21079, 21089, 21102, 21112, 21122, +21132, 21142, 21152, 21162, 21172, 21182, 21192, 21202, 21212, 21222, 21232, 21242, 21253, 21263, 21273, 21283, +21293, 21304, 21314, 21324, 21335, 21345, 21356, 21367, 21378, 21390, 21400, 21412, 21422, 21432, 21442, 21452, +21462, 21472, 21482, 21493, 21505, 21515, 21530, 21542, 21553, 21563, 21574, 21585, 21598, 21608, 21619, 21629, +21640, 21650, 21660, 21670, 21681, 21691, 21702, 21720, 21730, 21740, 21750, 21760, 21772, 21782, 21802, 21813, +21824, 21834, 21846, 21856, 21883, 21894, 21905, 21916, 21927, 21938, 21951, 21961, 21971, 21982, 21993, 22006, +22021, 22031, 22041, 22057, 22067, 22077, 22089, 22100, 22110, 22120, 22130, 22144, 22154, 22164, 22174, 22184, +22195, 22206, 22216, 22227, 22237, 22247, 22257, 22269, 22279, 22289, 22299, 22309, 22319, 22331, 22341, 22351, +22369, 22379, 22389, 22399, 22409, 22419, 22429, 22439, 22451, 22461, 22471, 22482, 22492, 22502, 22512, 22522, +22532, 22549, 22559, 22570, 22580, 22591, 22601, 22612, 22622, 22632, 22642, 22652, 22663, 22675, 22685, 22696, +22706, 22716, 22727, 22737, 22748, 22761, 22771, 22781, 22793, 22803, 22813, 22823, 22833, 22846, 22856, 22866, +22877, 22887, 22898, 22908, 22922, 22933, 22943, 22956, 22967, 22977, 22987, 23001, 23011, 23022, 23035, 23049, +23059, 23070, 23080, 23093, 23104, 23116, 23130, 23141, 23159, 23179, 23190, 23200, 23212, 23224, 23234, 23244, +23254, 23264, 23274, 23285, 23296, 23307, 23318, 23329, 23340, 23350, 23360, 23371, 23381, 23391, 23401, 23411, +23421, 23431, 23441, 23451, 23461, 23471, 23481, 23491, 23501, 23511, 23521, 23531, 23541, 23551, 23561, 23571, +23582, 23592, 23602, 23612, 23622, 23632, 23642, 23652, 23662, 23673, 23687, 23697, 23709, 23720, 23730, 23740, +23751, 23762, 23773, 23784, 23794, 23805, 23815, 23825, 23835, 23846, 23857, 23869, 23880, 23890, 23900, 23913, +23923, 23934, 23944, 23954, 23965, 23975, 23986, 23996, 24007, 24018, 24029, 24039, 24049, 24059, 24070, 24081, +24091, 24101, 24111, 24125, 24135, 24145, 24155, 24168, 24178, 24188, 24199, 24213, 24224, 24234, 24245, 24255, +24265, 24275, 24285, 24296, 24307, 24318, 24328, 24339, 24349, 24359, 24369, 24379, 24389, 24400, 24411, 24422, +24432, 24442, 24452, 24463, 24473, 24484, 24494, 24504, 24515, 24525, 24535, 24545, 24555, 24565, 24575, 24586, +24596, 24607, 24617, 24627, 24640, 24650, 24660, 24671, 24681, 24693, 24703, 24713, 24723, 24733, 24743, 24753, +24763, 24773, 24783, 24793, 24803, 24816, 24826, 24838, 24848, 24858, 24871, 24881, 24892, 24902, 24915, 24925, +24935, 24945, 24955, 24967, 24977, 24988, 24999, 25010, 25020, 25030, 25040, 25052, 25062, 25074, 25084, 25095, +25105, 25115, 25126, 25136, 25147, 25158, 25168, 25178, 25188, 25198, 25209, 25219, 25229, 25239, 25254, 25265, +25275, 25285, 25295, 25305, 25322, 25332, 25342, 25352, 25363, 25375, 25385, 25397, 25407, 25417, 25427, 25445, +25457, 25467, 25479, 25490, 25502, 25512, 25522, 25533, 25544, 25554, 25564, 25577, 25587, 25606, 25616, 25628, +25638, 25648, 25658, 25675, 25688, 25699, 25709, 25720, 25731, 25743, 25753, 25763, 25773, 25785, 25796, 25806, +25816, 25826, 25836, 25846, 25856, 25866, 25876, 25886, 25897, 25908, 25918, 25928, 25938, 25949, 25959, 25970, +25981, 25991, 26001, 26011, 26021, 26031, 26041, 26051, 26062, 26072, 26082, 26092, 26105, 26115, 26125, 26140, +26150, 26160, 26172, 26182, 26193, 26203, 26214, 26224, 26234, 26244, 26254, 26264, 26274, 26285, 26296, 26306, +26316, 26326, 26336, 26347, 26357, 26367, 26377, 26387, 26397, 26407, 26417, 26429, 26439, 26449, 26460, 26470, +26480, 26491, 26501, 26511, 26521, 26534, 26544, 26555, 26565, 26575, 26585, 26596, 26606, 26617, 26627, 26643, +26653, 26663, 26673, 26683, 26693, 26704, 26715, 26727, 26737, 26747, 26757, 26767, 26778, 26789, 26799, 26809, +26820, 26831, 26841, 26851, 26861, 26873, 26884, 26894, 26905, 26915, 26928, 26939, 26949, 26963, 26973, 26984, +26994, 27004, 27018, 27028, 27040, 27051, 27063, 27073, 27083, 27094, 27106, 27117, 27129, 27139, 27151, 27161, +27171, 27182, 27192, 27204, 27214, 27224, 27234, 27249, 27262, 27273, 27287, 27298, 27308, 27320, 27330, 27340, +27350, 27364, 27376, 27386, 27396, 27407, 27419, 27431, 27442, 27453, 27463, 27474, 27485, 27495, 27507, 27517, +27529, 27541, 27551, 27561, 27571, 27581, 27593, 27603, 27615, 27627, 27639, 27650, 27661, 27671, 27683, 27694, +27704, 27714, 27725, 27735, 27746, 27757, 27768, 27778, 27788, 27798, 27809, 27819, 27832, 27842, 27852, 27862, +27872, 27882, 27892, 27908, 27918, 27929, 27941, 27951, 27961, 27972, 27991, 28001, 28012, 28023, 28034, 28044, +28054, 28074, 28084, 28095, 28106, 28117, 28127, 28137, 28147, 28160, 28170, 28181, 28191, 28201, 28214, 28227, +28237, 28247, 28258, 28270, 28283, 28300, 28310, 28320, 28330, 28342, 28352, 28362, 28372, 28382, 28395, 28407, +28417, 28428, 28438, 28448, 28458, 28470, 28481, 28495, 28505, 28516, 28526, 28536, 28546, 28556, 28566, 28576, +28586, 28597, 28608, 28618, 28628, 28638, 28648, 28659, 28669, 28679, 28689, 28699, 28710, 28720, 28732, 28744, +28756, 28766, 28779, 28789, 28801, 28814, 28824, 28836, 28846, 28856, 28872, 28883, 28893, 28913, 28925, 28935, +28948, 28958, 28971, 28982, 28993, 29003, 29013, 29024, 29036, 29049, 29060, 29071, 29081, 29096, 29106, 29118, +29128, 29138, 29148, 29158, 29173, 29183, 29193, 29203, 29213, 29224, 29234, 29244, 29254, 29264, 29274, 29287, +29297, 29307, 29319, 29330, 29344, 29356, 29366, 29377, 29388, 29398, 29408, 29420, 29431, 29442, 29453, 29463, +29474, 29484, 29494, 29507, 29517, 29527, 29539, 29550, 29560, 29571, 29582, 29592, 29602, 29613, 29623, 29634, +29644, 29654, 29664, 29674, 29684, 29694, 29705, 29722, 29732, 29742, 29753, 29763, 29773, 29783, 29794, 29805, +29822, 29833, 29848, 29858, 29870, 29881, 29896, 29907, 29918, 29928, 29938, 29948, 29958, 29969, 29980, 29990, +30000, 30010, 30020, 30030, 30041, 30052, 30063, 30073, 30085, 30095, 30105, 30115, 30129, 30140, 30150, 30162, +30172, 30183, 30193, 30204, 30215, 30226, 30236, 30246, 30256, 30266, 30276, 30290, 30300, 30311, 30321, 30331, +30341, 30352, 30362, 30372, 30382, 30392, 30402, 30412, 30422, 30432, 30442, 30452, 30462, 30472, 30482, 30492, +30502, 30516, 30526, 30538, 30550, 30560, 30570, 30580, 30590, 30603, 30613, 30623, 30634, 30645, 30655, 30665, +30677, 30687, 30697, 30707, 30722, 30732, 30749, 30759, 30770, 30783, 30796, 30812, 30824, 30834, 30844, 30854, +30865, 30877, 30887, 30897, 30907, 30917, 30928, 30938, 30948, 30959, 30970, 30982, 30992, 31002, 31013, 31025, +31035, 31045, 31055, 31066, 31077, 31090, 31100, 31114, 31124, 31137, 31147, 31160, 31170, 31183, 31194, 31204, +31216, 31227, 31239, 31249, 31259, 31271, 31281, 31291, 31301, 31311, 31321, 31331, 31341, 31352, 31362, 31376, +31390, 31401, 31411, 31423, 31433, 31443, 31453, 31464, 31476, 31486, 31496, 31508, 31518, 31528, 31539, 31549, +31559, 31569, 31581, 31591, 31601, 31620, 31630, 31640, 31653, 31663, 31674, 31684, 31695, 31705, 31716, 31730, +31740, 31750, 31761, 31771, 31781, 31793, 31805, 31818, 31828, 31838, 31849, 31859, 31869, 31879, 31890, 31902, +31912, 31922, 31932, 31943, 31954, 31964, 31974, 31986, 31998, 32008, 32018, 32028, 32038, 32048, 32058, 32068, +32078, 32089, 32099, 32110, 32120, 32130, 32140, 32150, 32162, 32172, 32182, 32194, 32204, 32215, 32225, 32235, +32245, 32256, 32266, 32277, 32287, 32299, 32309, 32319, 32330, 32340, 32350, 32361, 32371, 32381, 32391, 32401, +32411, 32566, 32579, 32589, 32600, 32611, 32621, 32631, 32642, 32652, 32662, 32673, 32685, 32696, 32707, 32718, +32731, 32741, 32751, 32761, 32771, 32781, 32791, 32801, 32812, 32822, 32832, 32842, 32854, 32864, 32877, 32887, +32897, 32907, 32918, 32929, 32939, 32952, 32963, 32973, 32983, 32993, 33005, 33016, 33026, 33046, 33056, 33068, +33081, 33093, 33104, 33119, 33129, 33140, 33151, 33162, 33173, 33184, 33198, 33208, 33218, 33229, 33239, 33249, +33259, 33269, 33279, 33289, 33299, 33309, 33320, 33330, 33344, 33355, 33366, 33376, 33386, 33396, 33406, 33417, +33428, 33439, 33449, 33459, 33469, 33488, 33498, 33508, 33519, 33529, 33539, 33550, 33560, 33570, 33580, 33590, +33600, 33610, 33620, 33648, 33659, 33669, 33682, 33692, 33702, 33713, 33725, 33735, 33745, 33756, 33768, 33778, +33788, 33798, 33809, 33824, 33834, 33845, 33861, 33871, 33881, 33891, 33901, 33911, 33921, 33931, 33941, 33951, +33961, 33972, 33982, 33992, 34003, 34023, 34033, 34043, 34054, 34064, 34074, 34084, 34095, 34109, 34120, 34130, +34140, 34152, 34167, 34177, 34187, 34199, 34210, 34220, 34230, 34241, 34251, 34261, 34271, 34281, 34291, 34302, +34314, 34326, 34337, 34349, 34360, 34370, 34381, 34391, 34401, 34411, 34421, 34440, 34451, 34465, 34475, 34485, +34495, 34505, 34516, 34526, 34537, 34552, 34562, 34573, 34584, 34595, 34606, 34617, 34627, 34637, 34647, 34657, +34670, 34680, 34690, 34700, 34711, 34722, 34732, 34746, 34756, 34766, 34777, 34787, 34797, 34807, 34817, 34827, +34837, 34847, 34861, 34873, 34883, 34893, 34903, 34913, 34923, 34933, 34943, 34955, 34966, 34976, 34986, 34996, +35006, 35018, 35028, 35038, 35048, 35058, 35068, 35078, 35088, 35098, 35109, 35120, 35130, 35140, 35151, 35162, +35172, 35182, 35194, 35206, 35216, 35226, 35237, 35247, 35258, 35282, 35292, 35302, 35313, 35325, 35335, 35345, +35355, 35365, 35375, 35386, 35397, 35408, 35419, 35429, 35440, 35450, 35460, 35471, 35481, 35491, 35501, 35511, +35522, 35532, 35542, 35552, 35563, 35573, 35583, 35594, 35604, 35614, 35624, 35635, 35646, 35656, 35666, 35676, +35686, 35696, 35708, 35722, 35732, 35742, 35895, 35905, 35915, 35925, 35937, 35947, 35957, 35970, 35980, 35992, +36002, 36012, 36022, 36032, 36042, 36053, 36064, 36074, 36085, 36095, 36105, 36115, 36196, 36206, 36223, 36234, +36245, 36255, 36267, 36277, 36288, 36298, 36308, 36319, 36330, 36340, 36351, 36361, 36372, 36382, 36394, 36404, +36416, 36426, 36436, 36446, 36457, 36468, 36481, 36491, 36501, 36513, 36523, 36533, 36544, 36554, 36564, 36575, +36587, 36599, 36610, 36620, 36630, 36640, 36650, 36660, 36670, 36681, 36691, 36701, 36763, 36773, 36783, 36794, +36804, 36814, 36826, 36836, 36846, 36856, 36866, 36876, 36886, 36896, 36906, 36916, 36926, 36937, 36947, 36957, +36967, 36978, 36988, 36999, 37009, 37019, 37029, 37039, 37053, 37063, 37074, 37084, 37096, 37108, 37118, 37128, +37138, 37148, 37159, 37169, 37180, 37191, 37202, 37217, 37228, 37239, 37249, 37259, 37269, 37281, 37291, 37301, +37311, 37321, 37331, 37341, 37351, 37361, 37371, 37381, 37392, 37404, 37414, 37424, 37434, 37444, 37454, 37464, +37474, 37486, 37496, 37507, 37517, 37527, 37540, 37551, 37561, 37571, 37581, 37591, 37601, 37612, 37624, 37634, +37645, 37656, 37666, 37676, 37686, 37700, 37712, 37722, 37732, 37742, 37754, 37768, 37778, 37790, 37800, 37812, +37825, 37835, 37846, 37857, 37879, 37889, 37901, 37911, 37921, 37931, 37941, 37951, 37962, 37973, 37983, 37994, +38005, 38015, 38263, 38274, 38284, 38294, 38304, 38315, 38326, 38339, 38349, 38360, 38370, 38428, 38438, 38449, +38459, 38475, 38486, 38497, 38508, 38518, 38529, 38539, 38549, 38559, 38569, 38579, 38592, 38602, 38613, 38623, +38633, 38646, 38656, 38666, 38678, 38689, 38704, 38717, 38728, 38738, 38748, 38758, 38769, 38779, 38789, 38799, +38809, 38819, 38829, 38840, 38851, 38861, 38871, 38881, 38893, 38903, 38913, 38924, 38934, 38944, 38955, 38965, +38980, 38990, 39000, 39010, 39020, 39080, 39092, 39103, 39116, 39131, 39141, 39151, 39164, 39175, 39185, 39195, +39206, 39217, 39227, 39237, 39248, 39259, 39318, 39333, 39344, 39354, 39364, 39376, 39386, 39399, 39409, 39419, +39429, 39439, 39449, 39459, 39469, 39479, 39489, 39499, 39509, 39519, 39529, 39592, 39602, 39612, 39622, 39632, +39643, 39653, 39663, 39673, 39683, 39693, 39704, 39714, 39725, 39735, 39745, 39755, 39765, 39777, 39787, 39797, +39807, 39817, 39827, 39837, 39847, 39857, 39867, 39878, 39888, 39899, 39909, 39919, 39929, 39940, 39951, 39961, +39971, 39981, 39991, 40001, 40014, 40024, 40035, 40046, 40056, 40165, 40176, 40194, 40206, 40216, 40227, 40239, +40250, 40260, 40272, 40284, 40297, 40310, 40323, 40333, 40343, 40353, 40363, 40373, 40383, 40393, 40403, 40414, +40425, 40435, 40445, 40455, 40465, 40475, 40565, 40575, 40587, 40597, 40607, 40617, 40627, 40638, 40648, 40658, +40668, 40679, 40689, 40699, 40711, 40721, 40731, 40742, 40753, 40763, 40773, 40783, 40794, 40806, 40816, 40826, +40845, 40855, 40865, 65281, 65291, 65301, 65311, 65321, 65331, 65341, 65351, 65361, 65371, 65381, 65391, 65401, +65411, 65421, 65431, 65507 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +143, 162, 194, 161, 241, 161, 242, 143, 162, 240, /*92,*/ 143, 162, 195, 161, 248, +161, 175, 143, 162, 237, 143, 162, 236, 162, 204, 143, 162, 238, 143, 162, 180, +161, 235, 161, 222, 161, 173, 162, 249, 143, 162, 177, 143, 162, 235, 143, 162, +196, 143, 170, 162, 143, 170, 161, 143, 170, 164, 143, 170, 170, 143, 170, 163, +143, 170, 169, 143, 169, 161, 143, 170, 174, 143, 170, 178, 143, 170, 177, 143, +170, 180, 143, 170, 179, 143, 170, 192, 143, 170, 191, 143, 170, 194, 143, 170, +193, 143, 170, 208, 143, 170, 210, 143, 170, 209, 143, 170, 212, 143, 170, 216, +143, 170, 211, 161, 223, 143, 169, 172, 143, 170, 227, 143, 170, 226, 143, 170, +229, 143, 170, 228, 143, 170, 242, 143, 169, 176, 143, 169, 206, 143, 171, 162, +143, 171, 161, 143, 171, 164, 143, 171, 170, 143, 171, 163, 143, 171, 169, 143, +169, 193, 143, 171, 174, 143, 171, 178, 143, 171, 177, 143, 171, 180, 143, 171, +179, 143, 171, 192, 143, 171, 191, 143, 171, 194, 143, 171, 193, 143, 169, 195, +143, 171, 208, 143, 171, 210, 143, 171, 209, 143, 171, 212, 143, 171, 216, 143, +171, 211, 161, 224, 143, 169, 204, 143, 171, 227, 143, 171, 226, 143, 171, 229, +143, 171, 228, 143, 171, 242, 143, 169, 208, 143, 171, 243, 143, 170, 167, 143, +170, 175, 143, 170, 182, 143, 170, 189, 143, 170, 197, 143, 170, 200, 143, 171, +203, 143, 171, 206, 143, 169, 173, 143, 170, 221, 143, 169, 175, 143, 170, 232, +143, 171, 245, 143, 170, 166, 143, 170, 237, 143, 171, 185, 143, 162, 176, 143, +162, 175, 143, 162, 184, 143, 166, 233, 166, 168, 166, 178, 143, 166, 242, 166, +199, 166, 209, 143, 166, 250, 167, 167, 143, 167, 203, 167, 166, 167, 177, 167, +187, 167, 212, 167, 223, 167, 233, 167, 215, 143, 167, 251, 161, 190, 161, 200, +161, 196, 162, 243, 162, 168, 161, 238, 143, 162, 241, 143, 162, 239, 162, 171, +162, 205, 162, 207, 162, 187, 162, 229, 162, 202, 161, 232, 162, 226, 161, 226, +162, 227, 162, 190, 162, 221, 162, 222, 168, 161, 168, 163, 168, 177, 168, 178, +168, 184, 168, 181, 168, 182, 162, 163, 162, 165, 162, 167, 162, 161, 162, 254, +161, 250, 161, 234, 162, 246, 161, 161, 161, 212, 161, 204, 164, 161, 164, 171, +164, 181, 164, 191, 164, 201, 164, 211, 164, 221, 164, 231, 164, 241, 161, 171, +165, 165, 165, 175, 165, 185, 165, 195, 165, 205, 165, 215, 165, 225, 165, 235, +165, 245, 176, 236, 190, 229, 179, 238, 190, 231, 143, 176, 169, 182, 250, 208, +167, 143, 176, 178, 143, 176, 179, 143, 176, 181, 143, 176, 183, 198, 253, 180, +165, 205, 189, 184, 223, 176, 161, 203, 242, 208, 183, 191, 205, 208, 188, 208, +186, 201, 213, 143, 176, 201, 208, 193, 208, 195, 180, 235, 143, 176, 214, 143, +176, 217, 143, 176, 221, 191, 173, 143, 176, 231, 143, 176, 235, 143, 176, 238, +143, 176, 223, 143, 176, 242, 202, 187, 187, 200, 143, 177, 162, 143, 177, 168, +176, 205, 213, 165, 191, 175, 202, 216, 143, 177, 187, 208, 215, 208, 216, 189, +164, 202, 240, 143, 177, 203, 143, 177, 207, 143, 177, 211, 143, 177, 216, 208, +235, 182, 230, 143, 177, 223, 143, 177, 228, 208, 243, 143, 177, 236, 143, 177, +242, 194, 166, 208, 250, 143, 177, 251, 143, 178, 163, 143, 178, 167, 143, 178, +172, 208, 253, 183, 185, 209, 161, 143, 178, 185, 143, 178, 189, 193, 206, 143, +178, 197, 202, 200, 143, 178, 202, 143, 178, 210, 209, 179, 143, 178, 218, 143, +178, 223, 209, 184, 189, 188, 143, 178, 231, 197, 222, 143, 178, 237, 209, 194, +197, 181, 209, 196, 209, 198, 209, 204, 180, 167, 209, 209, 186, 227, 143, 178, +252, 143, 179, 161, 143, 179, 164, 244, 165, 189, 232, 209, 224, 189, 208, 209, +227, 209, 230, 143, 179, 183, 143, 179, 184, 209, 233, 183, 244, 196, 230, 193, +176, 143, 179, 193, 143, 179, 199, 143, 179, 201, 143, 179, 203, 143, 179, 206, +143, 179, 209, 143, 179, 212, 178, 195, 197, 216, 207, 171, 179, 175, 143, 179, +232, 240, 213, 143, 179, 239, 210, 171, 143, 179, 246, 188, 219, 202, 241, 210, +183, 186, 252, 210, 186, 143, 180, 175, 210, 190, 143, 180, 182, 143, 180, 183, +198, 238, 143, 180, 187, 143, 180, 190, 210, 203, 210, 204, 143, 180, 198, 206, +210, 143, 180, 204, 210, 209, 143, 180, 212, 187, 178, 193, 208, 188, 232, 143, +180, 224, 194, 254, 143, 180, 227, 210, 222, 177, 165, 143, 180, 230, 200, 221, +143, 180, 236, 202, 173, 202, 242, 198, 221, 143, 180, 244, 188, 254, 204, 163, +204, 191, 143, 181, 164, 210, 240, 143, 181, 170, 143, 181, 173, 143, 181, 179, +143, 181, 183, 143, 181, 185, 211, 166, 211, 175, 143, 181, 191, 143, 181, 193, +143, 181, 197, 143, 181, 202, 176, 162, 143, 181, 206, 143, 181, 209, 211, 177, +143, 181, 217, 211, 183, 143, 181, 225, 211, 193, 143, 181, 232, 143, 181, 236, +180, 238, 183, 246, 143, 181, 244, 143, 181, 245, 143, 181, 249, 143, 182, 161, +143, 182, 165, 143, 182, 167, 143, 182, 168, 143, 182, 170, 143, 182, 175, 143, +182, 179, 178, 222, 143, 182, 182, 143, 182, 188, 143, 182, 195, 143, 182, 199, +143, 182, 200, 180, 239, 143, 182, 210, 211, 230, 211, 231, 211, 233, 143, 182, +221, 143, 182, 225, 143, 182, 231, 143, 182, 233, 211, 244, 211, 247, 143, 182, +244, 143, 182, 250, 143, 182, 252, 185, 241, 143, 183, 165, 143, 183, 168, 143, +183, 171, 143, 183, 177, 143, 183, 182, 212, 173, 143, 183, 188, 212, 175, 212, +179, 143, 183, 197, 143, 183, 205, 212, 180, 212, 181, 212, 182, 143, 183, 220, +143, 183, 225, 212, 184, 143, 183, 230, 143, 183, 231, 212, 191, 199, 184, 143, +183, 239, 143, 183, 243, 180, 240, 143, 183, 251, 194, 196, 143, 184, 165, 180, +174, 190, 236, 143, 184, 172, 143, 184, 173, 197, 227, 186, 201, 143, 184, 183, +212, 199, 143, 184, 185, 143, 184, 189, 202, 232, 143, 184, 199, 203, 207, 143, +184, 206, 143, 184, 208, 195, 197, 212, 219, 212, 224, 143, 184, 221, 143, 184, +222, 212, 232, 202, 209, 143, 184, 228, 143, 184, 231, 194, 231, 188, 186, 212, +243, 198, 224, 143, 184, 244, 143, 184, 248, 212, 252, 143, 185, 162, 143, 185, +167, 199, 165, 143, 185, 172, 143, 185, 174, 197, 202, 143, 185, 182, 143, 185, +185, 187, 207, 213, 172, 143, 185, 195, 143, 185, 198, 176, 249, 213, 178, 143, +185, 210, 143, 185, 211, 143, 185, 215, 213, 183, 213, 180, 143, 185, 223, 186, +167, 143, 185, 228, 143, 185, 231, 143, 185, 235, 143, 185, 238, 143, 185, 243, +143, 185, 246, 143, 185, 251, 213, 191, 183, 249, 213, 197, 143, 186, 167, 143, +186, 169, 143, 186, 171, 143, 186, 174, 213, 201, 213, 202, 143, 186, 182, 196, +220, 213, 206, 213, 210, 143, 186, 187, 213, 212, 204, 210, 213, 216, 213, 218, +143, 186, 196, 177, 167, 143, 186, 205, 176, 184, 205, 168, 143, 186, 213, 205, +198, 213, 227, 143, 186, 221, 143, 186, 224, 178, 201, 213, 237, 195, 254, 188, +247, 176, 211, 213, 245, 143, 186, 235, 213, 248, 143, 186, 244, 198, 244, 213, +252, 214, 161, 143, 186, 248, 193, 216, 214, 165, 214, 168, 143, 187, 169, 214, +170, 143, 187, 174, 193, 187, 143, 187, 181, 214, 176, 214, 180, 143, 187, 187, +143, 187, 188, 178, 229, 143, 187, 192, 214, 183, 191, 242, 214, 194, 214, 193, +143, 187, 201, 143, 187, 203, 143, 187, 206, 143, 187, 211, 214, 201, 214, 191, +191, 243, 214, 205, 143, 187, 226, 143, 187, 230, 143, 187, 232, 214, 211, 143, +187, 240, 143, 230, 244, 214, 217, 143, 187, 247, 214, 221, 192, 238, 185, 170, +184, 202, 180, 172, 200, 193, 214, 230, 214, 231, 191, 227, 194, 211, 203, 185, +214, 243, 143, 188, 181, 143, 188, 184, 143, 188, 187, 180, 179, 205, 196, 200, +223, 196, 236, 214, 249, 143, 188, 201, 176, 195, 143, 188, 207, 206, 247, 179, +199, 215, 163, 215, 168, 215, 172, 215, 176, 143, 188, 223, 181, 221, 143, 188, +227, 184, 204, 188, 229, 143, 188, 239, 143, 188, 244, 143, 188, 247, 143, 188, +250, 201, 167, 190, 180, 143, 189, 166, 183, 194, 143, 189, 171, 215, 208, 143, +189, 178, 200, 249, 143, 189, 183, 191, 180, 199, 166, 187, 214, 143, 189, 195, +178, 247, 199, 176, 215, 221, 143, 189, 210, 143, 189, 213, 143, 189, 217, 215, +226, 143, 189, 220, 143, 189, 222, 215, 240, 143, 189, 228, 215, 239, 178, 184, +183, 195, 143, 189, 236, 188, 189, 143, 189, 243, 143, 189, 246, 216, 166, 143, +189, 253, 143, 190, 161, 190, 240, 143, 190, 170, 143, 190, 173, 193, 218, 194, +198, 216, 185, 216, 180, 143, 190, 188, 182, 242, 216, 195, 143, 190, 202, 216, +198, 143, 190, 209, 216, 216, 216, 215, 183, 197, 216, 213, 143, 190, 216, 216, +220, 216, 225, 143, 190, 229, 198, 180, 183, 251, 143, 190, 239, 216, 234, 178, +251, 143, 190, 246, 216, 239, 196, 168, 216, 246, 143, 191, 167, 178, 230, 216, +254, 192, 239, 217, 165, 204, 225, 143, 191, 182, 143, 191, 184, 143, 191, 189, +143, 191, 191, 202, 177, 200, 227, 217, 183, 143, 191, 197, 185, 179, 143, 191, +201, 202, 250, 217, 187, 195, 180, 217, 188, 192, 219, 143, 191, 214, 143, 191, +216, 189, 166, 217, 205, 143, 191, 225, 182, 180, 143, 191, 228, 143, 191, 231, +193, 222, 194, 170, 143, 191, 244, 143, 191, 248, 143, 191, 252, 199, 177, 143, +192, 167, 199, 211, 143, 192, 174, 191, 228, 183, 199, 143, 192, 180, 143, 192, +183, 217, 231, 143, 192, 189, 217, 226, 143, 192, 195, 217, 236, 143, 192, 201, +217, 211, 217, 238, 143, 192, 213, 183, 200, 143, 192, 217, 197, 166, 143, 192, +230, 143, 192, 231, 204, 206, 183, 226, 143, 192, 238, 143, 192, 242, 143, 192, +247, 199, 197, 179, 201, 143, 193, 161, 143, 193, 166, 218, 166, 197, 167, 181, +188, 218, 177, 218, 181, 143, 193, 185, 143, 193, 188, 143, 193, 192, 143, 193, +196, 218, 189, 202, 252, 218, 195, 143, 193, 206, 218, 201, 143, 193, 210, 218, +202, 143, 193, 213, 202, 184, 200, 195, 218, 207, 192, 205, 187, 219, 202, 253, +218, 211, 143, 193, 232, 143, 193, 236, 180, 251, 189, 220, 143, 193, 242, 218, +224, 143, 193, 249, 218, 230, 143, 194, 166, 143, 194, 172, 195, 235, 143, 194, +179, 143, 194, 182, 143, 194, 187, 179, 162, 218, 242, 195, 210, 218, 247, 218, +245, 218, 248, 196, 170, 143, 194, 217, 219, 162, 143, 194, 224, 143, 194, 227, +219, 163, 219, 165, 143, 194, 234, 219, 170, 194, 216, 205, 173, 143, 194, 241, +196, 171, 219, 176, 188, 235, 181, 224, 143, 194, 249, 194, 188, 197, 206, 143, +195, 161, 219, 191, 143, 195, 166, 219, 199, 143, 195, 170, 143, 195, 175, 219, +197, 143, 195, 177, 143, 195, 181, 143, 195, 188, 199, 240, 143, 195, 193, 219, +207, 219, 211, 143, 195, 184, 198, 202, 192, 242, 143, 195, 204, 143, 195, 207, +143, 195, 212, 143, 195, 214, 143, 195, 217, 182, 205, 143, 195, 223, 201, 176, +143, 195, 228, 143, 195, 233, 199, 223, 219, 231, 143, 195, 241, 143, 195, 245, +196, 244, 219, 238, 180, 254, 143, 195, 254, 143, 196, 165, 220, 168, 143, 196, +173, 220, 170, 220, 166, 196, 199, 191, 250, 220, 176, 220, 191, 143, 196, 193, +143, 196, 195, 201, 246, 220, 194, 143, 196, 204, 143, 196, 209, 207, 176, 186, +231, 207, 177, 220, 213, 143, 196, 222, 143, 196, 225, 220, 201, 185, 189, 143, +196, 232, 143, 196, 234, 220, 229, 220, 223, 143, 196, 244, 143, 196, 245, 201, +184, 220, 235, 220, 211, 220, 247, 220, 237, 143, 197, 170, 181, 204, 220, 243, +143, 197, 180, 143, 197, 182, 143, 197, 187, 221, 161, 220, 253, 221, 168, 221, +166, 221, 165, 143, 197, 206, 143, 197, 210, 143, 197, 213, 143, 197, 216, 221, +178, 205, 243, 143, 197, 226, 143, 197, 230, 178, 164, 205, 223, 182, 214, 221, +188, 143, 197, 244, 143, 197, 247, 143, 197, 249, 186, 208, 143, 197, 254, 189, +222, 221, 205, 143, 198, 166, 143, 198, 171, 221, 213, 143, 198, 178, 143, 198, +182, 221, 218, 221, 219, 221, 221, 143, 198, 192, 143, 198, 195, 143, 198, 199, +181, 164, 221, 230, 143, 198, 209, 177, 202, 181, 225, 143, 198, 218, 180, 192, +221, 233, 143, 198, 226, 143, 198, 230, 221, 235, 198, 217, 178, 173, 203, 215, +203, 247, 202, 168, 143, 198, 246, 200, 231, 143, 198, 254, 143, 199, 163, 222, +165, 143, 199, 170, 143, 199, 171, 143, 199, 174, 222, 172, 196, 197, 143, 199, +184, 143, 199, 186, 190, 244, 143, 199, 189, 143, 199, 192, 179, 189, 179, 164, +143, 199, 198, 205, 176, 143, 199, 203, 143, 199, 206, 143, 199, 208, 143, 199, +212, 143, 199, 215, 222, 204, 143, 199, 221, 143, 199, 225, 189, 223, 143, 199, +231, 222, 189, 222, 188, 222, 219, 178, 185, 143, 199, 237, 222, 220, 222, 218, +143, 199, 251, 143, 200, 161, 222, 208, 143, 200, 165, 200, 174, 189, 224, 143, +200, 170, 222, 228, 205, 207, 143, 200, 178, 143, 200, 183, 222, 237, 194, 218, +143, 200, 187, 223, 163, 181, 249, 143, 200, 196, 143, 200, 198, 199, 249, 143, +200, 204, 143, 200, 208, 222, 243, 143, 200, 212, 143, 200, 217, 189, 225, 196, +172, 223, 166, 223, 173, 143, 200, 231, 143, 200, 237, 143, 200, 240, 223, 186, +143, 200, 248, 183, 227, 143, 200, 254, 223, 190, 143, 201, 162, 143, 201, 163, +223, 171, 143, 201, 169, 143, 201, 173, 223, 198, 223, 202, 195, 245, 223, 208, +143, 201, 182, 143, 201, 185, 143, 201, 189, 143, 201, 192, 178, 208, 143, 201, +198, 143, 201, 201, 177, 234, 143, 201, 208, 143, 201, 210, 223, 220, 223, 218, +206, 245, 143, 201, 218, 223, 223, 223, 216, 223, 226, 143, 201, 230, 177, 235, +143, 201, 234, 143, 201, 236, 193, 179, 143, 201, 242, 143, 201, 247, 223, 230, +143, 201, 254, 223, 236, 143, 202, 162, 223, 239, 223, 237, 244, 166, 223, 241, +143, 202, 174, 223, 245, 197, 245, 223, 246, 143, 202, 187, 187, 184, 223, 253, +224, 162, 143, 202, 193, 143, 202, 194, 143, 202, 197, 224, 166, 224, 170, 224, +172, 224, 175, 143, 202, 211, 143, 202, 215, 203, 210, 143, 202, 224, 143, 202, +227, 224, 182, 224, 183, 181, 190, 184, 164, 190, 245, 143, 202, 242, 143, 202, +245, 143, 202, 247, 224, 195, 198, 200, 224, 198, 143, 203, 162, 143, 203, 167, +224, 200, 143, 203, 173, 143, 203, 177, 205, 177, 143, 203, 184, 143, 203, 185, +224, 213, 189, 195, 143, 203, 199, 224, 217, 143, 203, 207, 143, 203, 210, 143, +203, 215, 143, 203, 220, 143, 203, 225, 143, 203, 227, 178, 209, 143, 203, 236, +143, 203, 240, 188, 238, 183, 190, 143, 203, 248, 184, 189, 206, 176, 143, 204, +168, 143, 204, 170, 143, 204, 178, 143, 204, 182, 143, 204, 184, 143, 204, 189, +143, 204, 192, 143, 204, 194, 143, 204, 199, 224, 247, 143, 204, 208, 143, 204, +213, 224, 229, 143, 204, 226, 143, 204, 231, 143, 204, 234, 143, 204, 238, 143, +204, 242, 143, 204, 245, 225, 166, 143, 204, 252, 143, 204, 254, 185, 249, 197, +188, 225, 180, 197, 196, 196, 174, 225, 183, 143, 205, 180, 206, 177, 225, 191, +143, 205, 187, 143, 205, 189, 143, 205, 196, 193, 193, 143, 205, 201, 225, 207, +225, 215, 225, 214, 143, 205, 211, 225, 218, 143, 205, 216, 143, 205, 221, 143, +205, 225, 225, 224, 143, 205, 231, 143, 205, 236, 143, 205, 242, 143, 205, 247, +225, 240, 143, 206, 161, 143, 206, 167, 204, 254, 225, 245, 225, 252, 143, 206, +179, 197, 208, 143, 206, 182, 187, 169, 226, 173, 143, 206, 193, 200, 233, 226, +176, 226, 179, 143, 206, 205, 226, 181, 143, 206, 209, 226, 187, 196, 190, 189, +226, 226, 190, 143, 206, 222, 143, 206, 228, 226, 197, 143, 206, 234, 143, 206, +239, 143, 206, 243, 143, 206, 248, 143, 206, 253, 143, 207, 163, 143, 207, 168, +226, 208, 226, 211, 143, 207, 176, 143, 207, 179, 143, 207, 182, 143, 207, 186, +226, 218, 143, 207, 189, 143, 207, 192, 143, 207, 195, 182, 235, 192, 208, 186, +189, 226, 230, 143, 207, 212, 181, 206, 203, 164, 185, 220, 143, 207, 225, 143, +207, 228, 143, 207, 234, 200, 163, 226, 239, 226, 238, 200, 234, 143, 207, 244, +202, 203, 143, 207, 252, 143, 208, 161, 226, 252, 200, 216, 227, 162, 143, 208, +173, 176, 235, 143, 208, 185, 143, 208, 188, 143, 208, 190, 143, 208, 191, 143, +208, 196, 143, 208, 200, 143, 208, 203, 143, 208, 207, 143, 208, 211, 227, 175, +190, 205, 143, 208, 220, 143, 208, 223, 227, 180, 143, 208, 229, 143, 208, 235, +143, 208, 238, 143, 208, 242, 143, 208, 244, 143, 208, 249, 143, 208, 252, 199, +233, 190, 206, 176, 220, 143, 209, 172, 143, 209, 176, 143, 209, 178, 143, 209, +181, 227, 202, 227, 203, 143, 209, 192, 178, 186, 143, 209, 198, 190, 247, 143, +209, 206, 143, 209, 208, 143, 209, 211, 143, 209, 216, 143, 209, 219, 227, 221, +143, 209, 223, 227, 227, 143, 209, 229, 227, 234, 227, 237, 143, 209, 234, 143, +209, 239, 143, 209, 242, 181, 232, 143, 209, 244, 227, 250, 227, 252, 227, 247, +143, 210, 163, 143, 210, 167, 195, 222, 228, 184, 228, 170, 228, 172, 143, 210, +180, 143, 210, 182, 228, 176, 143, 210, 189, 143, 210, 191, 143, 210, 196, 200, +207, 228, 189, 143, 210, 207, 198, 198, 143, 210, 212, 143, 210, 218, 143, 210, +224, 228, 194, 143, 210, 231, 143, 210, 233, 143, 210, 237, 228, 213, 143, 210, +244, 228, 216, 143, 210, 254, 143, 211, 164, 202, 198, 143, 211, 171, 143, 211, +173, 206, 179, 143, 211, 176, 228, 234, 228, 236, 143, 211, 184, 143, 211, 187, +228, 245, 228, 246, 143, 211, 199, 228, 250, 181, 234, 143, 211, 205, 143, 211, +209, 229, 162, 143, 211, 215, 186, 217, 186, 176, 193, 200, 229, 174, 143, 211, +230, 229, 179, 229, 177, 143, 211, 238, 143, 211, 243, 143, 211, 249, 143, 211, +252, 229, 194, 188, 250, 143, 212, 166, 143, 212, 169, 143, 212, 174, 143, 212, +177, 229, 206, 143, 212, 184, 143, 212, 187, 143, 212, 179, 229, 208, 143, 212, +194, 229, 213, 203, 165, 229, 220, 143, 212, 206, 193, 161, 191, 165, 229, 229, +229, 234, 143, 212, 221, 229, 239, 143, 212, 226, 143, 212, 229, 229, 251, 180, +204, 143, 212, 240, 230, 163, 230, 169, 143, 212, 250, 143, 212, 254, 200, 237, +230, 176, 230, 181, 143, 213, 171, 143, 213, 174, 143, 213, 178, 230, 192, 143, +213, 183, 143, 213, 185, 143, 213, 187, 143, 213, 190, 143, 213, 194, 230, 203, +185, 205, 143, 213, 203, 204, 215, 230, 212, 143, 213, 216, 204, 237, 143, 213, +226, 230, 216, 192, 187, 143, 213, 228, 143, 213, 231, 191, 166, 143, 213, 234, +207, 190, 190, 211, 184, 212, 143, 213, 241, 143, 213, 242, 176, 223, 143, 213, +245, 143, 213, 250, 184, 213, 143, 213, 253, 182, 187, 187, 233, 143, 214, 170, +143, 214, 175, 143, 214, 178, 196, 177, 143, 214, 183, 201, 229, 231, 181, 143, +214, 193, 231, 171, 194, 220, 231, 174, 231, 178, 231, 177, 143, 214, 209, 231, +187, 231, 190, 231, 193, 143, 214, 220, 143, 214, 224, 143, 214, 226, 143, 214, +231, 143, 214, 236, 218, 170, 143, 214, 240, 143, 214, 244, 143, 214, 247, 143, +214, 248, 231, 217, 143, 215, 161, 143, 215, 165, 143, 215, 167, 231, 226, 143, +215, 171, 231, 232, 143, 215, 180, 143, 215, 184, 231, 236, 143, 215, 195, 203, +167, 178, 234, 143, 215, 207, 143, 215, 209, 143, 215, 212, 143, 215, 216, 231, +249, 231, 247, 183, 212, 232, 173, 143, 215, 233, 143, 215, 234, 195, 227, 232, +166, 183, 213, 143, 215, 227, 143, 215, 253, 178, 174, 232, 174, 143, 216, 168, +143, 216, 174, 143, 216, 176, 205, 233, 232, 207, 143, 216, 183, 143, 216, 187, +186, 218, 143, 216, 191, 232, 203, 143, 216, 196, 143, 216, 198, 143, 216, 201, +232, 206, 232, 212, 232, 226, 143, 216, 207, 143, 216, 212, 143, 216, 217, 198, +161, 232, 211, 232, 216, 143, 216, 232, 190, 213, 143, 216, 236, 232, 231, 143, +216, 240, 143, 216, 244, 143, 216, 247, 143, 216, 251, 143, 216, 254, 143, 217, +162, 143, 217, 166, 143, 217, 171, 232, 209, 143, 217, 178, 177, 182, 143, 217, +183, 143, 217, 188, 202, 195, 232, 254, 143, 217, 197, 143, 217, 201, 207, 207, +233, 177, 143, 217, 216, 143, 217, 220, 177, 242, 143, 217, 228, 204, 244, 143, +217, 232, 207, 206, 143, 217, 242, 233, 185, 143, 217, 247, 200, 205, 143, 217, +252, 233, 193, 233, 190, 221, 177, 143, 218, 174, 205, 246, 143, 218, 178, 143, +218, 183, 233, 200, 143, 218, 188, 143, 218, 193, 195, 238, 143, 218, 200, 143, +218, 237, 233, 206, 143, 218, 210, 233, 219, 143, 218, 218, 143, 218, 222, 233, +217, 233, 220, 233, 221, 233, 222, 194, 253, 203, 170, 233, 235, 195, 216, 143, +218, 254, 143, 219, 162, 143, 219, 166, 143, 219, 172, 143, 219, 174, 233, 251, +143, 219, 177, 233, 253, 233, 247, 234, 167, 143, 219, 192, 143, 219, 196, 234, +165, 143, 219, 203, 205, 230, 234, 175, 143, 219, 214, 143, 219, 217, 143, 219, +222, 143, 219, 226, 234, 187, 143, 219, 232, 143, 219, 237, 234, 192, 143, 219, +248, 143, 219, 250, 234, 197, 143, 220, 164, 222, 167, 179, 185, 185, 213, 234, +206, 234, 210, 182, 222, 194, 222, 194, 181, 143, 220, 190, 143, 220, 192, 184, +211, 143, 220, 195, 143, 220, 197, 234, 227, 143, 220, 206, 234, 235, 234, 236, +234, 233, 143, 220, 214, 179, 236, 143, 220, 222, 234, 243, 143, 220, 228, 143, +220, 233, 234, 247, 143, 220, 240, 143, 220, 243, 235, 162, 143, 220, 250, 143, +220, 254, 202, 164, 143, 221, 166, 179, 208, 143, 221, 173, 235, 178, 235, 180, +179, 209, 235, 185, 191, 168, 143, 221, 189, 143, 221, 193, 143, 221, 197, 143, +221, 199, 235, 194, 235, 196, 143, 221, 210, 191, 199, 143, 221, 217, 186, 190, +235, 199, 143, 221, 229, 181, 205, 143, 221, 235, 235, 209, 143, 221, 243, 143, +221, 248, 235, 216, 198, 201, 143, 222, 162, 235, 219, 180, 210, 207, 192, 235, +227, 235, 221, 143, 222, 180, 143, 222, 183, 143, 222, 191, 235, 226, 143, 222, +189, 235, 245, 235, 240, 235, 244, 143, 222, 201, 143, 222, 202, 201, 232, 183, +217, 181, 196, 143, 222, 213, 218, 206, 143, 222, 221, 143, 222, 224, 195, 171, +236, 175, 143, 222, 233, 236, 181, 190, 221, 208, 174, 143, 222, 250, 236, 186, +203, 198, 236, 194, 185, 215, 192, 213, 236, 202, 178, 236, 194, 177, 143, 223, +178, 199, 229, 188, 193, 143, 223, 187, 143, 223, 191, 143, 223, 194, 236, 219, +192, 214, 143, 223, 201, 143, 223, 202, 177, 219, 143, 223, 209, 143, 223, 211, +143, 223, 214, 143, 223, 218, 143, 223, 222, 143, 223, 227, 143, 223, 230, 236, +240, 236, 238, 143, 223, 242, 236, 245, 236, 244, 143, 223, 250, 236, 247, 237, +169, 236, 253, 143, 224, 171, 236, 254, 143, 224, 177, 143, 224, 181, 143, 224, +184, 189, 179, 237, 175, 237, 179, 143, 224, 198, 237, 186, 191, 200, 143, 224, +209, 143, 224, 212, 188, 214, 143, 224, 219, 198, 240, 237, 199, 143, 224, 225, +143, 224, 230, 237, 210, 143, 224, 235, 143, 224, 239, 206, 216, 143, 224, 248, +237, 217, 237, 219, 143, 225, 166, 143, 225, 170, 191, 201, 143, 225, 177, 237, +231, 202, 213, 203, 248, 183, 222, 237, 233, 143, 225, 195, 143, 225, 197, 237, +254, 143, 225, 203, 143, 225, 206, 237, 248, 194, 164, 143, 225, 212, 143, 225, +216, 238, 167, 238, 166, 198, 187, 143, 225, 223, 143, 225, 226, 238, 175, 206, +203, 237, 238, 205, 184, 143, 225, 241, 143, 225, 245, 238, 184, 143, 225, 251, +143, 226, 163, 143, 226, 173, 143, 226, 169, 201, 244, 143, 226, 178, 143, 226, +179, 143, 226, 185, 238, 192, 143, 226, 193, 143, 226, 199, 143, 226, 203, 143, +226, 209, 143, 226, 212, 188, 242, 143, 226, 220, 189, 183, 185, 243, 143, 226, +228, 238, 204, 143, 226, 237, 143, 226, 240, 238, 208, 238, 211, 143, 226, 254, +238, 216, 143, 227, 164, 191, 203, 182, 252, 143, 227, 179, 143, 227, 182, 143, +227, 187, 143, 227, 193, 143, 227, 198, 143, 227, 203, 143, 227, 207, 143, 227, +213, 197, 180, 143, 227, 223, 143, 227, 226, 200, 173, 143, 227, 236, 143, 227, +242, 189, 198, 143, 227, 251, 143, 227, 254, 143, 228, 164, 143, 228, 169, 238, +248, 143, 228, 181, 143, 228, 188, 143, 228, 193, 143, 228, 200, 143, 228, 205, +181, 248, 143, 228, 212, 143, 228, 214, 191, 238, 239, 162, 207, 163, 143, 228, +230, 238, 253, 143, 228, 235, 143, 228, 241, 143, 228, 243, 239, 171, 143, 229, +161, 143, 229, 167, 143, 229, 172, 143, 229, 176, 143, 229, 181, 143, 229, 183, +143, 229, 188, 143, 229, 195, 239, 178, 182, 192, 143, 229, 207, 143, 229, 212, +143, 229, 217, 143, 229, 222, 239, 197, 239, 195, 239, 196, 143, 229, 231, 143, +229, 236, 143, 229, 238, 143, 229, 241, 239, 206, 239, 209, 239, 216, 196, 185, +239, 217, 143, 230, 164, 239, 221, 239, 224, 143, 230, 173, 143, 230, 176, 239, +234, 239, 235, 198, 174, 239, 243, 201, 236, 143, 230, 201, 143, 230, 203, 193, +203, 239, 251, 143, 230, 214, 143, 230, 217, 240, 165, 198, 171, 143, 230, 224, +231, 161, 240, 168, 143, 230, 233, 143, 230, 237, 143, 230, 240, 191, 253, 143, +230, 242, 240, 186, 143, 230, 249, 143, 230, 250, 206, 237, 188, 251, 206, 238, +240, 195, 143, 231, 167, 240, 199, 240, 201, 240, 205, 192, 196, 240, 208, 240, +211, 240, 215, 143, 231, 191, 240, 217, 240, 223, 143, 231, 199, 240, 228, 202, +220, 143, 231, 210, 240, 231, 143, 231, 223, 143, 231, 228, 143, 231, 235, 240, +236, 143, 231, 240, 202, 199, 240, 243, 143, 231, 249, 143, 231, 252, 143, 232, +161, 143, 232, 167, 143, 232, 170, 179, 220, 180, 234, 143, 232, 180, 143, 232, +185, 201, 247, 143, 232, 190, 143, 232, 195, 143, 232, 199, 200, 244, 143, 232, +202, 200, 211, 187, 244, 143, 232, 209, 143, 232, 211, 143, 232, 216, 143, 232, +220, 143, 232, 223, 143, 232, 230, 241, 189, 241, 190, 143, 232, 242, 188, 243, +241, 198, 143, 232, 251, 143, 233, 162, 194, 204, 195, 243, 143, 233, 170, 143, +233, 173, 241, 209, 241, 211, 241, 215, 241, 214, 241, 217, 143, 233, 194, 143, +233, 197, 241, 219, 143, 233, 204, 143, 233, 207, 241, 225, 241, 229, 241, 233, +185, 252, 143, 233, 218, 241, 238, 143, 233, 228, 143, 233, 231, 143, 233, 236, +143, 233, 240, 241, 249, 143, 233, 247, 143, 233, 254, 143, 234, 167, 242, 163, +242, 166, 143, 234, 178, 143, 234, 182, 179, 161, 143, 234, 187, 143, 234, 189, +143, 234, 194, 143, 234, 200, 143, 234, 205, 143, 234, 209, 143, 234, 215, 242, +184, 143, 234, 223, 143, 234, 226, 143, 234, 230, 143, 234, 234, 242, 196, 143, +234, 242, 194, 228, 143, 234, 247, 143, 234, 251, 143, 235, 161, 242, 218, 143, +235, 168, 143, 235, 172, 143, 235, 177, 201, 201, 143, 235, 186, 143, 235, 188, +143, 235, 194, 143, 235, 200, 143, 235, 205, 143, 235, 211, 242, 233, 196, 187, +242, 236, 143, 235, 222, 178, 170, 143, 235, 225, 242, 245, 143, 235, 229, 143, +235, 234, 242, 247, 243, 165, 177, 173, 143, 235, 248, 143, 235, 252, 143, 236, +163, 143, 236, 167, 143, 236, 173, 143, 236, 175, 243, 170, 143, 236, 180, 143, +236, 183, 143, 236, 186, 243, 186, 143, 236, 193, 143, 236, 198, 143, 236, 202, +243, 191, 143, 236, 207, 143, 236, 210, 243, 193, 243, 195, 188, 175, 243, 200, +243, 203, 206, 219, 243, 207, 143, 236, 238, 221, 224, 143, 236, 242, 185, 245, +243, 217, 143, 236, 247, 143, 236, 252, 243, 228, 243, 231, 143, 237, 168, 143, +237, 175, 143, 237, 178, 143, 237, 182, 201, 161, 143, 237, 194, 240, 237, 143, +237, 202, 243, 245, 143, 237, 210, 143, 237, 214, 206, 182, 143, 237, 222, 143, +237, 224, 161, 170, 161, 220, 163, 181, 161, 169, 163, 201, 163, 211, 161, 207, +163, 231, 163, 241, 161, 208, 142, 165, 142, 175, 142, 185, 142, 195, 142, 205, +142, 215, 161, 177 + }); + + super.setUp(); + } + + @Override + public void test_CodecDynamic () throws CharacterCodingException { + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + decoder.onMalformedInput(CodingErrorAction.REPORT); + CharBuffer inputCB = CharBuffer.allocate(65536); + for (int code = 32; code <= 65533; code ++) { + if ((encoder.canEncode((char) code)) + && (code != 165) && (code != 8254)) { + inputCB.put((char) code); + } + } + inputCB.rewind(); + ByteBuffer intermediateBB = encoder.encode(inputCB); + inputCB.rewind(); + intermediateBB.rewind(); + CharBuffer outputCB = decoder.decode(intermediateBB); + outputCB.rewind(); + assertEqualCBs("decode(encode(A)) must be identical with A!", + inputCB, outputCB); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_EUC_JP_Android.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_EUC_JP_Android.java new file mode 100644 index 0000000..a3701e9 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_EUC_JP_Android.java @@ -0,0 +1,532 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.EUC_JP.class) + +public class Charset_MultiByte_EUC_JP_Android extends Charset_AbstractTest { + + protected void setUp() throws Exception { + charsetName = "EUC-JP"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +161, 162, 163, 164, /*165,*/ 166, 167, 168, 169, 170, 172, 174, 175, 176, 177, 180, +182, 184, 186, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, +204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, +221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, +237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, +253, 254, 255, 256, 266, 278, 288, 298, 308, 318, 328, 338, 348, 358, 368, 378, +461, 471, 501, 711, 728, 900, 910, 920, 931, 941, 951, 961, 971, 1025, 1035, 1045, +1055, 1065, 1075, 1085, 1095, 1105, 1115, 8208, 8220, 8230, 8240, 8251, 8451, 8470, 8482, 8592, +8658, 8704, 8715, 8730, 8743, 8756, 8786, 8800, 8810, 8834, 8869, 8978, 9472, 9484, 9495, 9507, +9519, 9531, 9547, 9632, 9650, 9660, 9670, 9711, 9733, 9792, 9834, 12288, 12298, 12308, 12353, 12363, +12373, 12383, 12393, 12403, 12413, 12423, 12433, 12443, 12453, 12463, 12473, 12483, 12493, 12503, 12513, 12523, +12533, 19968, 19978, 19988, 19998, 20008, 20018, 20028, 20039, 20049, 20060, 20072, 20083, 20094, 20104, 20114, +20124, 20134, 20144, 20154, 20164, 20174, 20184, 20194, 20205, 20215, 20225, 20235, 20245, 20270, 20280, 20290, +20300, 20310, 20320, 20330, 20341, 20351, 20361, 20371, 20381, 20395, 20405, 20415, 20425, 20436, 20447, 20462, +20472, 20484, 20494, 20504, 20514, 20524, 20534, 20544, 20554, 20565, 20575, 20586, 20596, 20608, 20618, 20628, +20638, 20650, 20660, 20670, 20681, 20691, 20701, 20711, 20721, 20731, 20742, 20752, 20762, 20775, 20785, 20795, +20805, 20815, 20826, 20836, 20846, 20856, 20866, 20876, 20886, 20896, 20906, 20916, 20926, 20936, 20946, 20956, +20966, 20976, 20986, 20996, 21006, 21016, 21026, 21038, 21048, 21059, 21069, 21079, 21089, 21102, 21112, 21122, +21132, 21142, 21152, 21162, 21172, 21182, 21192, 21202, 21212, 21222, 21232, 21242, 21253, 21263, 21273, 21283, +21293, 21304, 21314, 21324, 21335, 21345, 21356, 21367, 21378, 21390, 21400, 21412, 21422, 21432, 21442, 21452, +21462, 21472, 21482, 21493, 21505, 21515, 21530, 21542, 21553, 21563, 21574, 21585, 21598, 21608, 21619, 21629, +21640, 21650, 21660, 21670, 21681, 21691, 21702, 21720, 21730, 21740, 21750, 21760, 21772, 21782, 21802, 21813, +21824, 21834, 21846, 21856, 21883, 21894, 21905, 21916, 21927, 21938, 21951, 21961, 21971, 21982, 21993, 22006, +22021, 22031, 22041, 22057, 22067, 22077, 22089, 22100, 22110, 22120, 22130, 22144, 22154, 22164, 22174, 22184, +22195, 22206, 22216, 22227, 22237, 22247, 22257, 22269, 22279, 22289, 22299, 22309, 22319, 22331, 22341, 22351, +22369, 22379, 22389, 22399, 22409, 22419, 22429, 22439, 22451, 22461, 22471, 22482, 22492, 22502, 22512, 22522, +22532, 22549, 22559, 22570, 22580, 22591, 22601, 22612, 22622, 22632, 22642, 22652, 22663, 22675, 22685, 22696, +22706, 22716, 22727, 22737, 22748, 22761, 22771, 22781, 22793, 22803, 22813, 22823, 22833, 22846, 22856, 22866, +22877, 22887, 22898, 22908, 22922, 22933, 22943, 22956, 22967, 22977, 22987, 23001, 23011, 23022, 23035, 23049, +23059, 23070, 23080, 23093, 23104, 23116, 23130, 23141, 23159, 23179, 23190, 23200, 23212, 23224, 23234, 23244, +23254, 23264, 23274, 23285, 23296, 23307, 23318, 23329, 23340, 23350, 23360, 23371, 23381, 23391, 23401, 23411, +23421, 23431, 23441, 23451, 23461, 23471, 23481, 23491, 23501, 23511, 23521, 23531, 23541, 23551, 23561, 23571, +23582, 23592, 23602, 23612, 23622, 23632, 23642, 23652, 23662, 23673, 23687, 23697, 23709, 23720, 23730, 23740, +23751, 23762, 23773, 23784, 23794, 23805, 23815, 23825, 23835, 23846, 23857, 23869, 23880, 23890, 23900, 23913, +23923, 23934, 23944, 23954, 23965, 23975, 23986, 23996, 24007, 24018, 24029, 24039, 24049, 24059, 24070, 24081, +24091, 24101, 24111, 24125, 24135, 24145, 24155, 24168, 24178, 24188, 24199, 24213, 24224, 24234, 24245, 24255, +24265, 24275, 24285, 24296, 24307, 24318, 24328, 24339, 24349, 24359, 24369, 24379, 24389, 24400, 24411, 24422, +24432, 24442, 24452, 24463, 24473, 24484, 24494, 24504, 24515, 24525, 24535, 24545, 24555, 24565, 24575, 24586, +24596, 24607, 24617, 24627, 24640, 24650, 24660, 24671, 24681, 24693, 24703, 24713, 24723, 24733, 24743, 24753, +24763, 24773, 24783, 24793, 24803, 24816, 24826, 24838, 24848, 24858, 24871, 24881, 24892, 24902, 24915, 24925, +24935, 24945, 24955, 24967, 24977, 24988, 24999, 25010, 25020, 25030, 25040, 25052, 25062, 25074, 25084, 25095, +25105, 25115, 25126, 25136, 25147, 25158, 25168, 25178, 25188, 25198, 25209, 25219, 25229, 25239, 25254, 25265, +25275, 25285, 25295, 25305, 25322, 25332, 25342, 25352, 25363, 25375, 25385, 25397, 25407, 25417, 25427, 25445, +25457, 25467, 25479, 25490, 25502, 25512, 25522, 25533, 25544, 25554, 25564, 25577, 25587, 25606, 25616, 25628, +25638, 25648, 25658, 25675, 25688, 25699, 25709, 25720, 25731, 25743, 25753, 25763, 25773, 25785, 25796, 25806, +25816, 25826, 25836, 25846, 25856, 25866, 25876, 25886, 25897, 25908, 25918, 25928, 25938, 25949, 25959, 25970, +25981, 25991, 26001, 26011, 26021, 26031, 26041, 26051, 26062, 26072, 26082, 26092, 26105, 26115, 26125, 26140, +26150, 26160, 26172, 26182, 26193, 26203, 26214, 26224, 26234, 26244, 26254, 26264, 26274, 26285, 26296, 26306, +26316, 26326, 26336, 26347, 26357, 26367, 26377, 26387, 26397, 26407, 26417, 26429, 26439, 26449, 26460, 26470, +26480, 26491, 26501, 26511, 26521, 26534, 26544, 26555, 26565, 26575, 26585, 26596, 26606, 26617, 26627, 26643, +26653, 26663, 26673, 26683, 26693, 26704, 26715, 26727, 26737, 26747, 26757, 26767, 26778, 26789, 26799, 26809, +26820, 26831, 26841, 26851, 26861, 26873, 26884, 26894, 26905, 26915, 26928, 26939, 26949, 26963, 26973, 26984, +26994, 27004, 27018, 27028, 27040, 27051, 27063, 27073, 27083, 27094, 27106, 27117, 27129, 27139, 27151, 27161, +27171, 27182, 27192, 27204, 27214, 27224, 27234, 27249, 27262, 27273, 27287, 27298, 27308, 27320, 27330, 27340, +27350, 27364, 27376, 27386, 27396, 27407, 27419, 27431, 27442, 27453, 27463, 27474, 27485, 27495, 27507, 27517, +27529, 27541, 27551, 27561, 27571, 27581, 27593, 27603, 27615, 27627, 27639, 27650, 27661, 27671, 27683, 27694, +27704, 27714, 27725, 27735, 27746, 27757, 27768, 27778, 27788, 27798, 27809, 27819, 27832, 27842, 27852, 27862, +27872, 27882, 27892, 27908, 27918, 27929, 27941, 27951, 27961, 27972, 27991, 28001, 28012, 28023, 28034, 28044, +28054, 28074, 28084, 28095, 28106, 28117, 28127, 28137, 28147, 28160, 28170, 28181, 28191, 28201, 28214, 28227, +28237, 28247, 28258, 28270, 28283, 28300, 28310, 28320, 28330, 28342, 28352, 28362, 28372, 28382, 28395, 28407, +28417, 28428, 28438, 28448, 28458, 28470, 28481, 28495, 28505, 28516, 28526, 28536, 28546, 28556, 28566, 28576, +28586, 28597, 28608, 28618, 28628, 28638, 28648, 28659, 28669, 28679, 28689, 28699, 28710, 28720, 28732, 28744, +28756, 28766, 28779, 28789, 28801, 28814, 28824, 28836, 28846, 28856, 28872, 28883, 28893, 28913, 28925, 28935, +28948, 28958, 28971, 28982, 28993, 29003, 29013, 29024, 29036, 29049, 29060, 29071, 29081, 29096, 29106, 29118, +29128, 29138, 29148, 29158, 29173, 29183, 29193, 29203, 29213, 29224, 29234, 29244, 29254, 29264, 29274, 29287, +29297, 29307, 29319, 29330, 29344, 29356, 29366, 29377, 29388, 29398, 29408, 29420, 29431, 29442, 29453, 29463, +29474, 29484, 29494, 29507, 29517, 29527, 29539, 29550, 29560, 29571, 29582, 29592, 29602, 29613, 29623, 29634, +29644, 29654, 29664, 29674, 29684, 29694, 29705, 29722, 29732, 29742, 29753, 29763, 29773, 29783, 29794, 29805, +29822, 29833, 29848, 29858, 29870, 29881, 29896, 29907, 29918, 29928, 29938, 29948, 29958, 29969, 29980, 29990, +30000, 30010, 30020, 30030, 30041, 30052, 30063, 30073, 30085, 30095, 30105, 30115, 30129, 30140, 30150, 30162, +30172, 30183, 30193, 30204, 30215, 30226, 30236, 30246, 30256, 30266, 30276, 30290, 30300, 30311, 30321, 30331, +30341, 30352, 30362, 30372, 30382, 30392, 30402, 30412, 30422, 30432, 30442, 30452, 30462, 30472, 30482, 30492, +30502, 30516, 30526, 30538, 30550, 30560, 30570, 30580, 30590, 30603, 30613, 30623, 30634, 30645, 30655, 30665, +30677, 30687, 30697, 30707, 30722, 30732, 30749, 30759, 30770, 30783, 30796, 30812, 30824, 30834, 30844, 30854, +30865, 30877, 30887, 30897, 30907, 30917, 30928, 30938, 30948, 30959, 30970, 30982, 30992, 31002, 31013, 31025, +31035, 31045, 31055, 31066, 31077, 31090, 31100, 31114, 31124, 31137, 31147, 31160, 31170, 31183, 31194, 31204, +31216, 31227, 31239, 31249, 31259, 31271, 31281, 31291, 31301, 31311, 31321, 31331, 31341, 31352, 31362, 31376, +31390, 31401, 31411, 31423, 31433, 31443, 31453, 31464, 31476, 31486, 31496, 31508, 31518, 31528, 31539, 31549, +31559, 31569, 31581, 31591, 31601, 31620, 31630, 31640, 31653, 31663, 31674, 31684, 31695, 31705, 31716, 31730, +31740, 31750, 31761, 31771, 31781, 31793, 31805, 31818, 31828, 31838, 31849, 31859, 31869, 31879, 31890, 31902, +31912, 31922, 31932, 31943, 31954, 31964, 31974, 31986, 31998, 32008, 32018, 32028, 32038, 32048, 32058, 32068, +32078, 32089, 32099, 32110, 32120, 32130, 32140, 32150, 32162, 32172, 32182, 32194, 32204, 32215, 32225, 32235, +32245, 32256, 32266, 32277, 32287, 32299, 32309, 32319, 32330, 32340, 32350, 32361, 32371, 32381, 32391, 32401, +32411, 32566, 32579, 32589, 32600, 32611, 32621, 32631, 32642, 32652, 32662, 32673, 32685, 32696, 32707, 32718, +32731, 32741, 32751, 32761, 32771, 32781, 32791, 32801, 32812, 32822, 32832, 32842, 32854, 32864, 32877, 32887, +32897, 32907, 32918, 32929, 32939, 32952, 32963, 32973, 32983, 32993, 33005, 33016, 33026, 33046, 33056, 33068, +33081, 33093, 33104, 33119, 33129, 33140, 33151, 33162, 33173, 33184, 33198, 33208, 33218, 33229, 33239, 33249, +33259, 33269, 33279, 33289, 33299, 33309, 33320, 33330, 33344, 33355, 33366, 33376, 33386, 33396, 33406, 33417, +33428, 33439, 33449, 33459, 33469, 33488, 33498, 33508, 33519, 33529, 33539, 33550, 33560, 33570, 33580, 33590, +33600, 33610, 33620, 33648, 33659, 33669, 33682, 33692, 33702, 33713, 33725, 33735, 33745, 33756, 33768, 33778, +33788, 33798, 33809, 33824, 33834, 33845, 33861, 33871, 33881, 33891, 33901, 33911, 33921, 33931, 33941, 33951, +33961, 33972, 33982, 33992, 34003, 34023, 34033, 34043, 34054, 34064, 34074, 34084, 34095, 34109, 34120, 34130, +34140, 34152, 34167, 34177, 34187, 34199, 34210, 34220, 34230, 34241, 34251, 34261, 34271, 34281, 34291, 34302, +34314, 34326, 34337, 34349, 34360, 34370, 34381, 34391, 34401, 34411, 34421, 34440, 34451, 34465, 34475, 34485, +34495, 34505, 34516, 34526, 34537, 34552, 34562, 34573, 34584, 34595, 34606, 34617, 34627, 34637, 34647, 34657, +34670, 34680, 34690, 34700, 34711, 34722, 34732, 34746, 34756, 34766, 34777, 34787, 34797, 34807, 34817, 34827, +34837, 34847, 34861, 34873, 34883, 34893, 34903, 34913, 34923, 34933, 34943, 34955, 34966, 34976, 34986, 34996, +35006, 35018, 35028, 35038, 35048, 35058, 35068, 35078, 35088, 35098, 35109, 35120, 35130, 35140, 35151, 35162, +35172, 35182, 35194, 35206, 35216, 35226, 35237, 35247, 35258, 35282, 35292, 35302, 35313, 35325, 35335, 35345, +35355, 35365, 35375, 35386, 35397, 35408, 35419, 35429, 35440, 35450, 35460, 35471, 35481, 35491, 35501, 35511, +35522, 35532, 35542, 35552, 35563, 35573, 35583, 35594, 35604, 35614, 35624, 35635, 35646, 35656, 35666, 35676, +35686, 35696, 35708, 35722, 35732, 35742, 35895, 35905, 35915, 35925, 35937, 35947, 35957, 35970, 35980, 35992, +36002, 36012, 36022, 36032, 36042, 36053, 36064, 36074, 36085, 36095, 36105, 36115, 36196, 36206, 36223, 36234, +36245, 36255, 36267, 36277, 36288, 36298, 36308, 36319, 36330, 36340, 36351, 36361, 36372, 36382, 36394, 36404, +36416, 36426, 36436, 36446, 36457, 36468, 36481, 36491, 36501, 36513, 36523, 36533, 36544, 36554, 36564, 36575, +36587, 36599, 36610, 36620, 36630, 36640, 36650, 36660, 36670, 36681, 36691, 36701, 36763, 36773, 36783, 36794, +36804, 36814, 36826, 36836, 36846, 36856, 36866, 36876, 36886, 36896, 36906, 36916, 36926, 36937, 36947, 36957, +36967, 36978, 36988, 36999, 37009, 37019, 37029, 37039, 37053, 37063, 37074, 37084, 37096, 37108, 37118, 37128, +37138, 37148, 37159, 37169, 37180, 37191, 37202, 37217, 37228, 37239, 37249, 37259, 37269, 37281, 37291, 37301, +37311, 37321, 37331, 37341, 37351, 37361, 37371, 37381, 37392, 37404, 37414, 37424, 37434, 37444, 37454, 37464, +37474, 37486, 37496, 37507, 37517, 37527, 37540, 37551, 37561, 37571, 37581, 37591, 37601, 37612, 37624, 37634, +37645, 37656, 37666, 37676, 37686, 37700, 37712, 37722, 37732, 37742, 37754, 37768, 37778, 37790, 37800, 37812, +37825, 37835, 37846, 37857, 37879, 37889, 37901, 37911, 37921, 37931, 37941, 37951, 37962, 37973, 37983, 37994, +38005, 38015, 38263, 38274, 38284, 38294, 38304, 38315, 38326, 38339, 38349, 38360, 38370, 38428, 38438, 38449, +38459, 38475, 38486, 38497, 38508, 38518, 38529, 38539, 38549, 38559, 38569, 38579, 38592, 38602, 38613, 38623, +38633, 38646, 38656, 38666, 38678, 38689, 38704, 38717, 38728, 38738, 38748, 38758, 38769, 38779, 38789, 38799, +38809, 38819, 38829, 38840, 38851, 38861, 38871, 38881, 38893, 38903, 38913, 38924, 38934, 38944, 38955, 38965, +38980, 38990, 39000, 39010, 39020, 39080, 39092, 39103, 39116, 39131, 39141, 39151, 39164, 39175, 39185, 39195, +39206, 39217, 39227, 39237, 39248, 39259, 39318, 39333, 39344, 39354, 39364, 39376, 39386, 39399, 39409, 39419, +39429, 39439, 39449, 39459, 39469, 39479, 39489, 39499, 39509, 39519, 39529, 39592, 39602, 39612, 39622, 39632, +39643, 39653, 39663, 39673, 39683, 39693, 39704, 39714, 39725, 39735, 39745, 39755, 39765, 39777, 39787, 39797, +39807, 39817, 39827, 39837, 39847, 39857, 39867, 39878, 39888, 39899, 39909, 39919, 39929, 39940, 39951, 39961, +39971, 39981, 39991, 40001, 40014, 40024, 40035, 40046, 40056, 40165, 40176, 40194, 40206, 40216, 40227, 40239, +40250, 40260, 40272, 40284, 40297, 40310, 40323, 40333, 40343, 40353, 40363, 40373, 40383, 40393, 40403, 40414, +40425, 40435, 40445, 40455, 40465, 40475, 40565, 40575, 40587, 40597, 40607, 40617, 40627, 40638, 40648, 40658, +40668, 40679, 40689, 40699, 40711, 40721, 40731, 40742, 40753, 40763, 40773, 40783, 40794, 40806, 40816, 40826, +40845, 40855, 40865, 65281, 65291, 65301, 65311, 65321, 65331, 65341, 65351, 65361, 65371, 65381, 65391, 65401, +65411, 65421, 65431, 65507 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +143, 162, 194, 142, 224, 142, 225, 143, 162, 240, 143, 162, 195, 161, 248, 161, +175, 143, 162, 237, 143, 162, 236, 142, 226, 143, 162, 238, 143, 162, 180, 161, +235, 161, 222, 161, 173, 162, 249, 143, 162, 177, 143, 162, 235, 143, 162, 196, +143, 170, 162, 143, 170, 161, 143, 170, 164, 143, 170, 170, 143, 170, 163, 143, +170, 169, 143, 169, 161, 143, 170, 174, 143, 170, 178, 143, 170, 177, 143, 170, +180, 143, 170, 179, 143, 170, 192, 143, 170, 191, 143, 170, 194, 143, 170, 193, +143, 170, 208, 143, 170, 210, 143, 170, 209, 143, 170, 212, 143, 170, 216, 143, +170, 211, 161, 223, 143, 169, 172, 143, 170, 227, 143, 170, 226, 143, 170, 229, +143, 170, 228, 143, 170, 242, 143, 169, 176, 143, 169, 206, 143, 171, 162, 143, +171, 161, 143, 171, 164, 143, 171, 170, 143, 171, 163, 143, 171, 169, 143, 169, +193, 143, 171, 174, 143, 171, 178, 143, 171, 177, 143, 171, 180, 143, 171, 179, +143, 171, 192, 143, 171, 191, 143, 171, 194, 143, 171, 193, 143, 169, 195, 143, +171, 208, 143, 171, 210, 143, 171, 209, 143, 171, 212, 143, 171, 216, 143, 171, +211, 161, 224, 143, 169, 204, 143, 171, 227, 143, 171, 226, 143, 171, 229, 143, +171, 228, 143, 171, 242, 143, 169, 208, 143, 171, 243, 143, 170, 167, 143, 170, +175, 143, 170, 182, 143, 170, 189, 143, 170, 197, 143, 170, 200, 143, 171, 203, +143, 171, 206, 143, 169, 173, 143, 170, 221, 143, 169, 175, 143, 170, 232, 143, +171, 245, 143, 170, 166, 143, 170, 237, 143, 171, 185, 143, 162, 176, 143, 162, +175, 143, 162, 184, 143, 166, 233, 166, 168, 166, 178, 143, 166, 242, 166, 199, +166, 209, 143, 166, 250, 167, 167, 143, 167, 203, 167, 166, 167, 177, 167, 187, +167, 212, 167, 223, 167, 233, 167, 215, 143, 167, 251, 161, 190, 161, 200, 161, +196, 162, 243, 162, 168, 161, 238, 143, 162, 241, 143, 162, 239, 162, 171, 162, +205, 162, 207, 162, 187, 162, 229, 162, 202, 161, 232, 162, 226, 161, 226, 162, +227, 162, 190, 162, 221, 162, 222, 168, 161, 168, 163, 168, 177, 168, 178, 168, +184, 168, 181, 168, 182, 162, 163, 162, 165, 162, 167, 162, 161, 162, 254, 161, +250, 161, 234, 162, 246, 161, 161, 161, 212, 161, 204, 164, 161, 164, 171, 164, +181, 164, 191, 164, 201, 164, 211, 164, 221, 164, 231, 164, 241, 161, 171, 165, +165, 165, 175, 165, 185, 165, 195, 165, 205, 165, 215, 165, 225, 165, 235, 165, +245, 176, 236, 190, 229, 179, 238, 190, 231, 143, 176, 169, 182, 250, 208, 167, +143, 176, 178, 143, 176, 179, 143, 176, 181, 143, 176, 183, 198, 253, 180, 165, +205, 189, 184, 223, 176, 161, 203, 242, 208, 183, 191, 205, 208, 188, 208, 186, +201, 213, 143, 176, 201, 208, 193, 208, 195, 180, 235, 143, 176, 214, 143, 176, +217, 143, 176, 221, 191, 173, 143, 176, 231, 143, 176, 235, 143, 176, 238, 143, +176, 223, 143, 176, 242, 202, 187, 187, 200, 143, 177, 162, 143, 177, 168, 176, +205, 213, 165, 191, 175, 202, 216, 143, 177, 187, 208, 215, 208, 216, 189, 164, +202, 240, 143, 177, 203, 143, 177, 207, 143, 177, 211, 143, 177, 216, 208, 235, +182, 230, 143, 177, 223, 143, 177, 228, 208, 243, 143, 177, 236, 143, 177, 242, +194, 166, 208, 250, 143, 177, 251, 143, 178, 163, 143, 178, 167, 143, 178, 172, +208, 253, 183, 185, 209, 161, 143, 178, 185, 143, 178, 189, 193, 206, 143, 178, +197, 202, 200, 143, 178, 202, 143, 178, 210, 209, 179, 143, 178, 218, 143, 178, +223, 209, 184, 189, 188, 143, 178, 231, 197, 222, 143, 178, 237, 209, 194, 197, +181, 209, 196, 209, 198, 209, 204, 180, 167, 209, 209, 186, 227, 143, 178, 252, +143, 179, 161, 143, 179, 164, 244, 165, 189, 232, 209, 224, 189, 208, 209, 227, +209, 230, 143, 179, 183, 143, 179, 184, 209, 233, 183, 244, 196, 230, 193, 176, +143, 179, 193, 143, 179, 199, 143, 179, 201, 143, 179, 203, 143, 179, 206, 143, +179, 209, 143, 179, 212, 178, 195, 197, 216, 207, 171, 179, 175, 143, 179, 232, +240, 213, 143, 179, 239, 210, 171, 143, 179, 246, 188, 219, 202, 241, 210, 183, +186, 252, 210, 186, 143, 180, 175, 210, 190, 143, 180, 182, 143, 180, 183, 198, +238, 143, 180, 187, 143, 180, 190, 210, 203, 210, 204, 143, 180, 198, 206, 210, +143, 180, 204, 210, 209, 143, 180, 212, 187, 178, 193, 208, 188, 232, 143, 180, +224, 194, 254, 143, 180, 227, 210, 222, 177, 165, 143, 180, 230, 200, 221, 143, +180, 236, 202, 173, 202, 242, 198, 221, 143, 180, 244, 188, 254, 204, 163, 204, +191, 143, 181, 164, 210, 240, 143, 181, 170, 143, 181, 173, 143, 181, 179, 143, +181, 183, 143, 181, 185, 211, 166, 211, 175, 143, 181, 191, 143, 181, 193, 143, +181, 197, 143, 181, 202, 176, 162, 143, 181, 206, 143, 181, 209, 211, 177, 143, +181, 217, 211, 183, 143, 181, 225, 211, 193, 143, 181, 232, 143, 181, 236, 180, +238, 183, 246, 143, 181, 244, 143, 181, 245, 143, 181, 249, 143, 182, 161, 143, +182, 165, 143, 182, 167, 143, 182, 168, 143, 182, 170, 143, 182, 175, 143, 182, +179, 178, 222, 143, 182, 182, 143, 182, 188, 143, 182, 195, 143, 182, 199, 143, +182, 200, 180, 239, 143, 182, 210, 211, 230, 211, 231, 211, 233, 143, 182, 221, +143, 182, 225, 143, 182, 231, 143, 182, 233, 211, 244, 211, 247, 143, 182, 244, +143, 182, 250, 143, 182, 252, 185, 241, 143, 183, 165, 143, 183, 168, 143, 183, +171, 143, 183, 177, 143, 183, 182, 212, 173, 143, 183, 188, 212, 175, 212, 179, +143, 183, 197, 143, 183, 205, 212, 180, 212, 181, 212, 182, 143, 183, 220, 143, +183, 225, 212, 184, 143, 183, 230, 143, 183, 231, 212, 191, 199, 184, 143, 183, +239, 143, 183, 243, 180, 240, 143, 183, 251, 194, 196, 143, 184, 165, 180, 174, +190, 236, 143, 184, 172, 143, 184, 173, 197, 227, 186, 201, 143, 184, 183, 212, +199, 143, 184, 185, 143, 184, 189, 202, 232, 143, 184, 199, 203, 207, 143, 184, +206, 143, 184, 208, 195, 197, 212, 219, 212, 224, 143, 184, 221, 143, 184, 222, +212, 232, 202, 209, 143, 184, 228, 143, 184, 231, 194, 231, 188, 186, 212, 243, +198, 224, 143, 184, 244, 143, 184, 248, 212, 252, 143, 185, 162, 143, 185, 167, +199, 165, 143, 185, 172, 143, 185, 174, 197, 202, 143, 185, 182, 143, 185, 185, +187, 207, 213, 172, 143, 185, 195, 143, 185, 198, 176, 249, 213, 178, 143, 185, +210, 143, 185, 211, 143, 185, 215, 213, 183, 213, 180, 143, 185, 223, 186, 167, +143, 185, 228, 143, 185, 231, 143, 185, 235, 143, 185, 238, 143, 185, 243, 143, +185, 246, 143, 185, 251, 213, 191, 183, 249, 213, 197, 143, 186, 167, 143, 186, +169, 143, 186, 171, 143, 186, 174, 213, 201, 213, 202, 143, 186, 182, 196, 220, +213, 206, 213, 210, 143, 186, 187, 213, 212, 204, 210, 213, 216, 213, 218, 143, +186, 196, 177, 167, 143, 186, 205, 176, 184, 205, 168, 143, 186, 213, 205, 198, +213, 227, 143, 186, 221, 143, 186, 224, 178, 201, 213, 237, 195, 254, 188, 247, +176, 211, 213, 245, 143, 186, 235, 213, 248, 143, 186, 244, 198, 244, 213, 252, +214, 161, 143, 186, 248, 193, 216, 214, 165, 214, 168, 143, 187, 169, 214, 170, +143, 187, 174, 193, 187, 143, 187, 181, 214, 176, 214, 180, 143, 187, 187, 143, +187, 188, 178, 229, 143, 187, 192, 214, 183, 191, 242, 214, 194, 214, 193, 143, +187, 201, 143, 187, 203, 143, 187, 206, 143, 187, 211, 214, 201, 214, 191, 191, +243, 214, 205, 143, 187, 226, 143, 187, 230, 143, 187, 232, 214, 211, 143, 187, +240, 143, 230, 244, 214, 217, 143, 187, 247, 214, 221, 192, 238, 185, 170, 184, +202, 180, 172, 200, 193, 214, 230, 214, 231, 191, 227, 194, 211, 203, 185, 214, +243, 143, 188, 181, 143, 188, 184, 143, 188, 187, 180, 179, 205, 196, 200, 223, +196, 236, 214, 249, 143, 188, 201, 176, 195, 143, 188, 207, 206, 247, 179, 199, +215, 163, 215, 168, 215, 172, 215, 176, 143, 188, 223, 181, 221, 143, 188, 227, +184, 204, 188, 229, 143, 188, 239, 143, 188, 244, 143, 188, 247, 143, 188, 250, +201, 167, 190, 180, 143, 189, 166, 183, 194, 143, 189, 171, 215, 208, 143, 189, +178, 200, 249, 143, 189, 183, 191, 180, 199, 166, 187, 214, 143, 189, 195, 178, +247, 199, 176, 215, 221, 143, 189, 210, 143, 189, 213, 143, 189, 217, 215, 226, +143, 189, 220, 143, 189, 222, 215, 240, 143, 189, 228, 215, 239, 178, 184, 183, +195, 143, 189, 236, 188, 189, 143, 189, 243, 143, 189, 246, 216, 166, 143, 189, +253, 143, 190, 161, 190, 240, 143, 190, 170, 143, 190, 173, 193, 218, 194, 198, +216, 185, 216, 180, 143, 190, 188, 182, 242, 216, 195, 143, 190, 202, 216, 198, +143, 190, 209, 216, 216, 216, 215, 183, 197, 216, 213, 143, 190, 216, 216, 220, +216, 225, 143, 190, 229, 198, 180, 183, 251, 143, 190, 239, 216, 234, 178, 251, +143, 190, 246, 216, 239, 196, 168, 216, 246, 143, 191, 167, 178, 230, 216, 254, +192, 239, 217, 165, 204, 225, 143, 191, 182, 143, 191, 184, 143, 191, 189, 143, +191, 191, 202, 177, 200, 227, 217, 183, 143, 191, 197, 185, 179, 143, 191, 201, +202, 250, 217, 187, 195, 180, 217, 188, 192, 219, 143, 191, 214, 143, 191, 216, +189, 166, 217, 205, 143, 191, 225, 182, 180, 143, 191, 228, 143, 191, 231, 193, +222, 194, 170, 143, 191, 244, 143, 191, 248, 143, 191, 252, 199, 177, 143, 192, +167, 199, 211, 143, 192, 174, 191, 228, 183, 199, 143, 192, 180, 143, 192, 183, +217, 231, 143, 192, 189, 217, 226, 143, 192, 195, 217, 236, 143, 192, 201, 217, +211, 217, 238, 143, 192, 213, 183, 200, 143, 192, 217, 197, 166, 143, 192, 230, +143, 192, 231, 204, 206, 183, 226, 143, 192, 238, 143, 192, 242, 143, 192, 247, +199, 197, 179, 201, 143, 193, 161, 143, 193, 166, 218, 166, 197, 167, 181, 188, +218, 177, 218, 181, 143, 193, 185, 143, 193, 188, 143, 193, 192, 143, 193, 196, +218, 189, 202, 252, 218, 195, 143, 193, 206, 218, 201, 143, 193, 210, 218, 202, +143, 193, 213, 202, 184, 200, 195, 218, 207, 192, 205, 187, 219, 202, 253, 218, +211, 143, 193, 232, 143, 193, 236, 180, 251, 189, 220, 143, 193, 242, 218, 224, +143, 193, 249, 218, 230, 143, 194, 166, 143, 194, 172, 195, 235, 143, 194, 179, +143, 194, 182, 143, 194, 187, 179, 162, 218, 242, 195, 210, 218, 247, 218, 245, +218, 248, 196, 170, 143, 194, 217, 219, 162, 143, 194, 224, 143, 194, 227, 219, +163, 219, 165, 143, 194, 234, 219, 170, 194, 216, 205, 173, 143, 194, 241, 196, +171, 219, 176, 188, 235, 181, 224, 143, 194, 249, 194, 188, 197, 206, 143, 195, +161, 219, 191, 143, 195, 166, 219, 199, 143, 195, 170, 143, 195, 175, 219, 197, +143, 195, 177, 143, 195, 181, 143, 195, 188, 199, 240, 143, 195, 193, 219, 207, +219, 211, 143, 195, 184, 198, 202, 192, 242, 143, 195, 204, 143, 195, 207, 143, +195, 212, 143, 195, 214, 143, 195, 217, 182, 205, 143, 195, 223, 201, 176, 143, +195, 228, 143, 195, 233, 199, 223, 219, 231, 143, 195, 241, 143, 195, 245, 196, +244, 219, 238, 180, 254, 143, 195, 254, 143, 196, 165, 220, 168, 143, 196, 173, +220, 170, 220, 166, 196, 199, 191, 250, 220, 176, 220, 191, 143, 196, 193, 143, +196, 195, 201, 246, 220, 194, 143, 196, 204, 143, 196, 209, 207, 176, 186, 231, +207, 177, 220, 213, 143, 196, 222, 143, 196, 225, 220, 201, 185, 189, 143, 196, +232, 143, 196, 234, 220, 229, 220, 223, 143, 196, 244, 143, 196, 245, 201, 184, +220, 235, 220, 211, 220, 247, 220, 237, 143, 197, 170, 181, 204, 220, 243, 143, +197, 180, 143, 197, 182, 143, 197, 187, 221, 161, 220, 253, 221, 168, 221, 166, +221, 165, 143, 197, 206, 143, 197, 210, 143, 197, 213, 143, 197, 216, 221, 178, +205, 243, 143, 197, 226, 143, 197, 230, 178, 164, 205, 223, 182, 214, 221, 188, +143, 197, 244, 143, 197, 247, 143, 197, 249, 186, 208, 143, 197, 254, 189, 222, +221, 205, 143, 198, 166, 143, 198, 171, 221, 213, 143, 198, 178, 143, 198, 182, +221, 218, 221, 219, 221, 221, 143, 198, 192, 143, 198, 195, 143, 198, 199, 181, +164, 221, 230, 143, 198, 209, 177, 202, 181, 225, 143, 198, 218, 180, 192, 221, +233, 143, 198, 226, 143, 198, 230, 221, 235, 198, 217, 178, 173, 203, 215, 203, +247, 202, 168, 143, 198, 246, 200, 231, 143, 198, 254, 143, 199, 163, 222, 165, +143, 199, 170, 143, 199, 171, 143, 199, 174, 222, 172, 196, 197, 143, 199, 184, +143, 199, 186, 190, 244, 143, 199, 189, 143, 199, 192, 179, 189, 179, 164, 143, +199, 198, 205, 176, 143, 199, 203, 143, 199, 206, 143, 199, 208, 143, 199, 212, +143, 199, 215, 222, 204, 143, 199, 221, 143, 199, 225, 189, 223, 143, 199, 231, +222, 189, 222, 188, 222, 219, 178, 185, 143, 199, 237, 222, 220, 222, 218, 143, +199, 251, 143, 200, 161, 222, 208, 143, 200, 165, 200, 174, 189, 224, 143, 200, +170, 222, 228, 205, 207, 143, 200, 178, 143, 200, 183, 222, 237, 194, 218, 143, +200, 187, 223, 163, 181, 249, 143, 200, 196, 143, 200, 198, 199, 249, 143, 200, +204, 143, 200, 208, 222, 243, 143, 200, 212, 143, 200, 217, 189, 225, 196, 172, +223, 166, 223, 173, 143, 200, 231, 143, 200, 237, 143, 200, 240, 223, 186, 143, +200, 248, 183, 227, 143, 200, 254, 223, 190, 143, 201, 162, 143, 201, 163, 223, +171, 143, 201, 169, 143, 201, 173, 223, 198, 223, 202, 195, 245, 223, 208, 143, +201, 182, 143, 201, 185, 143, 201, 189, 143, 201, 192, 178, 208, 143, 201, 198, +143, 201, 201, 177, 234, 143, 201, 208, 143, 201, 210, 223, 220, 223, 218, 206, +245, 143, 201, 218, 223, 223, 223, 216, 223, 226, 143, 201, 230, 177, 235, 143, +201, 234, 143, 201, 236, 193, 179, 143, 201, 242, 143, 201, 247, 223, 230, 143, +201, 254, 223, 236, 143, 202, 162, 223, 239, 223, 237, 244, 166, 223, 241, 143, +202, 174, 223, 245, 197, 245, 223, 246, 143, 202, 187, 187, 184, 223, 253, 224, +162, 143, 202, 193, 143, 202, 194, 143, 202, 197, 224, 166, 224, 170, 224, 172, +224, 175, 143, 202, 211, 143, 202, 215, 203, 210, 143, 202, 224, 143, 202, 227, +224, 182, 224, 183, 181, 190, 184, 164, 190, 245, 143, 202, 242, 143, 202, 245, +143, 202, 247, 224, 195, 198, 200, 224, 198, 143, 203, 162, 143, 203, 167, 224, +200, 143, 203, 173, 143, 203, 177, 205, 177, 143, 203, 184, 143, 203, 185, 224, +213, 189, 195, 143, 203, 199, 224, 217, 143, 203, 207, 143, 203, 210, 143, 203, +215, 143, 203, 220, 143, 203, 225, 143, 203, 227, 178, 209, 143, 203, 236, 143, +203, 240, 188, 238, 183, 190, 143, 203, 248, 184, 189, 206, 176, 143, 204, 168, +143, 204, 170, 143, 204, 178, 143, 204, 182, 143, 204, 184, 143, 204, 189, 143, +204, 192, 143, 204, 194, 143, 204, 199, 224, 247, 143, 204, 208, 143, 204, 213, +224, 229, 143, 204, 226, 143, 204, 231, 143, 204, 234, 143, 204, 238, 143, 204, +242, 143, 204, 245, 225, 166, 143, 204, 252, 143, 204, 254, 185, 249, 197, 188, +225, 180, 197, 196, 196, 174, 225, 183, 143, 205, 180, 206, 177, 225, 191, 143, +205, 187, 143, 205, 189, 143, 205, 196, 193, 193, 143, 205, 201, 225, 207, 225, +215, 225, 214, 143, 205, 211, 225, 218, 143, 205, 216, 143, 205, 221, 143, 205, +225, 225, 224, 143, 205, 231, 143, 205, 236, 143, 205, 242, 143, 205, 247, 225, +240, 143, 206, 161, 143, 206, 167, 204, 254, 225, 245, 225, 252, 143, 206, 179, +197, 208, 143, 206, 182, 187, 169, 226, 173, 143, 206, 193, 200, 233, 226, 176, +226, 179, 143, 206, 205, 226, 181, 143, 206, 209, 226, 187, 196, 190, 189, 226, +226, 190, 143, 206, 222, 143, 206, 228, 226, 197, 143, 206, 234, 143, 206, 239, +143, 206, 243, 143, 206, 248, 143, 206, 253, 143, 207, 163, 143, 207, 168, 226, +208, 226, 211, 143, 207, 176, 143, 207, 179, 143, 207, 182, 143, 207, 186, 226, +218, 143, 207, 189, 143, 207, 192, 143, 207, 195, 182, 235, 192, 208, 186, 189, +226, 230, 143, 207, 212, 181, 206, 203, 164, 185, 220, 143, 207, 225, 143, 207, +228, 143, 207, 234, 200, 163, 226, 239, 226, 238, 200, 234, 143, 207, 244, 202, +203, 143, 207, 252, 143, 208, 161, 226, 252, 200, 216, 227, 162, 143, 208, 173, +176, 235, 143, 208, 185, 143, 208, 188, 143, 208, 190, 143, 208, 191, 143, 208, +196, 143, 208, 200, 143, 208, 203, 143, 208, 207, 143, 208, 211, 227, 175, 190, +205, 143, 208, 220, 143, 208, 223, 227, 180, 143, 208, 229, 143, 208, 235, 143, +208, 238, 143, 208, 242, 143, 208, 244, 143, 208, 249, 143, 208, 252, 199, 233, +190, 206, 176, 220, 143, 209, 172, 143, 209, 176, 143, 209, 178, 143, 209, 181, +227, 202, 227, 203, 143, 209, 192, 178, 186, 143, 209, 198, 190, 247, 143, 209, +206, 143, 209, 208, 143, 209, 211, 143, 209, 216, 143, 209, 219, 227, 221, 143, +209, 223, 227, 227, 143, 209, 229, 227, 234, 227, 237, 143, 209, 234, 143, 209, +239, 143, 209, 242, 181, 232, 143, 209, 244, 227, 250, 227, 252, 227, 247, 143, +210, 163, 143, 210, 167, 195, 222, 228, 184, 228, 170, 228, 172, 143, 210, 180, +143, 210, 182, 228, 176, 143, 210, 189, 143, 210, 191, 143, 210, 196, 200, 207, +228, 189, 143, 210, 207, 198, 198, 143, 210, 212, 143, 210, 218, 143, 210, 224, +228, 194, 143, 210, 231, 143, 210, 233, 143, 210, 237, 228, 213, 143, 210, 244, +228, 216, 143, 210, 254, 143, 211, 164, 202, 198, 143, 211, 171, 143, 211, 173, +206, 179, 143, 211, 176, 228, 234, 228, 236, 143, 211, 184, 143, 211, 187, 228, +245, 228, 246, 143, 211, 199, 228, 250, 181, 234, 143, 211, 205, 143, 211, 209, +229, 162, 143, 211, 215, 186, 217, 186, 176, 193, 200, 229, 174, 143, 211, 230, +229, 179, 229, 177, 143, 211, 238, 143, 211, 243, 143, 211, 249, 143, 211, 252, +229, 194, 188, 250, 143, 212, 166, 143, 212, 169, 143, 212, 174, 143, 212, 177, +229, 206, 143, 212, 184, 143, 212, 187, 143, 212, 179, 229, 208, 143, 212, 194, +229, 213, 203, 165, 229, 220, 143, 212, 206, 193, 161, 191, 165, 229, 229, 229, +234, 143, 212, 221, 229, 239, 143, 212, 226, 143, 212, 229, 229, 251, 180, 204, +143, 212, 240, 230, 163, 230, 169, 143, 212, 250, 143, 212, 254, 200, 237, 230, +176, 230, 181, 143, 213, 171, 143, 213, 174, 143, 213, 178, 230, 192, 143, 213, +183, 143, 213, 185, 143, 213, 187, 143, 213, 190, 143, 213, 194, 230, 203, 185, +205, 143, 213, 203, 204, 215, 230, 212, 143, 213, 216, 204, 237, 143, 213, 226, +230, 216, 192, 187, 143, 213, 228, 143, 213, 231, 191, 166, 143, 213, 234, 207, +190, 190, 211, 184, 212, 143, 213, 241, 143, 213, 242, 176, 223, 143, 213, 245, +143, 213, 250, 184, 213, 143, 213, 253, 182, 187, 187, 233, 143, 214, 170, 143, +214, 175, 143, 214, 178, 196, 177, 143, 214, 183, 201, 229, 231, 181, 143, 214, +193, 231, 171, 194, 220, 231, 174, 231, 178, 231, 177, 143, 214, 209, 231, 187, +231, 190, 231, 193, 143, 214, 220, 143, 214, 224, 143, 214, 226, 143, 214, 231, +143, 214, 236, 218, 170, 143, 214, 240, 143, 214, 244, 143, 214, 247, 143, 214, +248, 231, 217, 143, 215, 161, 143, 215, 165, 143, 215, 167, 231, 226, 143, 215, +171, 231, 232, 143, 215, 180, 143, 215, 184, 231, 236, 143, 215, 195, 203, 167, +178, 234, 143, 215, 207, 143, 215, 209, 143, 215, 212, 143, 215, 216, 231, 249, +231, 247, 183, 212, 232, 173, 143, 215, 233, 143, 215, 234, 195, 227, 232, 166, +183, 213, 143, 215, 227, 143, 215, 253, 178, 174, 232, 174, 143, 216, 168, 143, +216, 174, 143, 216, 176, 205, 233, 232, 207, 143, 216, 183, 143, 216, 187, 186, +218, 143, 216, 191, 232, 203, 143, 216, 196, 143, 216, 198, 143, 216, 201, 232, +206, 232, 212, 232, 226, 143, 216, 207, 143, 216, 212, 143, 216, 217, 198, 161, +232, 211, 232, 216, 143, 216, 232, 190, 213, 143, 216, 236, 232, 231, 143, 216, +240, 143, 216, 244, 143, 216, 247, 143, 216, 251, 143, 216, 254, 143, 217, 162, +143, 217, 166, 143, 217, 171, 232, 209, 143, 217, 178, 177, 182, 143, 217, 183, +143, 217, 188, 202, 195, 232, 254, 143, 217, 197, 143, 217, 201, 207, 207, 233, +177, 143, 217, 216, 143, 217, 220, 177, 242, 143, 217, 228, 204, 244, 143, 217, +232, 207, 206, 143, 217, 242, 233, 185, 143, 217, 247, 200, 205, 143, 217, 252, +233, 193, 233, 190, 221, 177, 143, 218, 174, 205, 246, 143, 218, 178, 143, 218, +183, 233, 200, 143, 218, 188, 143, 218, 193, 195, 238, 143, 218, 200, 143, 218, +237, 233, 206, 143, 218, 210, 233, 219, 143, 218, 218, 143, 218, 222, 233, 217, +233, 220, 233, 221, 233, 222, 194, 253, 203, 170, 233, 235, 195, 216, 143, 218, +254, 143, 219, 162, 143, 219, 166, 143, 219, 172, 143, 219, 174, 233, 251, 143, +219, 177, 233, 253, 233, 247, 234, 167, 143, 219, 192, 143, 219, 196, 234, 165, +143, 219, 203, 205, 230, 234, 175, 143, 219, 214, 143, 219, 217, 143, 219, 222, +143, 219, 226, 234, 187, 143, 219, 232, 143, 219, 237, 234, 192, 143, 219, 248, +143, 219, 250, 234, 197, 143, 220, 164, 222, 167, 179, 185, 185, 213, 234, 206, +234, 210, 182, 222, 194, 222, 194, 181, 143, 220, 190, 143, 220, 192, 184, 211, +143, 220, 195, 143, 220, 197, 234, 227, 143, 220, 206, 234, 235, 234, 236, 234, +233, 143, 220, 214, 179, 236, 143, 220, 222, 234, 243, 143, 220, 228, 143, 220, +233, 234, 247, 143, 220, 240, 143, 220, 243, 235, 162, 143, 220, 250, 143, 220, +254, 202, 164, 143, 221, 166, 179, 208, 143, 221, 173, 235, 178, 235, 180, 179, +209, 235, 185, 191, 168, 143, 221, 189, 143, 221, 193, 143, 221, 197, 143, 221, +199, 235, 194, 235, 196, 143, 221, 210, 191, 199, 143, 221, 217, 186, 190, 235, +199, 143, 221, 229, 181, 205, 143, 221, 235, 235, 209, 143, 221, 243, 143, 221, +248, 235, 216, 198, 201, 143, 222, 162, 235, 219, 180, 210, 207, 192, 235, 227, +235, 221, 143, 222, 180, 143, 222, 183, 143, 222, 191, 235, 226, 143, 222, 189, +235, 245, 235, 240, 235, 244, 143, 222, 201, 143, 222, 202, 201, 232, 183, 217, +181, 196, 143, 222, 213, 218, 206, 143, 222, 221, 143, 222, 224, 195, 171, 236, +175, 143, 222, 233, 236, 181, 190, 221, 208, 174, 143, 222, 250, 236, 186, 203, +198, 236, 194, 185, 215, 192, 213, 236, 202, 178, 236, 194, 177, 143, 223, 178, +199, 229, 188, 193, 143, 223, 187, 143, 223, 191, 143, 223, 194, 236, 219, 192, +214, 143, 223, 201, 143, 223, 202, 177, 219, 143, 223, 209, 143, 223, 211, 143, +223, 214, 143, 223, 218, 143, 223, 222, 143, 223, 227, 143, 223, 230, 236, 240, +236, 238, 143, 223, 242, 236, 245, 236, 244, 143, 223, 250, 236, 247, 237, 169, +236, 253, 143, 224, 171, 236, 254, 143, 224, 177, 143, 224, 181, 143, 224, 184, +189, 179, 237, 175, 237, 179, 143, 224, 198, 237, 186, 191, 200, 143, 224, 209, +143, 224, 212, 188, 214, 143, 224, 219, 198, 240, 237, 199, 143, 224, 225, 143, +224, 230, 237, 210, 143, 224, 235, 143, 224, 239, 206, 216, 143, 224, 248, 237, +217, 237, 219, 143, 225, 166, 143, 225, 170, 191, 201, 143, 225, 177, 237, 231, +202, 213, 203, 248, 183, 222, 237, 233, 143, 225, 195, 143, 225, 197, 237, 254, +143, 225, 203, 143, 225, 206, 237, 248, 194, 164, 143, 225, 212, 143, 225, 216, +238, 167, 238, 166, 198, 187, 143, 225, 223, 143, 225, 226, 238, 175, 206, 203, +237, 238, 205, 184, 143, 225, 241, 143, 225, 245, 238, 184, 143, 225, 251, 143, +226, 163, 143, 226, 173, 143, 226, 169, 201, 244, 143, 226, 178, 143, 226, 179, +143, 226, 185, 238, 192, 143, 226, 193, 143, 226, 199, 143, 226, 203, 143, 226, +209, 143, 226, 212, 188, 242, 143, 226, 220, 189, 183, 185, 243, 143, 226, 228, +238, 204, 143, 226, 237, 143, 226, 240, 238, 208, 238, 211, 143, 226, 254, 238, +216, 143, 227, 164, 191, 203, 182, 252, 143, 227, 179, 143, 227, 182, 143, 227, +187, 143, 227, 193, 143, 227, 198, 143, 227, 203, 143, 227, 207, 143, 227, 213, +197, 180, 143, 227, 223, 143, 227, 226, 200, 173, 143, 227, 236, 143, 227, 242, +189, 198, 143, 227, 251, 143, 227, 254, 143, 228, 164, 143, 228, 169, 238, 248, +143, 228, 181, 143, 228, 188, 143, 228, 193, 143, 228, 200, 143, 228, 205, 181, +248, 143, 228, 212, 143, 228, 214, 191, 238, 239, 162, 207, 163, 143, 228, 230, +238, 253, 143, 228, 235, 143, 228, 241, 143, 228, 243, 239, 171, 143, 229, 161, +143, 229, 167, 143, 229, 172, 143, 229, 176, 143, 229, 181, 143, 229, 183, 143, +229, 188, 143, 229, 195, 239, 178, 182, 192, 143, 229, 207, 143, 229, 212, 143, +229, 217, 143, 229, 222, 239, 197, 239, 195, 239, 196, 143, 229, 231, 143, 229, +236, 143, 229, 238, 143, 229, 241, 239, 206, 239, 209, 239, 216, 196, 185, 239, +217, 143, 230, 164, 239, 221, 239, 224, 143, 230, 173, 143, 230, 176, 239, 234, +239, 235, 198, 174, 239, 243, 201, 236, 143, 230, 201, 143, 230, 203, 193, 203, +239, 251, 143, 230, 214, 143, 230, 217, 240, 165, 198, 171, 143, 230, 224, 231, +161, 240, 168, 143, 230, 233, 143, 230, 237, 143, 230, 240, 191, 253, 143, 230, +242, 240, 186, 143, 230, 249, 143, 230, 250, 206, 237, 188, 251, 206, 238, 240, +195, 143, 231, 167, 240, 199, 240, 201, 240, 205, 192, 196, 240, 208, 240, 211, +240, 215, 143, 231, 191, 240, 217, 240, 223, 143, 231, 199, 240, 228, 202, 220, +143, 231, 210, 240, 231, 143, 231, 223, 143, 231, 228, 143, 231, 235, 240, 236, +143, 231, 240, 202, 199, 240, 243, 143, 231, 249, 143, 231, 252, 143, 232, 161, +143, 232, 167, 143, 232, 170, 179, 220, 180, 234, 143, 232, 180, 143, 232, 185, +201, 247, 143, 232, 190, 143, 232, 195, 143, 232, 199, 200, 244, 143, 232, 202, +200, 211, 187, 244, 143, 232, 209, 143, 232, 211, 143, 232, 216, 143, 232, 220, +143, 232, 223, 143, 232, 230, 241, 189, 241, 190, 143, 232, 242, 188, 243, 241, +198, 143, 232, 251, 143, 233, 162, 194, 204, 195, 243, 143, 233, 170, 143, 233, +173, 241, 209, 241, 211, 241, 215, 241, 214, 241, 217, 143, 233, 194, 143, 233, +197, 241, 219, 143, 233, 204, 143, 233, 207, 241, 225, 241, 229, 241, 233, 185, +252, 143, 233, 218, 241, 238, 143, 233, 228, 143, 233, 231, 143, 233, 236, 143, +233, 240, 241, 249, 143, 233, 247, 143, 233, 254, 143, 234, 167, 242, 163, 242, +166, 143, 234, 178, 143, 234, 182, 179, 161, 143, 234, 187, 143, 234, 189, 143, +234, 194, 143, 234, 200, 143, 234, 205, 143, 234, 209, 143, 234, 215, 242, 184, +143, 234, 223, 143, 234, 226, 143, 234, 230, 143, 234, 234, 242, 196, 143, 234, +242, 194, 228, 143, 234, 247, 143, 234, 251, 143, 235, 161, 242, 218, 143, 235, +168, 143, 235, 172, 143, 235, 177, 201, 201, 143, 235, 186, 143, 235, 188, 143, +235, 194, 143, 235, 200, 143, 235, 205, 143, 235, 211, 242, 233, 196, 187, 242, +236, 143, 235, 222, 178, 170, 143, 235, 225, 242, 245, 143, 235, 229, 143, 235, +234, 242, 247, 243, 165, 177, 173, 143, 235, 248, 143, 235, 252, 143, 236, 163, +143, 236, 167, 143, 236, 173, 143, 236, 175, 243, 170, 143, 236, 180, 143, 236, +183, 143, 236, 186, 243, 186, 143, 236, 193, 143, 236, 198, 143, 236, 202, 243, +191, 143, 236, 207, 143, 236, 210, 243, 193, 243, 195, 188, 175, 243, 200, 243, +203, 206, 219, 243, 207, 143, 236, 238, 221, 224, 143, 236, 242, 185, 245, 243, +217, 143, 236, 247, 143, 236, 252, 243, 228, 243, 231, 143, 237, 168, 143, 237, +175, 143, 237, 178, 143, 237, 182, 201, 161, 143, 237, 194, 240, 237, 143, 237, +202, 243, 245, 143, 237, 210, 143, 237, 214, 206, 182, 143, 237, 222, 143, 237, +224, 161, 170, 161, 220, 163, 181, 161, 169, 163, 201, 163, 211, 161, 207, 163, +231, 163, 241, 161, 208, 142, 165, 142, 175, 142, 185, 142, 195, 142, 205, 142, +215, 161, 177 + }); + + super.setUp(); + } + + @Override + public void test_CodecDynamic () throws CharacterCodingException { + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + decoder.onMalformedInput(CodingErrorAction.REPORT); + CharBuffer inputCB = CharBuffer.allocate(65536); + for (int code = 32; code <= 65533; code ++) { + if ((encoder.canEncode((char) code)) + && (code != 165) && (code != 8254) && (code != 63599)) { + inputCB.put((char) code); + } + } + inputCB.rewind(); + ByteBuffer intermediateBB = encoder.encode(inputCB); + inputCB.rewind(); + intermediateBB.rewind(); + CharBuffer outputCB = decoder.decode(intermediateBB); + outputCB.rewind(); + assertEqualCBs("decode(encode(A)) must be identical with A!", + inputCB, outputCB); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_EUC_KR.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_EUC_KR.java new file mode 100644 index 0000000..9c81986 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_EUC_KR.java @@ -0,0 +1,493 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.EUC_KR.class) + +public class Charset_MultiByte_EUC_KR extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "EUC-KR"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +161, 164, 167, 168, 170, 173, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, +188, 189, 190, 191, 198, 208, 215, 216, 222, 223, 230, 240, 247, 248, 254, 273, +294, 305, 319, 329, 339, 358, 711, 728, 913, 923, 933, 945, 955, 965, 1025, 1040, +1050, 1060, 1070, 1080, 1090, 1100, 8213, 8224, 8240, 8251, 8308, 8319, 8451, 8467, 8481, 8491, +8531, 8541, 8551, 8561, 8592, 8658, 8704, 8715, 8730, 8741, 8756, 8786, 8800, 8810, 8834, 8857, +8869, 8978, 9312, 9322, 9332, 9342, 9372, 9382, 9392, 9424, 9434, 9444, 9472, 9484, 9494, 9504, +9514, 9524, 9534, 9544, 9618, 9632, 9650, 9660, 9670, 9680, 9733, 9743, 9756, 9792, 9824, 9834, +12288, 12298, 12308, 12353, 12363, 12373, 12383, 12393, 12403, 12413, 12423, 12433, 12449, 12459, 12469, 12479, +12489, 12499, 12509, 12519, 12529, 12593, 12603, 12613, 12623, 12633, 12643, 12653, 12663, 12673, 12683, 12800, +12810, 12820, 12896, 12906, 12916, 12927, 13184, 13194, 13204, 13214, 13224, 13234, 13244, 13254, 13264, 13275, +19968, 19978, 19988, 19998, 20013, 20024, 20034, 20045, 20056, 20075, 20086, 20098, 20108, 20120, 20130, 20140, +20150, 20160, 20170, 20180, 20191, 20208, 20219, 20233, 20271, 20282, 20294, 20304, 20314, 20329, 20339, 20350, +20360, 20374, 20398, 20415, 20425, 20435, 20445, 20462, 20472, 20482, 20493, 20505, 20515, 20525, 20539, 20551, +20565, 20581, 20596, 20608, 20621, 20632, 20652, 20663, 20677, 20687, 20698, 20709, 20729, 20740, 20754, 20767, +20778, 20791, 20801, 20811, 20828, 20839, 20849, 20860, 20870, 20882, 20896, 20906, 20918, 20932, 20956, 20976, +20986, 20998, 21009, 21021, 21033, 21046, 21059, 21069, 21083, 21097, 21109, 21119, 21129, 21147, 21161, 21182, +21193, 21205, 21215, 21235, 21246, 21256, 21269, 21280, 21290, 21305, 21315, 21325, 21335, 21350, 21360, 21373, +21395, 21407, 21421, 21435, 21448, 21460, 21473, 21483, 21496, 21507, 21517, 21531, 21542, 21555, 21566, 21576, +21608, 21619, 21629, 21644, 21668, 21683, 21693, 21704, 21729, 21741, 21754, 21764, 21774, 21788, 21807, 21822, +21839, 21854, 21884, 21894, 21912, 21927, 21957, 21972, 21983, 22013, 22025, 22036, 22063, 22099, 22120, 22132, +22150, 22181, 22196, 22218, 22234, 22256, 22266, 22276, 22290, 22303, 22317, 22331, 22343, 22353, 22369, 22382, +22396, 22408, 22419, 22432, 22467, 22478, 22495, 22512, 22522, 22533, 22558, 22570, 22580, 22602, 22612, 22622, +22645, 22659, 22675, 22686, 22696, 22707, 22718, 22734, 22744, 22756, 22767, 22777, 22799, 22809, 22823, 22833, +22846, 22856, 22868, 22880, 22890, 22900, 22914, 22931, 22949, 22969, 22979, 22992, 23002, 23014, 23032, 23043, +23057, 23067, 23077, 23094, 23105, 23130, 23142, 23186, 23204, 23233, 23244, 23265, 23301, 23318, 23338, 23360, +23376, 23386, 23396, 23408, 23418, 23429, 23439, 23449, 23459, 23470, 23480, 23490, 23500, 23511, 23521, 23531, +23541, 23553, 23563, 23574, 23588, 23601, 23611, 23621, 23633, 23643, 23653, 23663, 23673, 23696, 23713, 23723, +23733, 23744, 23769, 23784, 23796, 23815, 23825, 23847, 23883, 23913, 23943, 23965, 23978, 23992, 24013, 24029, +24039, 24049, 24061, 24076, 24086, 24101, 24115, 24125, 24135, 24149, 24159, 24178, 24188, 24199, 24213, 24224, +24235, 24245, 24258, 24272, 24282, 24300, 24310, 24321, 24335, 24347, 24358, 24369, 24380, 24392, 24406, 24418, +24428, 24439, 24449, 24459, 24471, 24481, 24494, 24505, 24515, 24525, 24535, 24555, 24565, 24575, 24591, 24604, +24615, 24641, 24653, 24665, 24675, 24685, 24709, 24724, 24735, 24752, 24764, 24775, 24785, 24796, 24816, 24826, +24838, 24853, 24863, 24880, 24892, 24903, 24915, 24925, 24935, 24950, 24961, 24974, 24984, 24996, 25006, 25018, +25031, 25062, 25074, 25084, 25095, 25105, 25119, 25130, 25140, 25150, 25160, 25171, 25198, 25209, 25220, 25233, +25243, 25259, 25269, 25282, 25292, 25302, 25324, 25335, 25345, 25361, 25387, 25402, 25417, 25429, 25447, 25458, +25471, 25481, 25494, 25504, 25514, 25536, 25551, 25562, 25581, 25591, 25613, 25623, 25634, 25644, 25658, 25688, +25705, 25720, 25736, 25746, 25758, 25771, 25787, 25797, 25810, 25825, 25836, 25850, 25860, 25880, 25891, 25903, +25913, 25925, 25935, 25950, 25964, 25975, 25986, 25996, 26007, 26017, 26027, 26039, 26049, 26059, 26071, 26083, +26093, 26106, 26118, 26128, 26142, 26152, 26164, 26177, 26187, 26201, 26212, 26222, 26232, 26244, 26254, 26264, +26274, 26286, 26297, 26308, 26326, 26336, 26352, 26362, 26376, 26388, 26398, 26408, 26420, 26438, 26448, 26460, +26477, 26487, 26503, 26515, 26525, 26543, 26558, 26575, 26586, 26601, 26611, 26622, 26642, 26657, 26671, 26681, +26691, 26702, 26733, 26751, 26767, 26781, 26791, 26801, 26820, 26834, 26847, 26862, 26873, 26885, 26898, 26919, +26941, 26954, 26964, 26974, 26984, 26997, 27029, 27045, 27060, 27073, 27083, 27112, 27131, 27146, 27159, 27169, +27189, 27204, 27218, 27231, 27243, 27264, 27277, 27287, 27298, 27315, 27330, 27347, 27382, 27396, 27410, 27424, +27442, 27453, 27463, 27487, 27498, 27511, 27523, 27542, 27566, 27578, 27589, 27599, 27611, 27627, 27656, 27667, +27683, 27700, 27710, 27726, 27738, 27752, 27762, 27773, 27783, 27794, 27819, 27832, 27842, 27852, 27863, 27873, +27883, 27915, 27927, 27941, 27954, 27965, 27993, 28003, 28014, 28024, 28037, 28049, 28079, 28096, 28107, 28120, +28136, 28147, 28183, 28193, 28203, 28214, 28227, 28237, 28248, 28263, 28274, 28304, 28316, 28330, 28342, 28354, +28364, 28399, 28414, 28431, 28448, 28459, 28472, 28497, 28507, 28525, 28538, 28548, 28558, 28579, 28590, 28601, +28611, 28629, 28639, 28649, 28670, 28681, 28693, 28703, 28719, 28734, 28748, 28760, 28771, 28784, 28796, 28810, +28824, 28836, 28847, 28857, 28872, 28888, 28913, 28925, 28937, 28953, 28966, 28976, 28999, 29014, 29028, 29038, +29053, 29065, 29076, 29087, 29100, 29113, 29123, 29134, 29151, 29165, 29179, 29190, 29200, 29211, 29226, 29237, +29248, 29260, 29272, 29282, 29298, 29309, 29346, 29356, 29376, 29390, 29401, 29417, 29432, 29450, 29462, 29477, +29494, 29508, 29520, 29544, 29554, 29572, 29582, 29592, 29607, 29618, 29632, 29642, 29654, 29664, 29674, 29687, +29697, 29715, 29728, 29738, 29748, 29759, 29771, 29781, 29791, 29801, 29822, 29833, 29848, 29859, 29872, 29885, +29898, 29908, 29920, 29934, 29953, 29969, 29979, 29989, 30000, 30010, 30023, 30033, 30043, 30053, 30063, 30074, +30086, 30097, 30109, 30123, 30133, 30146, 30157, 30168, 30178, 30192, 30202, 30221, 30233, 30244, 30267, 30284, +30294, 30305, 30316, 30328, 30340, 30350, 30382, 30394, 30406, 30418, 30428, 30439, 30450, 30460, 30472, 30494, +30505, 30519, 30541, 30555, 30566, 30585, 30603, 30622, 30636, 30651, 30679, 30690, 30701, 30722, 30738, 30757, +30770, 30789, 30799, 30813, 30827, 30844, 30855, 30865, 30883, 30906, 30917, 30928, 30952, 30965, 30977, 30990, +31018, 31034, 31047, 31062, 31072, 31085, 31098, 31117, 31142, 31153, 31165, 31177, 31189, 31199, 31209, 31227, +31237, 31252, 31263, 31278, 31291, 31302, 31319, 31329, 31339, 31350, 31361, 31378, 31391, 31401, 31418, 31428, +31447, 31459, 31469, 31481, 31503, 31513, 31526, 31545, 31558, 31568, 31584, 31596, 31613, 31623, 31636, 31649, +31661, 31672, 31684, 31698, 31712, 31751, 31762, 31774, 31786, 31805, 31820, 31840, 31852, 31875, 31890, 31903, +31918, 31929, 31946, 31958, 31968, 31995, 32005, 32016, 32026, 32043, 32053, 32066, 32080, 32094, 32104, 32114, +32127, 32142, 32156, 32172, 32184, 32199, 32214, 32224, 32236, 32251, 32265, 32277, 32287, 32299, 32311, 32321, +32338, 32350, 32361, 32377, 32396, 32406, 32566, 32588, 32618, 32629, 32645, 32660, 32670, 32680, 32690, 32701, +32714, 32724, 32735, 32745, 32761, 32771, 32784, 32813, 32829, 32842, 32854, 32879, 32893, 32903, 32918, 32929, +32943, 32954, 32964, 32974, 32986, 32996, 33009, 33021, 33031, 33048, 33059, 33071, 33081, 33099, 33109, 33125, +33136, 33146, 33160, 33178, 33192, 33203, 33213, 33229, 33240, 33251, 33261, 33274, 33285, 33298, 33308, 33322, +33333, 33344, 33369, 33380, 33390, 33400, 33419, 33433, 33445, 33455, 33465, 33489, 33499, 33509, 33521, 33533, +33545, 33559, 33576, 33588, 33600, 33610, 33651, 33673, 33686, 33698, 33725, 33737, 33747, 33769, 33780, 33795, +33805, 33833, 33848, 33865, 33879, 33889, 33899, 33909, 33936, 33948, 33970, 33980, 33990, 34001, 34028, 34044, +34065, 34078, 34092, 34109, 34121, 34131, 34147, 34157, 34180, 34191, 34203, 34214, 34224, 34234, 34249, 34261, +34276, 34295, 34306, 34326, 34349, 34367, 34382, 34395, 34407, 34425, 34442, 34467, 34503, 34516, 34527, 34541, +34558, 34568, 34584, 34638, 34655, 34676, 34690, 34701, 34719, 34739, 34756, 34784, 34796, 34809, 34821, 34847, +34865, 34875, 34886, 34898, 34909, 34920, 34930, 34942, 34952, 34962, 34974, 34987, 35009, 35023, 35033, 35048, +35059, 35069, 35079, 35090, 35109, 35126, 35137, 35167, 35178, 35199, 35211, 35222, 35233, 35250, 35261, 35282, +35299, 35316, 35328, 35338, 35350, 35363, 35373, 35386, 35408, 35419, 35430, 35440, 35461, 35475, 35486, 35496, +35506, 35516, 35527, 35538, 35548, 35558, 35569, 35582, 35598, 35609, 35624, 35635, 35649, 35662, 35672, 35686, +35696, 35709, 35722, 35734, 35895, 35905, 35916, 35930, 35946, 35961, 35978, 35997, 36007, 36019, 36029, 36039, +36049, 36060, 36070, 36084, 36100, 36115, 36196, 36208, 36229, 36249, 36259, 36275, 36286, 36299, 36315, 36328, +36339, 36362, 36382, 36394, 36405, 36418, 36441, 36468, 36481, 36493, 36522, 36544, 36554, 36575, 36587, 36600, +36611, 36626, 36636, 36646, 36659, 36670, 36681, 36701, 36763, 36774, 36784, 36802, 36814, 36838, 36848, 36861, +36872, 36884, 36894, 36910, 36920, 36930, 36941, 36953, 36963, 36973, 36983, 36993, 37007, 37017, 37027, 37039, +37057, 37086, 37096, 37109, 37122, 37138, 37159, 37170, 37193, 37218, 37228, 37239, 37255, 37266, 37276, 37291, +37301, 37312, 37323, 37335, 37347, 37365, 37389, 37399, 37428, 37439, 37449, 37463, 37474, 37504, 37521, 37532, +37555, 37580, 37604, 37624, 37636, 37648, 37658, 37668, 37678, 37704, 37716, 37742, 37756, 37772, 37782, 37795, +37805, 37827, 37841, 37854, 37878, 37892, 37912, 37925, 37941, 37956, 37969, 37979, 38013, 38263, 38275, 38287, +38307, 38317, 38331, 38343, 38356, 38369, 38428, 38442, 38459, 38475, 38491, 38506, 38517, 38533, 38548, 38563, +38577, 38587, 38597, 38613, 38626, 38639, 38649, 38662, 38673, 38684, 38695, 38706, 38717, 38728, 38742, 38753, +38765, 38775, 38795, 38816, 38827, 38854, 38867, 38899, 38911, 38922, 38935, 38957, 38968, 38982, 38996, 39006, +39019, 39080, 39108, 39131, 39149, 39164, 39177, 39187, 39198, 39208, 39237, 39249, 39318, 39333, 39345, 39361, +39376, 39389, 39405, 39423, 39438, 39449, 39467, 39478, 39488, 39501, 39511, 39522, 39592, 39608, 39635, 39653, +39706, 39719, 39729, 39740, 39759, 39770, 39791, 39822, 39839, 39851, 39881, 39894, 39908, 39949, 39973, 39986, +40007, 40023, 40165, 40179, 40201, 40219, 40230, 40251, 40273, 40285, 40300, 40361, 40372, 40388, 40407, 40434, +40474, 40565, 40575, 40594, 40605, 40628, 40638, 40653, 40664, 40680, 40692, 40711, 40723, 40736, 40763, 40778, +40799, 40810, 40823, 40845, 40860, 44032, 44042, 44052, 44064, 44076, 44088, 44107, 44120, 44144, 44154, 44164, +44176, 44188, 44200, 44216, 44228, 44245, 44256, 44266, 44277, 44288, 44300, 44312, 44329, 44340, 44356, 44368, +44385, 44396, 44406, 44417, 44428, 44444, 44471, 44481, 44496, 44508, 44536, 44552, 44564, 44592, 44602, 44613, +44624, 44636, 44648, 44664, 44676, 44732, 44748, 44760, 44776, 44788, 44807, 44844, 44860, 44872, 44892, 44921, +44932, 44944, 44956, 44984, 44999, 45012, 45032, 45044, 45056, 45068, 45084, 45096, 45124, 45134, 45145, 45180, +45196, 45208, 45218, 45228, 45240, 45252, 45264, 45280, 45320, 45330, 45340, 45352, 45364, 45376, 45392, 45404, +45432, 45442, 45453, 45464, 45480, 45516, 45532, 45544, 45561, 45572, 45588, 45600, 45620, 45656, 45672, 45684, +45700, 45712, 45722, 45733, 45744, 45768, 45778, 45789, 45800, 45811, 45823, 45840, 45852, 45908, 45918, 45929, +45940, 45952, 45964, 45984, 45996, 46020, 46030, 46041, 46052, 46076, 46096, 46108, 46120, 46132, 46160, 46176, +46188, 46208, 46237, 46248, 46261, 46272, 46288, 46300, 46310, 46321, 46356, 46372, 46384, 46400, 46411, 46428, +46496, 46506, 46516, 46528, 46540, 46552, 46572, 46608, 46629, 46644, 46664, 46692, 46748, 46763, 46804, 46832, +46848, 46888, 46904, 46916, 46932, 46944, 46960, 46972, 46988, 46998, 47008, 47019, 47029, 47047, 47084, 47100, +47111, 47128, 47140, 47156, 47168, 47185, 47196, 47212, 47224, 47245, 47272, 47284, 47296, 47308, 47325, 47336, +47352, 47364, 47384, 47420, 47436, 47448, 47464, 47476, 47492, 47502, 47532, 47548, 47560, 47570, 47581, 47592, +47604, 47616, 47637, 47672, 47682, 47693, 47704, 47716, 47728, 47747, 47784, 47794, 47805, 47816, 47832, 47868, +47885, 47896, 47913, 47924, 47934, 47945, 47956, 47969, 47980, 48008, 48036, 48052, 48064, 48080, 48120, 48130, +48140, 48150, 48164, 48176, 48192, 48204, 48221, 48260, 48270, 48281, 48292, 48304, 48316, 48333, 48344, 48372, +48388, 48400, 48420, 48448, 48460, 48472, 48484, 48512, 48522, 48533, 48548, 48560, 48596, 48617, 48628, 48640, +48652, 48668, 48708, 48718, 48729, 48740, 48752, 48763, 48780, 48792, 48808, 48848, 48864, 48876, 48897, 48920, +48960, 48976, 49044, 49072, 49093, 49104, 49116, 49212, 49233, 49244, 49256, 49296, 49312, 49324, 49334, 49344, +49356, 49368, 49380, 49396, 49408, 49424, 49436, 49446, 49456, 49468, 49480, 49492, 49508, 49520, 49541, 49552, +49564, 49576, 49597, 49608, 49620, 49632, 49648, 49660, 49676, 49688, 49704, 49714, 49736, 49748, 49760, 49772, +49788, 49800, 49816, 49828, 49844, 49884, 49899, 49910, 49920, 49932, 49944, 49956, 49989, 50024, 50034, 50044, +50056, 50112, 50136, 50146, 50157, 50168, 50184, 50212, 50224, 50236, 50248, 50276, 50292, 50304, 50324, 50360, +50409, 50420, 50431, 50444, 50460, 50472, 50488, 50500, 50510, 50520, 50532, 50544, 50556, 50567, 50577, 50588, +50601, 50612, 50622, 50632, 50644, 50656, 50668, 50678, 50688, 50700, 50712, 50724, 50734, 50745, 50756, 50768, +50780, 50796, 50808, 50824, 50836, 50852, 50864, 50874, 50885, 50896, 50908, 50920, 50936, 50948, 50964, 50976, +50992, 51004, 51018, 51028, 51040, 51051, 51061, 51075, 51086, 51096, 51107, 51117, 51132, 51144, 51160, 51172, +51200, 51210, 51221, 51232, 51244, 51256, 51272, 51284, 51312, 51322, 51333, 51348, 51359, 51388, 51400, 51412, +51424, 51445, 51456, 51468, 51480, 51500, 51536, 51552, 51564, 51580, 51592, 51608, 51648, 51658, 51669, 51680, +51692, 51704, 51720, 51732, 51753, 51788, 51804, 51816, 51837, 51864, 51900, 51916, 51928, 51948, 51976, 51988, +52000, 52033, 52044, 52056, 52068, 52088, 52124, 52152, 52180, 52196, 52236, 52252, 52263, 52280, 52292, 52308, +52320, 52336, 52376, 52392, 52404, 52420, 52432, 52452, 52464, 52481, 52492, 52504, 52516, 52537, 52572, 52588, +52600, 52616, 52628, 52644, 52656, 52676, 52688, 52712, 52728, 52740, 52756, 52768, 52784, 52824, 52840, 52852, +52868, 52880, 52896, 52908, 52929, 52964, 52980, 52992, 53008, 53020, 53036, 53048, 53076, 53092, 53104, 53120, +53132, 53153, 53168, 53188, 53216, 53232, 53244, 53265, 53293, 53304, 53316, 53328, 53344, 53356, 53372, 53412, +53428, 53440, 53456, 53468, 53484, 53496, 53517, 53552, 53562, 53572, 53584, 53596, 53608, 53628, 53640, 53664, +53680, 53690, 53720, 53748, 53767, 53804, 53820, 53832, 53852, 53888, 53904, 53916, 53932, 53944, 53954, 53972, +53988, 54000, 54016, 54028, 54038, 54048, 54060, 54072, 54084, 54140, 54156, 54168, 54184, 54196, 54212, 54224, +54241, 54252, 54268, 54280, 54301, 54336, 54364, 54381, 54392, 54402, 54413, 54441, 54476, 54492, 54504, 54520, +54532, 54548, 54588, 54604, 54616, 54629, 54644, 54660, 54672, 54693, 54728, 54738, 54749, 54760, 54772, 54784, +54800, 54812, 54829, 54840, 54853, 54865, 54876, 54887, 54897, 54915, 54925, 54941, 54952, 54969, 54980, 54993, +55008, 55024, 55036, 55057, 55068, 55080, 55092, 55108, 55120, 55136, 55148, 55164, 55176, 55192, 63744, 63754, +63764, 63774, 63784, 63794, 63804, 63814, 63824, 63834, 63844, 63854, 63864, 63874, 63884, 63894, 63904, 63914, +63924, 63934, 63944, 63954, 63964, 63974, 63984, 63994, 64004, 65281, 65291, 65301, 65311, 65321, 65331, 65341, +65351, 65361, 65371, 65504, 65536 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +162, 174, 162, 180, 161, 215, 161, 167, 168, 163, 161, 169, 161, 198, 161, 190, +169, 247, 169, 248, 162, 165, 162, 210, 161, 164, 162, 172, 169, 246, 168, 172, +168, 249, 168, 246, 168, 250, 162, 175, 168, 161, 168, 162, 161, 191, 168, 170, +168, 173, 169, 172, 169, 161, 169, 163, 161, 192, 169, 170, 169, 173, 169, 162, +168, 164, 169, 165, 168, 168, 169, 176, 169, 171, 168, 174, 162, 167, 162, 168, +165, 193, 165, 203, 165, 212, 165, 225, 165, 235, 165, 244, 172, 167, 172, 161, +172, 172, 172, 182, 172, 192, 172, 218, 172, 228, 172, 238, 161, 170, 162, 211, +162, 182, 161, 216, 169, 249, 169, 250, 161, 201, 167, 164, 162, 229, 161, 202, +168, 247, 168, 253, 165, 183, 165, 162, 161, 231, 162, 161, 162, 163, 161, 245, +161, 238, 161, 171, 161, 197, 161, 214, 161, 193, 161, 236, 161, 248, 162, 193, +161, 209, 161, 210, 168, 231, 168, 241, 169, 231, 169, 241, 169, 205, 169, 215, +169, 225, 168, 205, 168, 215, 168, 225, 166, 161, 166, 163, 166, 197, 166, 183, +166, 208, 166, 170, 166, 218, 166, 226, 162, 198, 161, 225, 161, 227, 161, 229, +161, 223, 162, 196, 161, 218, 162, 206, 162, 208, 161, 207, 162, 188, 162, 220, +161, 161, 161, 182, 161, 178, 170, 161, 170, 171, 170, 181, 170, 191, 170, 201, +170, 211, 170, 221, 170, 231, 170, 241, 171, 161, 171, 171, 171, 181, 171, 191, +171, 201, 171, 211, 171, 221, 171, 231, 171, 241, 164, 161, 164, 171, 164, 181, +164, 191, 164, 201, 164, 211, 164, 221, 164, 231, 164, 241, 164, 251, 169, 177, +169, 187, 169, 197, 168, 177, 168, 187, 168, 197, 162, 222, 167, 201, 167, 220, +167, 216, 167, 176, 167, 190, 167, 193, 167, 208, 167, 239, 167, 234, 167, 228, +236, 233, 223, 190, 243, 166, 227, 170, 241, 233, 252, 175, 231, 209, 222, 191, +227, 171, 202, 225, 220, 227, 213, 175, 236, 163, 208, 230, 249, 241, 204, 200, +211, 162, 228, 167, 208, 209, 237, 168, 244, 181, 228, 230, 236, 242, 249, 242, +219, 215, 222, 195, 211, 163, 241, 165, 236, 234, 248, 165, 202, 162, 236, 235, +246, 182, 215, 194, 217, 178, 248, 181, 231, 235, 204, 201, 220, 193, 225, 243, +220, 228, 220, 177, 219, 195, 253, 166, 219, 167, 232, 222, 229, 166, 202, 163, +250, 165, 203, 237, 246, 176, 206, 211, 219, 168, 223, 161, 245, 202, 223, 191, +208, 193, 223, 192, 214, 246, 232, 233, 202, 164, 229, 226, 234, 227, 223, 193, +233, 208, 213, 227, 235, 195, 208, 186, 212, 223, 210, 174, 205, 236, 204, 194, +229, 247, 217, 179, 206, 174, 216, 241, 229, 167, 244, 162, 215, 207, 252, 197, +245, 243, 221, 194, 250, 253, 244, 248, 215, 215, 240, 164, 244, 239, 238, 241, +203, 167, 237, 165, 243, 220, 244, 249, 215, 177, 213, 244, 240, 190, 250, 182, +216, 245, 212, 209, 217, 180, 253, 179, 206, 254, 253, 214, 221, 226, 237, 221, +221, 227, 249, 175, 244, 182, 216, 179, 209, 245, 206, 207, 236, 212, 241, 237, +228, 237, 234, 171, 230, 244, 203, 219, 233, 209, 226, 210, 231, 213, 208, 163, +222, 201, 253, 222, 217, 163, 207, 214, 220, 250, 231, 239, 231, 238, 239, 208, +241, 178, 218, 171, 217, 164, 251, 250, 246, 227, 250, 166, 236, 214, 249, 235, +234, 172, 205, 214, 248, 212, 248, 166, 215, 218, 216, 197, 234, 230, 246, 228, +217, 253, 228, 175, 240, 166, 244, 202, 244, 183, 253, 189, 253, 171, 242, 199, +243, 170, 225, 245, 202, 169, 207, 165, 225, 176, 250, 198, 208, 239, 221, 196, +252, 247, 230, 191, 229, 241, 210, 165, 225, 246, 205, 221, 205, 179, 229, 216, +234, 174, 247, 207, 208, 164, 208, 240, 208, 179, 203, 213, 247, 231, 211, 221, +246, 243, 211, 220, 250, 167, 235, 217, 228, 239, 224, 242, 230, 180, 243, 241, +208, 241, 204, 177, 244, 220, 202, 237, 237, 222, 206, 212, 247, 178, 223, 221, +242, 200, 204, 209, 217, 215, 241, 242, 217, 248, 221, 197, 202, 203, 253, 181, +215, 164, 229, 189, 237, 224, 236, 236, 249, 190, 226, 212, 211, 222, 227, 247, +250, 241, 210, 175, 221, 198, 238, 245, 247, 172, 210, 191, 229, 253, 208, 245, +246, 230, 216, 217, 239, 209, 238, 187, 232, 238, 202, 205, 230, 193, 232, 223, +222, 207, 231, 244, 228, 176, 246, 165, 215, 165, 251, 230, 220, 254, 216, 218, +227, 184, 202, 170, 250, 238, 238, 213, 251, 251, 248, 198, 222, 174, 223, 197, +237, 173, 221, 161, 205, 181, 226, 213, 234, 232, 211, 235, 206, 219, 241, 181, +224, 190, 207, 224, 227, 228, 238, 214, 221, 163, 210, 188, 205, 251, 222, 208, +245, 193, 220, 230, 227, 252, 244, 211, 233, 214, 246, 166, 205, 182, 203, 220, +224, 218, 220, 179, 215, 219, 212, 234, 253, 223, 208, 247, 203, 170, 225, 251, +251, 192, 225, 252, 246, 185, 228, 177, 250, 214, 226, 253, 205, 223, 226, 254, +218, 174, 227, 161, 207, 169, 212, 241, 229, 245, 231, 174, 232, 228, 244, 185, +206, 229, 208, 249, 225, 222, 253, 241, 244, 222, 225, 253, 237, 227, 217, 182, +219, 172, 216, 173, 246, 186, 202, 206, 234, 234, 221, 231, 238, 188, 223, 202, +205, 183, 228, 221, 223, 203, 207, 170, 241, 183, 213, 230, 230, 197, 220, 167, +227, 210, 236, 172, 250, 215, 229, 176, 249, 176, 247, 165, 211, 167, 251, 161, +222, 175, 219, 173, 239, 214, 215, 200, 212, 240, 229, 217, 218, 176, 244, 203, +227, 253, 236, 219, 242, 164, 246, 225, 210, 183, 221, 200, 228, 232, 214, 187, +224, 245, 236, 246, 252, 200, 229, 191, 237, 176, 205, 241, 230, 237, 252, 226, +231, 246, 240, 245, 211, 250, 212, 195, 251, 227, 224, 173, 246, 231, 224, 246, +203, 240, 228, 195, 202, 239, 252, 202, 227, 229, 235, 219, 248, 244, 247, 228, +251, 180, 204, 212, 245, 195, 241, 243, 253, 243, 221, 201, 217, 228, 211, 188, +202, 208, 209, 215, 243, 164, 207, 171, 211, 212, 228, 178, 208, 189, 239, 184, +211, 227, 213, 232, 251, 195, 246, 232, 221, 202, 221, 235, 244, 252, 229, 228, +248, 216, 249, 169, 238, 189, 221, 217, 218, 229, 246, 233, 206, 192, 205, 184, +242, 165, 211, 251, 241, 169, 239, 216, 243, 181, 248, 218, 220, 233, 207, 236, +223, 242, 211, 252, 228, 250, 213, 211, 240, 194, 202, 209, 217, 218, 229, 192, +204, 169, 223, 186, 225, 223, 211, 253, 242, 202, 218, 230, 253, 205, 238, 215, +216, 164, 217, 184, 214, 206, 223, 174, 211, 213, 217, 232, 211, 181, 244, 186, +208, 211, 211, 228, 235, 244, 247, 236, 247, 204, 229, 193, 213, 253, 242, 168, +203, 199, 205, 186, 218, 194, 243, 226, 204, 215, 221, 167, 214, 176, 222, 176, +212, 224, 228, 214, 237, 197, 211, 168, 219, 177, 224, 193, 208, 253, 208, 254, +233, 239, 232, 218, 205, 224, 221, 203, 220, 181, 237, 198, 217, 219, 240, 197, +242, 204, 241, 219, 231, 251, 220, 197, 239, 221, 253, 190, 231, 178, 229, 195, +243, 229, 217, 186, 224, 231, 231, 165, 228, 242, 206, 199, 232, 216, 240, 198, +234, 197, 222, 253, 209, 161, 217, 202, 218, 211, 202, 210, 238, 167, 212, 225, +249, 248, 247, 237, 221, 237, 212, 226, 242, 171, 205, 189, 227, 194, 219, 218, +234, 246, 207, 175, 215, 179, 239, 222, 226, 227, 206, 232, 233, 241, 208, 198, +211, 254, 242, 238, 242, 205, 202, 212, 205, 217, 240, 201, 231, 252, 205, 225, +209, 165, 220, 234, 212, 214, 223, 181, 212, 161, 235, 245, 245, 161, 217, 167, +230, 203, 229, 197, 224, 219, 215, 209, 239, 223, 208, 191, 233, 190, 252, 206, +215, 180, 205, 190, 207, 176, 206, 170, 208, 167, 219, 224, 238, 192, 217, 188, +245, 163, 202, 244, 233, 248, 209, 166, 252, 244, 211, 170, 229, 229, 219, 252, +203, 254, 222, 177, 212, 162, 214, 208, 250, 203, 213, 177, 213, 178, 253, 226, +233, 176, 253, 227, 250, 206, 230, 162, 232, 224, 213, 246, 228, 234, 227, 214, +214, 177, 223, 175, 235, 246, 216, 223, 217, 190, 251, 198, 238, 253, 216, 236, +209, 168, 226, 169, 219, 240, 219, 241, 231, 253, 205, 231, 208, 227, 209, 169, +230, 204, 217, 210, 216, 200, 221, 243, 251, 162, 249, 178, 222, 223, 248, 220, +250, 218, 229, 199, 225, 169, 242, 208, 241, 189, 253, 231, 239, 186, 232, 203, +221, 169, 246, 217, 230, 238, 225, 215, 228, 243, 239, 227, 215, 250, 212, 163, +239, 228, 226, 232, 223, 182, 212, 164, 224, 222, 231, 183, 219, 203, 211, 172, +223, 207, 233, 192, 234, 184, 234, 185, 215, 182, 205, 162, 233, 193, 219, 181, +244, 175, 244, 242, 205, 227, 215, 169, 216, 174, 216, 188, 239, 194, 218, 254, +237, 214, 211, 193, 237, 210, 243, 165, 248, 177, 249, 212, 252, 232, 211, 194, +210, 216, 227, 165, 240, 173, 251, 205, 213, 235, 222, 225, 222, 181, 225, 190, +231, 187, 213, 179, 206, 180, 247, 168, 216, 189, 252, 233, 237, 199, 246, 167, +253, 220, 225, 191, 251, 166, 239, 195, 214, 173, 251, 244, 204, 222, 220, 235, +229, 234, 219, 204, 245, 165, 230, 251, 253, 200, 209, 238, 216, 224, 237, 180, +224, 195, 233, 251, 233, 194, 226, 217, 232, 162, 253, 248, 230, 215, 214, 250, +231, 189, 245, 183, 253, 184, 248, 239, 214, 211, 213, 180, 240, 208, 237, 201, +223, 209, 248, 171, 212, 186, 214, 239, 223, 229, 204, 178, 212, 187, 204, 179, +223, 210, 228, 228, 238, 195, 226, 173, 215, 225, 231, 217, 243, 233, 232, 229, +235, 162, 232, 171, 237, 239, 212, 188, 252, 242, 250, 220, 239, 233, 209, 172, +235, 201, 214, 188, 218, 214, 223, 166, 206, 203, 241, 193, 208, 168, 217, 238, +224, 196, 232, 205, 239, 162, 209, 174, 208, 214, 251, 234, 234, 212, 249, 194, +227, 162, 251, 169, 208, 200, 214, 162, 215, 243, 209, 176, 252, 187, 223, 222, +204, 225, 231, 194, 251, 210, 232, 183, 220, 186, 241, 247, 244, 214, 223, 231, +239, 163, 239, 235, 208, 180, 239, 165, 242, 213, 213, 212, 241, 225, 203, 177, +203, 178, 235, 247, 223, 168, 230, 185, 237, 183, 202, 178, 236, 183, 212, 227, +215, 229, 211, 195, 221, 246, 229, 203, 225, 196, 215, 187, 215, 170, 228, 223, +219, 254, 246, 194, 224, 200, 205, 164, 238, 220, 206, 235, 249, 171, 245, 212, +221, 206, 249, 236, 212, 168, 214, 212, 216, 238, 218, 240, 247, 175, 242, 216, +250, 223, 207, 239, 250, 224, 239, 236, 217, 206, 212, 169, 242, 217, 216, 190, +226, 235, 244, 215, 245, 184, 227, 197, 211, 173, 222, 227, 221, 247, 242, 178, +248, 223, 208, 169, 230, 218, 245, 166, 215, 188, 221, 221, 239, 237, 221, 248, +202, 229, 252, 172, 219, 182, 218, 241, 216, 168, 202, 216, 245, 167, 245, 168, +213, 236, 227, 198, 209, 182, 240, 211, 222, 230, 240, 174, 209, 184, 252, 161, +229, 221, 212, 170, 208, 216, 220, 188, 221, 249, 240, 213, 242, 241, 236, 185, +225, 170, 236, 249, 249, 162, 240, 250, 212, 171, 217, 207, 226, 180, 223, 226, +252, 174, 207, 188, 212, 205, 242, 242, 207, 223, 232, 192, 208, 170, 243, 193, +217, 223, 241, 226, 202, 230, 241, 211, 251, 238, 223, 233, 221, 172, 225, 171, +249, 182, 206, 204, 208, 181, 224, 254, 232, 164, 203, 205, 218, 216, 206, 183, +239, 169, 238, 198, 219, 244, 227, 217, 225, 198, 240, 234, 243, 194, 211, 175, +237, 216, 244, 216, 241, 195, 214, 235, 215, 230, 221, 251, 216, 163, 225, 216, +213, 219, 226, 182, 251, 213, 211, 216, 203, 179, 205, 167, 251, 245, 210, 239, +208, 228, 237, 185, 238, 199, 240, 251, 204, 191, 206, 237, 235, 214, 222, 234, +207, 189, 239, 242, 240, 252, 226, 184, 215, 198, 246, 197, 223, 253, 244, 243, +216, 251, 246, 198, 242, 219, 232, 178, 233, 178, 220, 238, 215, 172, 219, 229, +241, 249, 233, 164, 227, 177, 230, 186, 225, 217, 224, 233, 221, 174, 229, 162, +241, 170, 216, 225, 212, 254, 205, 196, 226, 186, 224, 204, 253, 253, 233, 226, +236, 205, 223, 214, 238, 225, 248, 187, 206, 238, 205, 197, 210, 177, 209, 190, +247, 176, 214, 253, 225, 161, 214, 164, 244, 233, 240, 220, 245, 171, 205, 198, +208, 233, 248, 203, 241, 176, 247, 195, 219, 207, 235, 202, 206, 205, 210, 246, +250, 247, 232, 210, 226, 238, 248, 225, 243, 236, 228, 253, 232, 211, 225, 163, +233, 166, 224, 205, 204, 174, 221, 177, 248, 179, 224, 206, 211, 197, 240, 176, +213, 196, 227, 237, 246, 171, 211, 230, 207, 192, 224, 162, 226, 239, 249, 254, +246, 236, 221, 178, 243, 237, 235, 250, 202, 221, 245, 172, 233, 227, 221, 179, +203, 206, 228, 165, 208, 202, 234, 189, 202, 180, 229, 180, 231, 200, 205, 201, +216, 201, 217, 171, 237, 188, 252, 237, 226, 240, 251, 170, 212, 229, 215, 233, +204, 236, 250, 248, 216, 213, 214, 225, 206, 162, 220, 204, 228, 224, 245, 254, +248, 195, 245, 215, 235, 173, 231, 168, 238, 202, 248, 227, 251, 217, 208, 173, +226, 189, 223, 170, 248, 228, 243, 239, 224, 182, 222, 238, 220, 239, 214, 254, +217, 161, 215, 173, 225, 202, 248, 204, 245, 175, 233, 254, 226, 242, 225, 203, +218, 221, 235, 251, 224, 224, 244, 192, 253, 185, 240, 177, 237, 190, 233, 228, +212, 246, 238, 203, 231, 222, 229, 238, 213, 181, 213, 161, 251, 219, 250, 200, +253, 208, 251, 246, 218, 165, 205, 247, 222, 239, 252, 238, 206, 241, 242, 244, +228, 182, 232, 165, 242, 187, 202, 233, 234, 218, 251, 221, 213, 204, 235, 215, +217, 173, 211, 217, 246, 222, 218, 246, 224, 209, 250, 175, 227, 178, 213, 197, +205, 204, 216, 193, 241, 235, 250, 229, 245, 250, 248, 250, 210, 164, 208, 218, +202, 183, 211, 178, 205, 229, 249, 172, 238, 174, 215, 234, 207, 217, 222, 165, +223, 215, 240, 178, 220, 220, 248, 230, 233, 179, 227, 168, 203, 186, 208, 220, +216, 202, 224, 164, 204, 184, 227, 202, 204, 175, 208, 204, 213, 194, 202, 199, +250, 176, 223, 216, 229, 235, 227, 242, 253, 225, 204, 193, 224, 226, 242, 224, +222, 241, 238, 204, 227, 203, 253, 254, 241, 202, 224, 165, 229, 222, 252, 239, +206, 164, 235, 254, 211, 200, 213, 223, 244, 227, 244, 244, 253, 201, 209, 231, +218, 186, 204, 197, 217, 200, 207, 196, 252, 166, 253, 210, 227, 219, 204, 237, +236, 161, 231, 226, 220, 168, 243, 217, 205, 219, 252, 195, 232, 213, 212, 202, +251, 223, 248, 251, 216, 231, 248, 175, 222, 184, 236, 195, 236, 194, 237, 192, +242, 225, 222, 244, 221, 183, 214, 243, 242, 190, 237, 252, 238, 229, 241, 203, +245, 177, 240, 225, 246, 172, 240, 235, 242, 191, 219, 162, 247, 245, 206, 165, +212, 175, 233, 201, 203, 230, 241, 161, 241, 162, 235, 179, 245, 236, 245, 237, +240, 226, 229, 184, 215, 245, 207, 198, 243, 179, 230, 227, 242, 226, 245, 238, +206, 242, 244, 229, 246, 202, 214, 166, 241, 205, 239, 173, 239, 174, 230, 172, +227, 244, 247, 253, 242, 227, 233, 230, 231, 202, 202, 188, 226, 251, 245, 218, +251, 173, 212, 178, 214, 193, 244, 245, 236, 239, 226, 196, 248, 188, 233, 171, +204, 186, 240, 228, 244, 195, 216, 228, 213, 164, 216, 215, 209, 225, 202, 251, +233, 244, 213, 205, 221, 187, 233, 232, 228, 199, 245, 219, 212, 248, 211, 179, +235, 183, 245, 178, 226, 198, 251, 229, 226, 245, 225, 165, 245, 221, 236, 162, +203, 217, 229, 212, 224, 183, 225, 242, 240, 229, 243, 251, 212, 239, 235, 205, +214, 194, 239, 175, 250, 232, 204, 198, 219, 164, 235, 222, 224, 213, 249, 231, +231, 229, 239, 251, 224, 167, 203, 234, 214, 226, 245, 222, 238, 182, 209, 197, +205, 209, 231, 204, 228, 200, 235, 185, 246, 221, 204, 199, 225, 240, 251, 175, +242, 229, 240, 236, 238, 235, 233, 203, 243, 161, 252, 245, 241, 164, 224, 214, +244, 209, 241, 209, 202, 252, 206, 206, 243, 200, 237, 254, 224, 236, 235, 206, +202, 200, 213, 239, 231, 162, 228, 225, 249, 239, 244, 197, 221, 189, 248, 161, +240, 230, 215, 176, 248, 206, 219, 214, 215, 213, 233, 234, 204, 176, 215, 246, +235, 223, 244, 180, 228, 186, 240, 231, 215, 238, 218, 167, 218, 223, 239, 253, +239, 197, 223, 220, 217, 246, 214, 218, 240, 184, 214, 196, 239, 254, 218, 188, +236, 229, 236, 230, 251, 185, 207, 211, 207, 212, 244, 199, 249, 219, 235, 229, +250, 194, 233, 245, 247, 246, 212, 233, 204, 242, 206, 168, 228, 212, 215, 190, +239, 181, 249, 166, 248, 253, 222, 171, 246, 208, 222, 248, 250, 195, 228, 187, +239, 182, 206, 189, 216, 195, 209, 199, 226, 207, 220, 224, 246, 238, 218, 224, +241, 210, 246, 239, 250, 180, 241, 231, 209, 200, 248, 190, 203, 246, 245, 226, +216, 233, 253, 164, 250, 208, 213, 240, 205, 233, 250, 181, 226, 208, 231, 163, +226, 209, 215, 162, 234, 166, 208, 161, 234, 224, 229, 224, 214, 219, 239, 198, +228, 213, 206, 247, 215, 239, 244, 237, 205, 230, 245, 227, 252, 191, 232, 167, +203, 190, 215, 247, 240, 232, 220, 243, 228, 188, 234, 196, 228, 236, 251, 248, +204, 187, 228, 189, 221, 223, 217, 208, 249, 205, 205, 174, 207, 206, 246, 175, +229, 164, 214, 221, 214, 227, 209, 203, 222, 250, 207, 213, 253, 203, 224, 168, +217, 249, 211, 218, 218, 189, 232, 168, 205, 213, 224, 169, 222, 172, 240, 186, +238, 210, 243, 187, 228, 203, 215, 163, 207, 207, 176, 161, 176, 167, 176, 172, +176, 181, 176, 183, 176, 188, 176, 192, 176, 195, 176, 197, 176, 202, 176, 206, +176, 213, 176, 215, 176, 220, 176, 226, 176, 232, 176, 235, 176, 237, 176, 242, +176, 248, 176, 252, 177, 161, 177, 165, 177, 168, 177, 171, 177, 175, 177, 179, +177, 182, 177, 184, 177, 190, 177, 195, 177, 199, 177, 201, 177, 204, 177, 206, +177, 209, 177, 212, 177, 215, 177, 221, 177, 225, 177, 226, 177, 231, 177, 235, +177, 241, 177, 244, 177, 250, 177, 254, 178, 165, 178, 168, 178, 173, 178, 178, +178, 181, 178, 184, 178, 187, 178, 191, 178, 196, 178, 202, 178, 205, 178, 209, +178, 211, 178, 213, 178, 216, 178, 217, 178, 221, 178, 227, 178, 229, 178, 233, +178, 235, 178, 238, 178, 241, 178, 243, 178, 244, 178, 249, 178, 254, 179, 162, +179, 166, 179, 170, 179, 177, 179, 181, 179, 189, 179, 191, 179, 196, 179, 200, +179, 202, 179, 207, 179, 212, 179, 217, 179, 219, 179, 224, 179, 228, 179, 233, +179, 235, 179, 239, 179, 243, 179, 247, 179, 249, 179, 250, 179, 253, 180, 162, +180, 166, 180, 169, 180, 174, 180, 178, 180, 179, 180, 181, 180, 184, 180, 186, +180, 189, 180, 192, 180, 197, 180, 201, 180, 205, 180, 207, 180, 211, 180, 215, +180, 220, 180, 226, 180, 234, 180, 239, 180, 244, 180, 245, 180, 251, 181, 162, +181, 167, 181, 169, 181, 174, 181, 177, 181, 180, 181, 181, 181, 186, 181, 191, +181, 195, 181, 197, 181, 198, 181, 200, 181, 202, 181, 205, 181, 206, 181, 210, +181, 214, 181, 215, 181, 217, 181, 219, 181, 221, 181, 224, 181, 227, 181, 229, +181, 234, 181, 238, 181, 240, 181, 245, 181, 251, 182, 161, 182, 166, 182, 171, +182, 176, 182, 180, 182, 185, 182, 190, 182, 192, 182, 197, 182, 198, 182, 199, +182, 203, 182, 205, 182, 206, 182, 207, 182, 209, 182, 213, 182, 216, 182, 217, +182, 220, 182, 223, 182, 228, 182, 231, 182, 234, 182, 236, 182, 239, 182, 243, +182, 247, 182, 253, 183, 164, 183, 167, 183, 171, 183, 173, 183, 175, 183, 179, +183, 184, 183, 189, 183, 193, 183, 197, 183, 202, 183, 204, 183, 206, 183, 210, +183, 214, 183, 216, 183, 217, 183, 219, 183, 221, 183, 225, 183, 228, 183, 231, +183, 235, 183, 239, 183, 240, 183, 242, 183, 246, 183, 249, 183, 253, 184, 163, +184, 167, 184, 173, 184, 174, 184, 178, 184, 182, 184, 189, 184, 193, 184, 199, +184, 201, 184, 207, 184, 210, 184, 211, 184, 215, 184, 219, 184, 224, 184, 226, +184, 231, 184, 235, 184, 240, 184, 245, 184, 249, 184, 251, 184, 252, 184, 254, +185, 163, 185, 166, 185, 169, 185, 171, 185, 178, 185, 182, 185, 186, 185, 188, +185, 190, 185, 191, 185, 194, 185, 197, 185, 199, 185, 202, 185, 204, 185, 209, +185, 213, 185, 219, 185, 227, 185, 232, 185, 236, 185, 242, 185, 245, 185, 246, +185, 251, 186, 161, 186, 165, 186, 168, 186, 173, 186, 177, 186, 182, 186, 184, +186, 189, 186, 193, 186, 195, 186, 197, 186, 200, 186, 202, 186, 204, 186, 206, +186, 212, 186, 216, 186, 220, 186, 221, 186, 223, 186, 227, 186, 229, 186, 231, +186, 234, 186, 238, 186, 241, 186, 245, 186, 249, 186, 254, 187, 163, 187, 168, +187, 173, 187, 178, 187, 180, 187, 181, 187, 186, 187, 190, 187, 191, 187, 194, +187, 199, 187, 203, 187, 206, 187, 207, 187, 208, 187, 211, 187, 213, 187, 216, +187, 217, 187, 219, 187, 221, 187, 223, 187, 227, 187, 231, 187, 238, 187, 242, +187, 247, 187, 249, 187, 254, 188, 164, 188, 168, 188, 171, 188, 173, 188, 180, +188, 185, 188, 190, 188, 192, 188, 197, 188, 201, 188, 206, 188, 209, 188, 213, +188, 216, 188, 221, 188, 225, 188, 227, 188, 229, 188, 232, 188, 235, 188, 238, +188, 242, 188, 246, 188, 251, 189, 163, 189, 165, 189, 168, 189, 170, 189, 172, +189, 176, 189, 180, 189, 183, 189, 186, 189, 191, 189, 195, 189, 200, 189, 205, +189, 210, 189, 213, 189, 218, 189, 220, 189, 224, 189, 225, 189, 229, 189, 232, +189, 235, 189, 237, 189, 238, 189, 243, 189, 246, 189, 249, 189, 250, 189, 252, +189, 254, 190, 162, 190, 164, 190, 165, 190, 169, 190, 172, 190, 173, 190, 175, +190, 177, 190, 180, 190, 183, 190, 186, 190, 189, 190, 190, 190, 194, 190, 198, +190, 205, 190, 210, 190, 216, 190, 218, 190, 223, 190, 227, 190, 231, 190, 235, +190, 237, 190, 238, 190, 245, 190, 250, 191, 163, 191, 165, 191, 169, 191, 174, +191, 180, 191, 186, 191, 188, 191, 192, 191, 197, 191, 203, 191, 207, 191, 209, +191, 214, 191, 217, 191, 220, 191, 224, 191, 228, 191, 232, 191, 236, 191, 241, +191, 245, 191, 248, 191, 250, 191, 254, 192, 164, 192, 167, 192, 171, 192, 175, +192, 179, 192, 184, 192, 188, 192, 195, 192, 201, 192, 203, 192, 205, 192, 210, +192, 217, 192, 223, 192, 227, 192, 232, 192, 235, 192, 240, 192, 245, 192, 247, +192, 250, 192, 254, 193, 164, 193, 168, 193, 170, 193, 174, 193, 177, 193, 181, +193, 182, 193, 186, 193, 190, 193, 196, 193, 198, 193, 201, 193, 204, 193, 206, +193, 210, 193, 213, 193, 216, 193, 220, 193, 224, 193, 225, 193, 227, 193, 231, +193, 234, 193, 237, 193, 238, 193, 242, 193, 246, 193, 251, 194, 161, 194, 167, +194, 171, 194, 176, 194, 180, 194, 185, 194, 187, 194, 188, 194, 192, 194, 197, +194, 198, 194, 200, 194, 201, 194, 205, 194, 210, 194, 213, 194, 215, 194, 217, +194, 219, 194, 221, 194, 224, 194, 226, 194, 229, 194, 230, 194, 232, 194, 233, +194, 234, 194, 235, 194, 238, 194, 242, 194, 246, 194, 252, 195, 164, 195, 168, +195, 173, 195, 177, 195, 179, 195, 183, 195, 188, 195, 192, 195, 196, 195, 198, +195, 200, 195, 201, 195, 204, 195, 206, 195, 210, 195, 213, 195, 214, 195, 217, +195, 221, 195, 222, 195, 223, 195, 227, 195, 231, 195, 232, 195, 234, 195, 235, +195, 238, 195, 242, 195, 245, 195, 247, 195, 251, 196, 161, 196, 167, 196, 171, +196, 175, 196, 179, 196, 183, 196, 188, 196, 190, 196, 191, 196, 196, 196, 201, +196, 205, 196, 209, 196, 212, 196, 217, 196, 218, 196, 222, 196, 226, 196, 230, +196, 232, 196, 233, 196, 235, 196, 236, 196, 237, 196, 241, 196, 245, 196, 248, +196, 250, 196, 253, 197, 161, 197, 165, 197, 168, 197, 169, 197, 173, 197, 176, +197, 180, 197, 184, 197, 189, 197, 194, 197, 198, 197, 203, 197, 204, 197, 205, +197, 209, 197, 213, 197, 217, 197, 219, 197, 223, 197, 225, 197, 227, 197, 228, +197, 232, 197, 236, 197, 239, 197, 240, 197, 242, 197, 245, 197, 249, 197, 253, +197, 254, 198, 162, 198, 166, 198, 169, 198, 172, 198, 174, 198, 179, 198, 183, +198, 186, 198, 188, 198, 192, 198, 196, 198, 201, 198, 205, 198, 210, 198, 212, +198, 217, 198, 219, 198, 223, 198, 228, 198, 232, 198, 236, 198, 239, 198, 243, +198, 245, 198, 247, 198, 251, 199, 161, 199, 162, 199, 163, 199, 165, 199, 168, +199, 170, 199, 175, 199, 179, 199, 181, 199, 182, 199, 185, 199, 187, 199, 190, +199, 193, 199, 196, 199, 199, 199, 203, 199, 207, 199, 211, 199, 216, 199, 220, +199, 225, 199, 226, 199, 227, 199, 231, 199, 235, 199, 238, 199, 240, 199, 244, +199, 248, 199, 253, 200, 162, 200, 163, 200, 167, 200, 172, 200, 176, 200, 177, +200, 180, 200, 182, 200, 185, 200, 188, 200, 191, 200, 194, 200, 196, 200, 200, +200, 204, 200, 207, 200, 209, 200, 213, 200, 216, 200, 218, 200, 222, 200, 226, +200, 229, 200, 236, 200, 241, 200, 244, 200, 247, 200, 251, 203, 208, 208, 221, +209, 226, 209, 239, 210, 167, 210, 196, 210, 208, 210, 222, 210, 234, 212, 230, +219, 228, 224, 241, 229, 187, 229, 254, 230, 184, 230, 223, 230, 241, 231, 172, +231, 208, 232, 247, 234, 244, 235, 189, 235, 216, 236, 186, 236, 225, 237, 238, +247, 200, 163, 161, 163, 171, 163, 181, 163, 191, 163, 201, 163, 211, 163, 221, +163, 231, 163, 241, 163, 251, 161, 203, 0 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_GB2312.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_GB2312.java new file mode 100644 index 0000000..c4cd724 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_GB2312.java @@ -0,0 +1,202 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.KnownFailure; +import dalvik.annotation.TestTargetClass; + +import java.nio.charset.CharacterCodingException; + +@TestTargetClass(targets.Charsets.GB2312.class) + +public class Charset_MultiByte_GB2312 extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "GB2312"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +164, 167, 168, 176, 177, 215, 224, 225, 232, 233, 234, 236, 237, 242, 243, 247, +249, 250, 252, 257, 275, 333, 363, 462, 711, 913, 945, 1025, 1055, 1085, 8213, 8243, +8451, 8544, 8592, 8712, 8743, 8776, 8814, 8857, 8978, 9312, 9342, 9472, 9502, 9532, 9632, 9670, +9733, 9792, 12288, 12353, 12383, 12413, 12449, 12479, 12509, 12539, 12569, 12832, 19968, 19998, 20029, 20060, +20094, 20127, 20159, 20189, 20219, 20249, 20280, 20311, 20342, 20372, 20405, 20439, 20472, 20504, 20538, 20570, +20603, 20643, 20687, 20717, 20747, 20799, 20834, 20864, 20896, 20928, 20960, 20991, 21021, 21051, 21084, 21117, +21147, 21182, 21215, 21246, 21277, 21307, 21338, 21368, 21400, 21430, 21460, 21490, 21520, 21550, 21584, 21617, +21647, 21677, 21708, 21738, 21769, 21799, 21830, 21860, 21890, 21927, 21957, 21987, 22017, 22047, 22079, 22114, +22149, 22179, 22218, 22251, 22281, 22312, 22343, 22374, 22404, 22434, 22466, 22496, 22528, 22558, 22596, 22629, +22659, 22696, 22737, 22768, 22799, 22829, 22859, 22899, 22930, 22962, 22992, 23033, 23064, 23094, 23125, 23156, +23186, 23218, 23250, 23281, 23318, 23348, 23379, 23409, 23439, 23472, 23504, 23534, 23567, 23601, 23631, 23662, +23692, 23723, 23755, 23786, 23822, 23853, 23883, 23913, 23961, 23991, 24027, 24061, 24091, 24123, 24155, 24186, +24217, 24247, 24278, 24308, 24339, 24369, 24400, 24432, 24464, 24494, 24524, 24554, 24586, 24616, 24651, 24681, +24713, 24744, 24774, 24806, 24838, 24868, 24904, 24935, 24971, 25001, 25032, 25062, 25094, 25124, 25155, 25187, +25220, 25250, 25282, 25314, 25345, 25375, 25405, 25438, 25472, 25504, 25534, 25566, 25597, 25627, 25658, 25688, +25720, 25750, 25781, 25815, 25856, 25893, 25925, 25955, 25991, 26021, 26051, 26082, 26112, 26143, 26174, 26207, +26238, 26269, 26302, 26332, 26364, 26395, 26426, 26460, 26492, 26522, 26552, 26584, 26621, 26653, 26684, 26720, +26753, 26786, 26816, 26848, 26881, 26911, 26941, 26973, 27004, 27035, 27067, 27099, 27133, 27167, 27197, 27227, +27257, 27287, 27424, 27454, 27490, 27521, 27553, 27583, 27617, 27653, 27684, 27714, 27744, 27774, 27807, 27837, +27867, 27898, 27929, 27961, 27993, 28023, 28053, 28085, 28118, 28151, 28182, 28212, 28243, 28286, 28316, 28346, +28378, 28409, 28448, 28478, 28508, 28538, 28572, 28608, 28638, 28689, 28725, 28766, 28796, 28828, 28859, 28889, +28919, 28949, 28982, 29020, 29050, 29080, 29113, 29152, 29190, 29224, 29255, 29286, 29316, 29356, 29389, 29420, +29450, 29481, 29517, 29548, 29579, 29609, 29640, 29671, 29701, 29733, 29781, 29814, 29852, 29882, 29916, 29951, +29983, 30014, 30044, 30079, 30109, 30140, 30171, 30201, 30231, 30261, 30292, 30328, 30358, 30388, 30418, 30449, +30489, 30519, 30554, 30585, 30623, 30653, 30683, 30717, 30748, 30778, 30813, 30844, 30874, 30905, 30937, 30967, +31006, 31036, 31066, 31096, 31130, 31161, 31192, 31224, 31255, 31287, 31319, 31350, 31381, 31411, 31446, 31481, +31513, 31544, 31574, 31605, 31636, 31668, 31699, 31729, 31759, 31800, 31859, 31889, 31921, 31957, 31992, 32032, +32110, 32166, 32315, 32386, 32416, 32446, 32476, 32506, 32536, 32566, 32596, 32626, 32660, 32690, 32724, 32755, +32786, 32817, 32850, 32881, 32915, 32945, 32982, 33012, 33042, 33073, 33104, 33134, 33167, 33203, 33251, 33281, +33311, 33342, 33375, 33405, 33436, 33469, 33499, 33529, 33559, 33589, 33620, 33655, 33688, 33718, 33748, 33778, +33809, 33841, 33873, 33905, 33943, 33976, 34006, 34044, 34074, 34104, 34134, 34164, 34203, 34233, 34268, 34299, +34343, 34381, 34411, 34442, 34472, 34502, 34532, 34562, 34593, 34623, 34656, 34686, 34719, 34749, 34779, 34809, +34843, 34873, 34903, 34935, 34966, 34999, 35029, 35059, 35090, 35120, 35166, 35199, 35265, 35299, 35335, 35390, +35449, 35591, 35622, 35686, 35744, 35774, 35804, 35834, 35864, 35894, 35925, 35955, 35988, 36125, 36155, 36185, +36215, 36255, 36286, 36317, 36347, 36381, 36413, 36454, 36485, 36523, 36558, 36710, 36740, 36771, 36801, 36831, +36861, 36891, 36923, 36955, 36989, 37019, 37049, 37079, 37112, 37145, 37177, 37207, 37237, 37274, 37306, 37340, +37492, 37550, 37694, 37738, 37775, 37834, 37950, 37995, 38025, 38055, 38085, 38115, 38145, 38175, 38206, 38236, +38271, 38376, 38406, 38442, 38472, 38503, 38533, 38567, 38597, 38632, 38662, 38698, 38738, 38771, 38801, 38831, +38886, 39029, 39059, 39118, 39181, 39214, 39252, 39282, 39312, 39532, 39562, 39592, 39627, 39659, 39695, 39727, +39757, 40060, 40090, 40120, 40150, 40479, 40509, 40539, 40574, 40605, 40635, 40667, 40697, 40727, 40759, 40831, +40863, 65281, 65311, 65341, 65371, 65504 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +161, 232, 161, 236, 161, 167, 161, 227, 161, 192, 161, 193, 168, 164, 168, 162, +168, 168, 168, 166, 168, 186, 168, 172, 168, 170, 168, 176, 168, 174, 161, 194, +168, 180, 168, 178, 168, 185, 168, 161, 168, 165, 168, 173, 168, 177, 168, 163, +161, 166, 166, 161, 166, 193, 167, 167, 167, 177, 167, 223, 161, 170, 161, 229, +161, 230, 162, 241, 161, 251, 161, 202, 161, 196, 161, 214, 161, 218, 161, 209, +161, 208, 162, 217, 162, 207, 169, 164, 169, 194, 169, 224, 161, 246, 161, 244, +161, 239, 161, 226, 161, 161, 164, 161, 164, 191, 164, 221, 165, 161, 165, 191, +165, 221, 161, 164, 168, 217, 162, 229, 210, 187, 216, 169, 192, 246, 216, 191, +199, 172, 216, 189, 210, 218, 217, 218, 200, 206, 187, 239, 201, 236, 217, 162, +217, 165, 217, 176, 199, 214, 203, 215, 217, 186, 204, 200, 213, 174, 215, 246, +217, 205, 180, 246, 207, 241, 217, 212, 217, 217, 182, 249, 190, 164, 188, 189, +185, 218, 190, 187, 188, 184, 212, 228, 179, 245, 191, 204, 216, 224, 216, 226, +193, 166, 219, 192, 196, 188, 185, 180, 212, 209, 210, 189, 178, 169, 208, 182, +192, 229, 219, 204, 202, 229, 202, 183, 205, 194, 203, 177, 196, 197, 223, 201, +211, 189, 223, 210, 223, 223, 196, 196, 176, 166, 223, 243, 201, 204, 198, 161, +206, 185, 208, 250, 208, 225, 203, 195, 224, 210, 224, 189, 186, 217, 224, 222, +224, 233, 207, 249, 196, 210, 224, 241, 224, 246, 212, 218, 190, 249, 204, 185, +194, 162, 185, 184, 185, 161, 178, 186, 220, 165, 220, 166, 220, 168, 220, 170, +190, 179, 196, 171, 219, 214, 201, 249, 207, 196, 216, 178, 183, 220, 197, 174, +182, 202, 230, 167, 189, 227, 230, 177, 196, 239, 200, 162, 230, 188, 211, 164, +195, 189, 230, 199, 230, 200, 230, 205, 230, 212, 217, 248, 230, 222, 229, 238, +186, 234, 212, 215, 195, 194, 229, 188, 208, 161, 190, 205, 198, 193, 229, 248, +225, 167, 225, 182, 225, 190, 211, 248, 198, 233, 213, 184, 225, 210, 225, 212, +225, 215, 225, 218, 231, 221, 217, 227, 178, 175, 224, 253, 225, 164, 231, 219, +195, 237, 191, 181, 193, 206, 219, 200, 185, 173, 200, 245, 229, 230, 213, 195, +208, 236, 206, 162, 188, 201, 226, 236, 226, 247, 212, 185, 193, 181, 182, 247, +207, 164, 196, 250, 227, 176, 181, 235, 237, 169, 183, 223, 180, 200, 187, 219, +177, 239, 237, 172, 208, 184, 197, 179, 237, 176, 234, 174, 236, 231, 191, 219, +179, 173, 199, 192, 183, 247, 194, 163, 179, 214, 208, 174, 205, 236, 192, 204, +207, 198, 194, 211, 222, 242, 222, 238, 192, 191, 222, 246, 208, 175, 213, 170, +195, 254, 222, 254, 196, 236, 223, 168, 197, 202, 223, 172, 185, 202, 201, 162, +206, 196, 179, 226, 236, 185, 188, 200, 234, 192, 208, 199, 207, 212, 234, 201, +193, 192, 234, 212, 234, 213, 234, 215, 194, 252, 205, 251, 187, 250, 182, 197, +232, 204, 195, 182, 232, 219, 232, 207, 232, 223, 232, 233, 184, 241, 232, 226, +193, 186, 201, 210, 188, 236, 204, 196, 233, 164, 232, 252, 180, 170, 233, 172, +194, 165, 233, 187, 233, 189, 188, 247, 178, 219, 213, 193, 233, 215, 233, 211, +233, 214, 233, 222, 199, 183, 191, 238, 214, 185, 233, 226, 233, 235, 181, 238, +213, 177, 235, 169, 235, 179, 199, 243, 179, 216, 183, 218, 185, 181, 185, 193, +183, 186, 227, 248, 228, 168, 228, 161, 213, 227, 186, 163, 204, 233, 186, 173, +196, 215, 187, 236, 228, 201, 191, 202, 228, 212, 205, 229, 193, 239, 196, 231, +185, 246, 228, 239, 196, 174, 209, 250, 199, 177, 228, 253, 192, 189, 188, 164, +229, 168, 198, 217, 229, 175, 229, 177, 215, 198, 236, 191, 236, 194, 192, 211, +205, 233, 187, 192, 200, 187, 236, 207, 236, 213, 236, 214, 236, 228, 236, 219, +177, 172, 236, 224, 198, 172, 234, 243, 234, 247, 200, 174, 225, 243, 182, 192, +226, 165, 208, 201, 226, 176, 226, 179, 205, 245, 205, 230, 231, 236, 231, 242, +192, 197, 231, 250, 232, 166, 209, 254, 232, 171, 232, 183, 185, 207, 234, 179, +201, 250, 231, 222, 208, 243, 231, 220, 240, 222, 204, 219, 205, 180, 177, 212, +240, 249, 241, 169, 241, 175, 185, 239, 205, 238, 241, 229, 186, 208, 237, 236, +237, 244, 190, 236, 237, 253, 182, 195, 238, 169, 238, 173, 195, 172, 206, 249, +237, 191, 237, 194, 207, 245, 197, 240, 237, 213, 237, 219, 237, 222, 193, 215, +237, 230, 192, 241, 236, 241, 187, 246, 236, 250, 211, 237, 195, 216, 189, 213, +176, 222, 240, 162, 203, 235, 190, 191, 241, 187, 241, 193, 202, 250, 214, 241, +243, 207, 243, 205, 178, 223, 243, 219, 178, 173, 243, 240, 194, 168, 192, 233, +243, 252, 244, 164, 195, 215, 244, 206, 193, 187, 184, 226, 244, 233, 203, 216, +208, 245, 244, 235, 247, 227, 215, 235, 190, 192, 231, 163, 194, 231, 231, 184, +212, 181, 243, 190, 216, 232, 202, 240, 184, 225, 244, 203, 207, 232, 244, 232, +241, 231, 241, 242, 241, 248, 241, 250, 235, 193, 235, 197, 197, 214, 235, 216, +235, 223, 205, 209, 184, 175, 200, 249, 184, 224, 201, 197, 179, 188, 244, 168, +214, 219, 244, 184, 244, 190, 220, 180, 206, 223, 209, 191, 191, 193, 198, 187, +220, 248, 210, 240, 192, 243, 186, 201, 221, 183, 221, 178, 221, 202, 183, 198, +221, 200, 221, 230, 221, 215, 180, 208, 221, 245, 213, 244, 177, 205, 222, 164, +206, 181, 221, 250, 222, 161, 212, 204, 209, 166, 222, 183, 222, 188, 212, 229, +222, 190, 242, 174, 179, 230, 206, 195, 242, 182, 199, 249, 184, 242, 183, 228, +192, 175, 242, 234, 242, 240, 242, 238, 195, 248, 243, 174, 243, 178, 208, 183, +243, 186, 243, 188, 189, 214, 214, 212, 208, 228, 241, 202, 212, 163, 201, 209, +176, 253, 229, 189, 244, 197, 206, 247, 188, 251, 189, 226, 217, 234, 246, 164, +213, 178, 229, 192, 246, 165, 190, 175, 218, 165, 201, 232, 218, 183, 197, 181, +218, 209, 218, 223, 245, 185, 225, 217, 245, 249, 177, 180, 234, 221, 234, 231, +198, 240, 204, 203, 214, 186, 190, 224, 245, 210, 245, 215, 245, 225, 177, 196, +245, 238, 201, 237, 234, 166, 179, 181, 233, 252, 192, 177, 199, 168, 179, 217, +215, 183, 185, 228, 194, 223, 229, 222, 229, 225, 218, 246, 215, 222, 219, 173, +181, 166, 177, 201, 219, 184, 208, 239, 189, 205, 195, 209, 245, 184, 184, 170, +188, 248, 246, 199, 246, 201, 246, 202, 246, 204, 246, 203, 246, 205, 246, 206, +182, 164, 190, 251, 199, 166, 207, 179, 203, 248, 239, 191, 239, 204, 190, 181, +179, 164, 195, 197, 227, 207, 218, 230, 179, 194, 218, 237, 211, 231, 203, 237, +209, 197, 211, 234, 246, 170, 246, 175, 199, 224, 189, 249, 247, 178, 247, 181, +206, 164, 210, 179, 205, 199, 183, 231, 247, 208, 247, 209, 247, 211, 203, 199, +226, 202, 194, 237, 230, 234, 185, 199, 247, 197, 247, 216, 247, 221, 219, 203, +247, 205, 211, 227, 246, 221, 190, 168, 177, 238, 196, 241, 184, 235, 240, 204, +245, 186, 247, 234, 194, 233, 247, 236, 237, 233, 216, 187, 247, 251, 179, 221, +185, 234, 163, 161, 163, 191, 163, 221, 163, 251, 161, 233 + }); + + super.setUp(); + } + + @KnownFailure("This Characterset is not properly supported in Android!") + @Override + public void test_CodecDynamic() throws CharacterCodingException { + super.test_CodecDynamic(); + } + + @KnownFailure("This Characterset is not properly supported in Android!") + @Override + public void test_Decode() throws CharacterCodingException { + super.test_Decode(); + } + + @KnownFailure("This Characterset is not properly supported in Android!") + @Override + public void test_Encode() throws CharacterCodingException { + super.test_Encode(); + } + + @KnownFailure("This Characterset is mapped to GBK Android!") + @Override + public void test_nameMatch() { + super.test_nameMatch(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_GBK.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_GBK.java new file mode 100644 index 0000000..6b919ef --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_GBK.java @@ -0,0 +1,524 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +// SEE correspondig_Android test class: +//@TestTargetClass(targets.Charsets.GBK.class) + +public class Charset_MultiByte_GBK extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "GBK"; + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +164, 167, 168, 176, 177, 183, 215, 224, 225, 232, 233, 234, 236, 237, 242, 243, +247, 249, 250, 252, 257, 275, 299, 324, 363, 462, 472, 593, 609, 711, 729, 913, +923, 933, 945, 955, 965, 1025, 1040, 1050, 1060, 1070, 1080, 1090, 1100, 8208, 8220, 8230, +8240, 8251, 8451, 8470, 8481, 8544, 8554, 8564, 8592, 8712, 8725, 8735, 8745, 8756, 8776, 8786, +8800, 8814, 8857, 8869, 8895, 8978, 9312, 9332, 9342, 9352, 9362, 9472, 9482, 9492, 9502, 9512, +9522, 9532, 9542, 9552, 9562, 9572, 9582, 9601, 9611, 9621, 9632, 9650, 9660, 9670, 9698, 9733, +9792, 12288, 12298, 12308, 12318, 12328, 12353, 12363, 12373, 12383, 12393, 12403, 12413, 12423, 12433, 12443, +12453, 12463, 12473, 12483, 12493, 12503, 12513, 12523, 12533, 12549, 12559, 12569, 12579, 12832, 12849, 12963, +13198, 13212, 13252, 13262, 19968, 19978, 19988, 19998, 20008, 20018, 20028, 20038, 20048, 20058, 20068, 20078, +20088, 20098, 20108, 20118, 20128, 20138, 20148, 20158, 20168, 20178, 20188, 20198, 20208, 20218, 20228, 20238, +20248, 20258, 20268, 20278, 20288, 20298, 20308, 20318, 20328, 20338, 20348, 20358, 20368, 20378, 20388, 20398, +20408, 20418, 20428, 20438, 20448, 20458, 20468, 20478, 20488, 20498, 20508, 20518, 20528, 20538, 20548, 20558, +20568, 20578, 20588, 20598, 20608, 20618, 20628, 20638, 20648, 20658, 20668, 20678, 20688, 20698, 20708, 20718, +20728, 20738, 20748, 20758, 20768, 20778, 20788, 20798, 20808, 20818, 20828, 20838, 20848, 20858, 20868, 20878, +20888, 20898, 20908, 20918, 20928, 20938, 20948, 20958, 20968, 20978, 20988, 20998, 21008, 21018, 21028, 21038, +21048, 21058, 21068, 21078, 21088, 21098, 21108, 21118, 21128, 21138, 21148, 21158, 21168, 21178, 21188, 21198, +21208, 21218, 21228, 21238, 21248, 21258, 21268, 21278, 21288, 21298, 21308, 21318, 21328, 21338, 21348, 21358, +21368, 21378, 21388, 21398, 21408, 21418, 21428, 21438, 21448, 21458, 21468, 21478, 21488, 21498, 21508, 21518, +21528, 21538, 21548, 21558, 21568, 21578, 21588, 21598, 21608, 21618, 21628, 21638, 21648, 21658, 21668, 21678, +21688, 21698, 21708, 21718, 21728, 21738, 21748, 21758, 21768, 21778, 21788, 21798, 21808, 21818, 21828, 21838, +21848, 21858, 21868, 21878, 21888, 21898, 21908, 21918, 21928, 21938, 21948, 21958, 21968, 21978, 21988, 21998, +22008, 22018, 22028, 22038, 22048, 22058, 22068, 22078, 22088, 22098, 22108, 22118, 22128, 22138, 22148, 22158, +22168, 22178, 22188, 22198, 22208, 22218, 22228, 22238, 22248, 22258, 22268, 22278, 22288, 22298, 22308, 22318, +22328, 22338, 22348, 22358, 22368, 22378, 22388, 22398, 22408, 22418, 22428, 22438, 22448, 22458, 22468, 22478, +22488, 22498, 22508, 22518, 22528, 22538, 22548, 22558, 22568, 22578, 22588, 22598, 22608, 22618, 22628, 22638, +22648, 22658, 22668, 22678, 22688, 22698, 22708, 22718, 22728, 22738, 22748, 22758, 22768, 22778, 22788, 22798, +22808, 22818, 22828, 22838, 22848, 22858, 22868, 22878, 22888, 22898, 22908, 22918, 22928, 22938, 22948, 22958, +22968, 22978, 22988, 22998, 23008, 23018, 23028, 23038, 23048, 23058, 23068, 23078, 23088, 23098, 23108, 23118, +23128, 23138, 23148, 23158, 23168, 23178, 23188, 23198, 23208, 23218, 23228, 23238, 23248, 23258, 23268, 23278, +23288, 23298, 23308, 23318, 23328, 23338, 23348, 23358, 23368, 23378, 23388, 23398, 23408, 23418, 23428, 23438, +23448, 23458, 23468, 23478, 23488, 23498, 23508, 23518, 23528, 23538, 23548, 23558, 23568, 23578, 23588, 23598, +23608, 23618, 23628, 23638, 23648, 23658, 23668, 23678, 23688, 23698, 23708, 23718, 23728, 23738, 23748, 23758, +23768, 23778, 23788, 23798, 23808, 23818, 23828, 23838, 23848, 23858, 23868, 23878, 23888, 23898, 23908, 23918, +23928, 23938, 23948, 23958, 23968, 23978, 23988, 23998, 24008, 24018, 24028, 24038, 24048, 24058, 24068, 24078, +24088, 24098, 24108, 24118, 24128, 24138, 24148, 24158, 24168, 24178, 24188, 24198, 24208, 24218, 24228, 24238, +24248, 24258, 24268, 24278, 24288, 24298, 24308, 24318, 24328, 24338, 24348, 24358, 24368, 24378, 24388, 24398, +24408, 24418, 24428, 24438, 24448, 24458, 24468, 24478, 24488, 24498, 24508, 24518, 24528, 24538, 24548, 24558, +24568, 24578, 24588, 24598, 24608, 24618, 24628, 24638, 24648, 24658, 24668, 24678, 24688, 24698, 24708, 24718, +24728, 24738, 24748, 24758, 24768, 24778, 24788, 24798, 24808, 24818, 24828, 24838, 24848, 24858, 24868, 24878, +24888, 24898, 24908, 24918, 24928, 24938, 24948, 24958, 24968, 24978, 24988, 24998, 25008, 25018, 25028, 25038, +25048, 25058, 25068, 25078, 25088, 25098, 25108, 25118, 25128, 25138, 25148, 25158, 25168, 25178, 25188, 25198, +25208, 25218, 25228, 25238, 25248, 25258, 25268, 25278, 25288, 25298, 25308, 25318, 25328, 25338, 25348, 25358, +25368, 25378, 25388, 25398, 25408, 25418, 25428, 25438, 25448, 25458, 25468, 25478, 25488, 25498, 25508, 25518, +25528, 25538, 25548, 25558, 25568, 25578, 25588, 25598, 25608, 25618, 25628, 25638, 25648, 25658, 25668, 25678, +25688, 25698, 25708, 25718, 25728, 25738, 25748, 25758, 25768, 25778, 25788, 25798, 25808, 25818, 25828, 25838, +25848, 25858, 25868, 25878, 25888, 25898, 25908, 25918, 25928, 25938, 25948, 25958, 25968, 25978, 25988, 25998, +26008, 26018, 26028, 26038, 26048, 26058, 26068, 26078, 26088, 26098, 26108, 26118, 26128, 26138, 26148, 26158, +26168, 26178, 26188, 26198, 26208, 26218, 26228, 26238, 26248, 26258, 26268, 26278, 26288, 26298, 26308, 26318, +26328, 26338, 26348, 26358, 26368, 26378, 26388, 26398, 26408, 26418, 26428, 26438, 26448, 26458, 26468, 26478, +26488, 26498, 26508, 26518, 26528, 26538, 26548, 26558, 26568, 26578, 26588, 26598, 26608, 26618, 26628, 26638, +26648, 26658, 26668, 26678, 26688, 26698, 26708, 26718, 26728, 26738, 26748, 26758, 26768, 26778, 26788, 26798, +26808, 26818, 26828, 26838, 26848, 26858, 26868, 26878, 26888, 26898, 26908, 26918, 26928, 26938, 26948, 26958, +26968, 26978, 26988, 26998, 27008, 27018, 27028, 27038, 27048, 27058, 27068, 27078, 27088, 27098, 27108, 27118, +27128, 27138, 27148, 27158, 27168, 27178, 27188, 27198, 27208, 27218, 27228, 27238, 27248, 27258, 27268, 27278, +27288, 27298, 27308, 27318, 27328, 27338, 27348, 27358, 27368, 27378, 27388, 27398, 27408, 27418, 27428, 27438, +27448, 27458, 27468, 27478, 27488, 27498, 27508, 27518, 27528, 27538, 27548, 27558, 27568, 27578, 27588, 27598, +27608, 27618, 27628, 27638, 27648, 27658, 27668, 27678, 27688, 27698, 27708, 27718, 27728, 27738, 27748, 27758, +27768, 27778, 27788, 27798, 27808, 27818, 27828, 27838, 27848, 27858, 27868, 27878, 27888, 27898, 27908, 27918, +27928, 27938, 27948, 27958, 27968, 27978, 27988, 27998, 28008, 28018, 28028, 28038, 28048, 28058, 28068, 28078, +28088, 28098, 28108, 28118, 28128, 28138, 28148, 28158, 28168, 28178, 28188, 28198, 28208, 28218, 28228, 28238, +28248, 28258, 28268, 28278, 28288, 28298, 28308, 28318, 28328, 28338, 28348, 28358, 28368, 28378, 28388, 28398, +28408, 28418, 28428, 28438, 28448, 28458, 28468, 28478, 28488, 28498, 28508, 28518, 28528, 28538, 28548, 28558, +28568, 28578, 28588, 28598, 28608, 28618, 28628, 28638, 28648, 28658, 28668, 28678, 28688, 28698, 28708, 28718, +28728, 28738, 28748, 28758, 28768, 28778, 28788, 28798, 28808, 28818, 28828, 28838, 28848, 28858, 28868, 28878, +28888, 28898, 28908, 28918, 28928, 28938, 28948, 28958, 28968, 28978, 28988, 28998, 29008, 29018, 29028, 29038, +29048, 29058, 29068, 29078, 29088, 29098, 29108, 29118, 29128, 29138, 29148, 29158, 29168, 29178, 29188, 29198, +29208, 29218, 29228, 29238, 29248, 29258, 29268, 29278, 29288, 29298, 29308, 29318, 29328, 29338, 29348, 29358, +29368, 29378, 29388, 29398, 29408, 29418, 29428, 29438, 29448, 29458, 29468, 29478, 29488, 29498, 29508, 29518, +29528, 29538, 29548, 29558, 29568, 29578, 29588, 29598, 29608, 29618, 29628, 29638, 29648, 29658, 29668, 29678, +29688, 29698, 29708, 29718, 29728, 29738, 29748, 29758, 29768, 29778, 29788, 29798, 29808, 29818, 29828, 29838, +29848, 29858, 29868, 29878, 29888, 29898, 29908, 29918, 29928, 29938, 29948, 29958, 29968, 29978, 29988, 29998, +30008, 30018, 30028, 30038, 30048, 30058, 30068, 30078, 30088, 30098, 30108, 30118, 30128, 30138, 30148, 30158, +30168, 30178, 30188, 30198, 30208, 30218, 30228, 30238, 30248, 30258, 30268, 30278, 30288, 30298, 30308, 30318, +30328, 30338, 30348, 30358, 30368, 30378, 30388, 30398, 30408, 30418, 30428, 30438, 30448, 30458, 30468, 30478, +30488, 30498, 30508, 30518, 30528, 30538, 30548, 30558, 30568, 30578, 30588, 30598, 30608, 30618, 30628, 30638, +30648, 30658, 30668, 30678, 30688, 30698, 30708, 30718, 30728, 30738, 30748, 30758, 30768, 30778, 30788, 30798, +30808, 30818, 30828, 30838, 30848, 30858, 30868, 30878, 30888, 30898, 30908, 30918, 30928, 30938, 30948, 30958, +30968, 30978, 30988, 30998, 31008, 31018, 31028, 31038, 31048, 31058, 31068, 31078, 31088, 31098, 31108, 31118, +31128, 31138, 31148, 31158, 31168, 31178, 31188, 31198, 31208, 31218, 31228, 31238, 31248, 31258, 31268, 31278, +31288, 31298, 31308, 31318, 31328, 31338, 31348, 31358, 31368, 31378, 31388, 31398, 31408, 31418, 31428, 31438, +31448, 31458, 31468, 31478, 31488, 31498, 31508, 31518, 31528, 31538, 31548, 31558, 31568, 31578, 31588, 31598, +31608, 31618, 31628, 31638, 31648, 31658, 31668, 31678, 31688, 31698, 31708, 31718, 31728, 31738, 31748, 31758, +31768, 31778, 31788, 31798, 31808, 31818, 31828, 31838, 31848, 31858, 31868, 31878, 31888, 31898, 31908, 31918, +31928, 31938, 31948, 31958, 31968, 31978, 31988, 31998, 32008, 32018, 32028, 32038, 32048, 32058, 32068, 32078, +32088, 32098, 32108, 32118, 32128, 32138, 32148, 32158, 32168, 32178, 32188, 32198, 32208, 32218, 32228, 32238, +32248, 32258, 32268, 32278, 32288, 32298, 32308, 32318, 32328, 32338, 32348, 32358, 32368, 32378, 32388, 32398, +32408, 32418, 32428, 32438, 32448, 32458, 32468, 32478, 32488, 32498, 32508, 32518, 32528, 32538, 32548, 32558, +32568, 32578, 32588, 32598, 32608, 32618, 32628, 32638, 32648, 32658, 32668, 32678, 32688, 32698, 32708, 32718, +32728, 32738, 32748, 32758, 32768, 32778, 32788, 32798, 32808, 32818, 32828, 32838, 32848, 32858, 32868, 32878, +32888, 32898, 32908, 32918, 32928, 32938, 32948, 32958, 32968, 32978, 32988, 32998, 33008, 33018, 33028, 33038, +33048, 33058, 33068, 33078, 33088, 33098, 33108, 33118, 33128, 33138, 33148, 33158, 33168, 33178, 33188, 33198, +33208, 33218, 33228, 33238, 33248, 33258, 33268, 33278, 33288, 33298, 33308, 33318, 33328, 33338, 33348, 33358, +33368, 33378, 33388, 33398, 33408, 33418, 33428, 33438, 33448, 33458, 33468, 33478, 33488, 33498, 33508, 33518, +33528, 33538, 33548, 33558, 33568, 33578, 33588, 33598, 33608, 33618, 33628, 33638, 33648, 33658, 33668, 33678, +33688, 33698, 33708, 33718, 33728, 33738, 33748, 33758, 33768, 33778, 33788, 33798, 33808, 33818, 33828, 33838, +33848, 33858, 33868, 33878, 33888, 33898, 33908, 33918, 33928, 33938, 33948, 33958, 33968, 33978, 33988, 33998, +34008, 34018, 34028, 34038, 34048, 34058, 34068, 34078, 34088, 34098, 34108, 34118, 34128, 34138, 34148, 34158, +34168, 34178, 34188, 34198, 34208, 34218, 34228, 34238, 34248, 34258, 34268, 34278, 34288, 34298, 34308, 34318, +34328, 34338, 34348, 34358, 34368, 34378, 34388, 34398, 34408, 34418, 34428, 34438, 34448, 34458, 34468, 34478, +34488, 34498, 34508, 34518, 34528, 34538, 34548, 34558, 34568, 34578, 34588, 34598, 34608, 34618, 34628, 34638, +34648, 34658, 34668, 34678, 34688, 34698, 34708, 34718, 34728, 34738, 34748, 34758, 34768, 34778, 34788, 34798, +34808, 34818, 34828, 34838, 34848, 34858, 34868, 34878, 34888, 34898, 34908, 34918, 34928, 34938, 34948, 34958, +34968, 34978, 34988, 34998, 35008, 35018, 35028, 35038, 35048, 35058, 35068, 35078, 35088, 35098, 35108, 35118, +35128, 35138, 35148, 35158, 35168, 35178, 35188, 35198, 35208, 35218, 35228, 35238, 35248, 35258, 35268, 35278, +35288, 35298, 35308, 35318, 35328, 35338, 35348, 35358, 35368, 35378, 35388, 35398, 35408, 35418, 35428, 35438, +35448, 35458, 35468, 35478, 35488, 35498, 35508, 35518, 35528, 35538, 35548, 35558, 35568, 35578, 35588, 35598, +35608, 35618, 35628, 35638, 35648, 35658, 35668, 35678, 35688, 35698, 35708, 35718, 35728, 35738, 35748, 35758, +35768, 35778, 35788, 35798, 35808, 35818, 35828, 35838, 35848, 35858, 35868, 35878, 35888, 35898, 35908, 35918, +35928, 35938, 35948, 35958, 35968, 35978, 35988, 35998, 36008, 36018, 36028, 36038, 36048, 36058, 36068, 36078, +36088, 36098, 36108, 36118, 36128, 36138, 36148, 36158, 36168, 36178, 36188, 36198, 36208, 36218, 36228, 36238, +36248, 36258, 36268, 36278, 36288, 36298, 36308, 36318, 36328, 36338, 36348, 36358, 36368, 36378, 36388, 36398, +36408, 36418, 36428, 36438, 36448, 36458, 36468, 36478, 36488, 36498, 36508, 36518, 36528, 36538, 36548, 36558, +36568, 36578, 36588, 36598, 36608, 36618, 36628, 36638, 36648, 36658, 36668, 36678, 36688, 36698, 36708, 36718, +36728, 36738, 36748, 36758, 36768, 36778, 36788, 36798, 36808, 36818, 36828, 36838, 36848, 36858, 36868, 36878, +36888, 36898, 36908, 36918, 36928, 36938, 36948, 36958, 36968, 36978, 36988, 36998, 37008, 37018, 37028, 37038, +37048, 37058, 37068, 37078, 37088, 37098, 37108, 37118, 37128, 37138, 37148, 37158, 37168, 37178, 37188, 37198, +37208, 37218, 37228, 37238, 37248, 37258, 37268, 37278, 37288, 37298, 37308, 37318, 37328, 37338, 37348, 37358, +37368, 37378, 37388, 37398, 37408, 37418, 37428, 37438, 37448, 37458, 37468, 37478, 37488, 37498, 37508, 37518, +37528, 37538, 37548, 37558, 37568, 37578, 37588, 37598, 37608, 37618, 37628, 37638, 37648, 37658, 37668, 37678, +37688, 37698, 37708, 37718, 37728, 37738, 37748, 37758, 37768, 37778, 37788, 37798, 37808, 37818, 37828, 37838, +37848, 37858, 37868, 37878, 37888, 37898, 37908, 37918, 37928, 37938, 37948, 37958, 37968, 37978, 37988, 37998, +38008, 38018, 38028, 38038, 38048, 38058, 38068, 38078, 38088, 38098, 38108, 38118, 38128, 38138, 38148, 38158, +38168, 38178, 38188, 38198, 38208, 38218, 38228, 38238, 38248, 38258, 38268, 38278, 38288, 38298, 38308, 38318, +38328, 38338, 38348, 38358, 38368, 38378, 38388, 38398, 38408, 38418, 38428, 38438, 38448, 38458, 38468, 38478, +38488, 38498, 38508, 38518, 38528, 38538, 38548, 38558, 38568, 38578, 38588, 38598, 38608, 38618, 38628, 38638, +38648, 38658, 38668, 38678, 38688, 38698, 38708, 38718, 38728, 38738, 38748, 38758, 38768, 38778, 38788, 38798, +38808, 38818, 38828, 38838, 38848, 38858, 38868, 38878, 38888, 38898, 38908, 38918, 38928, 38938, 38948, 38958, +38968, 38978, 38988, 38998, 39008, 39018, 39028, 39038, 39048, 39058, 39068, 39078, 39088, 39098, 39108, 39118, +39128, 39138, 39148, 39158, 39168, 39178, 39188, 39198, 39208, 39218, 39228, 39238, 39248, 39258, 39268, 39278, +39288, 39298, 39308, 39318, 39328, 39338, 39348, 39358, 39368, 39378, 39388, 39398, 39408, 39418, 39428, 39438, +39448, 39458, 39468, 39478, 39488, 39498, 39508, 39518, 39528, 39538, 39548, 39558, 39568, 39578, 39588, 39598, +39608, 39618, 39628, 39638, 39648, 39658, 39668, 39678, 39688, 39698, 39708, 39718, 39728, 39738, 39748, 39758, +39768, 39778, 39788, 39798, 39808, 39818, 39828, 39838, 39848, 39858, 39868, 39878, 39888, 39898, 39908, 39918, +39928, 39938, 39948, 39958, 39968, 39978, 39988, 39998, 40008, 40018, 40028, 40038, 40048, 40058, 40068, 40078, +40088, 40098, 40108, 40118, 40128, 40138, 40148, 40158, 40168, 40178, 40188, 40198, 40208, 40218, 40228, 40238, +40248, 40258, 40268, 40278, 40288, 40298, 40308, 40318, 40328, 40338, 40348, 40358, 40368, 40378, 40388, 40398, +40408, 40418, 40428, 40438, 40448, 40458, 40468, 40478, 40488, 40498, 40508, 40518, 40528, 40538, 40548, 40558, +40568, 40578, 40588, 40598, 40608, 40618, 40628, 40638, 40648, 40658, 40668, 40678, 40688, 40698, 40708, 40718, +40728, 40738, 40748, 40758, 40768, 40778, 40788, 40798, 40808, 40818, 40828, 40838, 40848, 40858, 40868, 57344, +57354, 57364, 57374, 57384, 57394, 57404, 57414, 57424, 57434, 57444, 57454, 57464, 57474, 57484, 57494, 57504, +57514, 57524, 57534, 57544, 57554, 57564, 57574, 57584, 57594, 57604, 57614, 57624, 57634, 57644, 57654, 57664, +57674, 57684, 57694, 57704, 57714, 57724, 57734, 57744, 57754, 57764, 57774, 57784, 57794, 57804, 57814, 57824, +57834, 57844, 57854, 57864, 57874, 57884, 57894, 57904, 57914, 57924, 57934, 57944, 57954, 57964, 57974, 57984, +57994, 58004, 58014, 58024, 58034, 58044, 58054, 58064, 58074, 58084, 58094, 58104, 58114, 58124, 58134, 58144, +58154, 58164, 58174, 58184, 58194, 58204, 58214, 58224, 58234, 58244, 58254, 58264, 58274, 58284, 58294, 58304, +58314, 58324, 58334, 58344, 58354, 58364, 58374, 58384, 58394, 58404, 58414, 58424, 58434, 58444, 58454, 58464, +58474, 58484, 58494, 58504, 58514, 58524, 58534, 58544, 58554, 58564, 58574, 58584, 58594, 58604, 58614, 58624, +58634, 58644, 58654, 58664, 58674, 58684, 58694, 58704, 58714, 58724, 58734, 58744, 58754, 58764, 58774, 58784, +58794, 58804, 58814, 58824, 58834, 58844, 58854, 58864, 58874, 58884, 58894, 58904, 58914, 58924, 58934, 58944, +58954, 58964, 58974, 58984, 58994, 59004, 59014, 59024, 59034, 59044, 59054, 59064, 59074, 59084, 59094, 59104, +59114, 59124, 59134, 59144, 59154, 59164, 59174, 59184, 59194, 59204, 59214, 59224, 59234, 59244, 59254, 59264, +59274, 59284, 59294, 59304, 59314, 59324, 59334, 59344, 59354, 59364, 59374, 59384, 59394, 59404, 59414, 59424, +59434, 59444, 59454, 59464, 59474, 59484, 63788, 63865, 63893, 63975, 63985, 64012, 64024, 64035, 65072, 65082, +65092, 65102, 65113, 65123, 65281, 65291, 65301, 65311, 65321, 65331, 65341, 65351, 65361, 65371, 65504, 65536 + }); + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +161, 232, 161, 236, 161, 167, 161, 227, 161, 192, 161, 164, 161, 193, 168, 164, +168, 162, 168, 168, 168, 166, 168, 186, 168, 172, 168, 170, 168, 176, 168, 174, +161, 194, 168, 180, 168, 178, 168, 185, 168, 161, 168, 165, 168, 169, 168, 189, +168, 177, 168, 163, 168, 182, 168, 187, 168, 192, 161, 166, 168, 66, 166, 161, +166, 171, 166, 180, 166, 193, 166, 203, 166, 212, 167, 167, 167, 161, 167, 172, +167, 182, 167, 192, 167, 218, 167, 228, 167, 238, 169, 92, 161, 176, 161, 173, +161, 235, 161, 249, 161, 230, 161, 237, 169, 89, 162, 241, 162, 251, 162, 165, +161, 251, 161, 202, 168, 77, 168, 78, 161, 201, 161, 224, 161, 214, 168, 80, +161, 217, 161, 218, 161, 209, 161, 205, 168, 83, 161, 208, 162, 217, 162, 197, +162, 207, 162, 177, 162, 187, 169, 164, 169, 174, 169, 184, 169, 194, 169, 204, +169, 214, 169, 224, 169, 234, 168, 84, 168, 94, 168, 104, 168, 114, 168, 120, +168, 131, 168, 138, 161, 246, 161, 248, 168, 139, 161, 244, 168, 141, 161, 239, +161, 226, 161, 161, 161, 182, 161, 178, 168, 149, 169, 71, 164, 161, 164, 171, +164, 181, 164, 191, 164, 201, 164, 211, 164, 221, 164, 231, 164, 241, 169, 97, +165, 165, 165, 175, 165, 185, 165, 195, 165, 205, 165, 215, 165, 225, 165, 235, +165, 245, 168, 197, 168, 207, 168, 217, 168, 227, 162, 229, 169, 90, 169, 73, +169, 74, 169, 76, 169, 80, 169, 81, 210, 187, 201, 207, 199, 210, 216, 169, +216, 173, 180, 174, 129, 83, 129, 88, 192, 214, 129, 93, 129, 97, 129, 105, +129, 112, 129, 121, 182, 254, 129, 129, 217, 239, 129, 136, 129, 140, 129, 147, +129, 148, 129, 152, 129, 155, 129, 158, 209, 246, 129, 168, 129, 174, 188, 191, +211, 197, 216, 243, 129, 192, 193, 230, 129, 203, 129, 211, 129, 215, 216, 250, +129, 220, 129, 226, 217, 174, 129, 237, 129, 242, 129, 249, 130, 64, 206, 234, +130, 74, 130, 83, 130, 89, 130, 95, 130, 98, 217, 179, 130, 107, 217, 194, +130, 124, 181, 185, 217, 195, 190, 235, 130, 146, 213, 174, 130, 162, 217, 203, +130, 176, 130, 184, 217, 204, 197, 188, 191, 254, 130, 214, 130, 223, 130, 233, +180, 162, 176, 193, 130, 254, 131, 73, 131, 82, 193, 197, 131, 100, 217, 215, +131, 113, 131, 122, 131, 130, 131, 139, 131, 149, 131, 158, 131, 168, 131, 178, +207, 200, 131, 186, 182, 181, 131, 199, 192, 188, 131, 205, 131, 209, 131, 214, +131, 220, 218, 163, 182, 172, 210, 177, 190, 187, 131, 245, 131, 251, 132, 68, +132, 75, 132, 81, 219, 202, 183, 214, 132, 91, 184, 213, 197, 208, 185, 206, +200, 175, 188, 193, 216, 221, 198, 202, 132, 133, 188, 244, 132, 146, 132, 155, +197, 252, 132, 170, 132, 178, 132, 181, 132, 185, 132, 192, 132, 199, 132, 206, +191, 177, 132, 221, 132, 230, 132, 239, 212, 200, 132, 251, 133, 67, 133, 71, +133, 77, 133, 85, 133, 92, 133, 97, 133, 101, 178, 169, 194, 177, 216, 180, +208, 182, 179, 167, 209, 225, 133, 133, 133, 139, 133, 143, 133, 152, 133, 160, +211, 214, 133, 170, 133, 174, 193, 237, 204, 168, 133, 181, 184, 247, 186, 243, +133, 190, 133, 194, 204, 253, 133, 200, 209, 189, 184, 230, 223, 190, 133, 218, +214, 220, 223, 218, 186, 244, 197, 216, 184, 192, 223, 203, 223, 229, 134, 66, +207, 204, 223, 211, 223, 223, 134, 80, 134, 83, 196, 196, 134, 93, 134, 100, +134, 106, 134, 112, 134, 120, 134, 126, 224, 167, 134, 138, 215, 196, 134, 149, +134, 156, 134, 164, 216, 196, 224, 164, 191, 166, 186, 176, 224, 184, 134, 192, +134, 200, 134, 209, 134, 214, 134, 220, 134, 227, 134, 232, 224, 205, 134, 240, +134, 245, 134, 251, 224, 209, 135, 75, 135, 81, 135, 88, 215, 236, 135, 100, +135, 109, 135, 116, 224, 224, 135, 130, 135, 135, 135, 143, 135, 151, 186, 191, +135, 166, 135, 176, 135, 185, 135, 194, 135, 202, 196, 210, 224, 236, 187, 216, +135, 230, 135, 236, 135, 242, 212, 178, 135, 253, 136, 72, 136, 79, 219, 220, +136, 90, 219, 224, 219, 208, 136, 106, 215, 185, 198, 186, 136, 118, 136, 124, +136, 130, 192, 221, 136, 145, 191, 209, 136, 154, 136, 161, 136, 169, 179, 199, +219, 245, 136, 187, 136, 196, 136, 203, 220, 165, 136, 215, 136, 222, 220, 166, +136, 236, 136, 244, 136, 253, 137, 71, 137, 79, 137, 86, 137, 95, 137, 102, +137, 112, 137, 119, 137, 126, 137, 135, 137, 141, 137, 149, 137, 159, 137, 168, +137, 176, 137, 185, 137, 194, 137, 203, 201, 249, 137, 216, 180, 166, 137, 232, +137, 238, 137, 244, 137, 248, 137, 253, 138, 67, 138, 71, 177, 188, 138, 81, +138, 88, 138, 98, 138, 103, 215, 177, 138, 113, 138, 118, 230, 165, 196, 221, +138, 138, 138, 145, 138, 152, 138, 157, 138, 162, 138, 169, 138, 178, 138, 186, +230, 174, 138, 195, 196, 200, 138, 208, 138, 217, 138, 223, 138, 231, 138, 238, +138, 247, 230, 190, 139, 72, 201, 244, 139, 86, 139, 96, 139, 105, 139, 113, +139, 123, 230, 199, 139, 139, 139, 146, 139, 154, 139, 160, 139, 166, 139, 173, +139, 182, 139, 192, 139, 201, 230, 212, 139, 219, 139, 229, 217, 248, 139, 246, +140, 64, 140, 72, 215, 206, 209, 167, 202, 235, 200, 230, 229, 179, 140, 97, +185, 217, 191, 205, 140, 107, 188, 210, 140, 117, 140, 122, 140, 129, 196, 175, +213, 175, 140, 150, 181, 188, 189, 171, 140, 168, 201, 208, 211, 200, 140, 185, +202, 172, 178, 227, 140, 197, 140, 202, 205, 192, 140, 215, 140, 222, 140, 230, +225, 172, 140, 242, 225, 177, 140, 252, 141, 67, 141, 72, 225, 187, 141, 87, +141, 96, 141, 104, 141, 109, 141, 117, 141, 126, 141, 133, 180, 222, 225, 198, +141, 155, 141, 162, 141, 171, 141, 179, 141, 185, 141, 194, 141, 202, 141, 209, +141, 217, 225, 214, 141, 236, 141, 246, 141, 254, 142, 73, 142, 83, 142, 92, +142, 101, 142, 110, 142, 119, 215, 243, 142, 128, 142, 133, 142, 138, 142, 144, +193, 177, 142, 152, 142, 160, 142, 167, 142, 172, 142, 179, 225, 163, 225, 165, +142, 202, 184, 201, 211, 215, 199, 236, 194, 174, 184, 253, 142, 232, 142, 238, +211, 185, 142, 251, 143, 68, 193, 206, 143, 83, 226, 222, 219, 200, 222, 195, +222, 196, 143, 115, 143, 120, 207, 210, 143, 132, 199, 191, 143, 147, 143, 157, +229, 233, 208, 206, 177, 242, 143, 178, 205, 249, 187, 178, 143, 191, 143, 196, +225, 229, 143, 211, 225, 232, 210, 228, 236, 254, 143, 232, 226, 232, 226, 229, +226, 238, 203, 203, 144, 67, 178, 192, 181, 161, 185, 214, 144, 86, 144, 93, +144, 99, 186, 227, 144, 112, 144, 118, 199, 161, 226, 253, 199, 196, 144, 136, +144, 143, 144, 148, 208, 252, 144, 158, 144, 165, 190, 170, 144, 180, 144, 185, +178, 210, 144, 193, 144, 198, 237, 169, 144, 210, 211, 222, 183, 223, 144, 231, +144, 241, 144, 250, 187, 197, 145, 73, 145, 82, 145, 89, 145, 98, 145, 106, +145, 116, 145, 124, 145, 134, 145, 143, 145, 149, 145, 158, 145, 166, 145, 173, +145, 180, 145, 190, 145, 199, 145, 208, 145, 217, 206, 236, 145, 226, 145, 230, +145, 235, 145, 242, 145, 249, 145, 253, 146, 65, 146, 70, 146, 78, 176, 231, +146, 86, 146, 91, 146, 98, 182, 182, 191, 217, 146, 112, 146, 119, 146, 124, +196, 233, 190, 220, 176, 221, 192, 185, 146, 140, 146, 145, 146, 149, 191, 230, +146, 163, 222, 216, 146, 169, 146, 177, 146, 184, 146, 189, 146, 193, 192, 204, +146, 206, 146, 212, 146, 218, 146, 226, 198, 254, 146, 235, 146, 242, 222, 231, +181, 167, 147, 65, 147, 72, 210, 190, 222, 235, 190, 190, 212, 174, 147, 104, +147, 109, 147, 115, 203, 209, 222, 249, 147, 135, 208, 175, 201, 227, 147, 154, +213, 170, 147, 170, 147, 178, 147, 187, 147, 194, 147, 200, 147, 208, 215, 178, +147, 223, 147, 228, 186, 179, 147, 240, 223, 167, 147, 254, 223, 169, 148, 79, +148, 89, 148, 98, 148, 107, 148, 116, 148, 125, 148, 135, 234, 183, 183, 197, +208, 167, 148, 158, 148, 164, 182, 216, 202, 253, 148, 183, 148, 193, 148, 200, +148, 206, 148, 211, 148, 216, 148, 223, 148, 230, 148, 235, 148, 240, 148, 248, +214, 188, 149, 64, 149, 71, 192, 165, 149, 83, 149, 89, 149, 96, 149, 102, +149, 107, 149, 114, 201, 206, 234, 205, 149, 133, 149, 139, 199, 231, 193, 192, +149, 158, 149, 166, 149, 174, 149, 183, 149, 190, 149, 198, 149, 207, 149, 217, +149, 227, 149, 233, 149, 241, 149, 247, 215, 238, 235, 195, 203, 183, 150, 79, +196, 190, 150, 90, 150, 97, 184, 203, 178, 196, 150, 113, 150, 118, 150, 123, +150, 128, 150, 134, 150, 140, 150, 148, 150, 152, 199, 185, 150, 161, 150, 167, +150, 174, 198, 226, 185, 241, 150, 189, 232, 205, 150, 202, 150, 209, 232, 221, +150, 216, 150, 224, 150, 232, 150, 240, 232, 238, 232, 240, 189, 219, 151, 66, +189, 176, 151, 75, 151, 82, 176, 240, 151, 97, 151, 105, 151, 114, 151, 120, +151, 126, 232, 249, 151, 143, 151, 150, 204, 196, 151, 166, 151, 173, 151, 179, +151, 187, 189, 183, 151, 202, 151, 209, 210, 172, 151, 225, 151, 232, 151, 242, +151, 250, 152, 65, 152, 72, 152, 80, 233, 175, 152, 89, 192, 198, 152, 103, +213, 165, 152, 118, 152, 125, 152, 135, 187, 177, 152, 150, 152, 157, 152, 166, +152, 175, 152, 183, 152, 192, 152, 202, 152, 209, 186, 225, 152, 224, 233, 208, +152, 239, 152, 248, 153, 64, 153, 72, 153, 82, 153, 90, 207, 173, 233, 213, +153, 113, 153, 122, 195, 202, 153, 140, 153, 150, 153, 160, 153, 170, 153, 180, +153, 190, 153, 200, 153, 210, 153, 220, 153, 230, 153, 240, 236, 163, 153, 254, +154, 71, 154, 78, 184, 232, 154, 93, 154, 102, 205, 225, 154, 115, 154, 122, +154, 126, 233, 230, 154, 138, 154, 147, 154, 156, 154, 162, 154, 169, 154, 176, +154, 179, 154, 186, 154, 194, 154, 201, 154, 209, 154, 216, 198, 248, 154, 224, +176, 177, 235, 181, 154, 238, 217, 224, 207, 171, 155, 65, 204, 192, 155, 74, +155, 80, 210, 202, 227, 231, 155, 95, 155, 102, 187, 166, 155, 108, 213, 180, +155, 119, 155, 125, 155, 130, 155, 134, 204, 169, 227, 248, 228, 167, 228, 169, +155, 159, 155, 165, 155, 171, 155, 176, 155, 181, 215, 199, 228, 177, 228, 183, +155, 199, 155, 205, 228, 188, 155, 219, 155, 225, 155, 231, 181, 211, 228, 204, +186, 212, 155, 250, 204, 202, 196, 215, 228, 196, 156, 83, 156, 88, 156, 94, +156, 103, 156, 107, 156, 113, 156, 117, 156, 123, 195, 236, 228, 216, 228, 207, +207, 230, 156, 160, 156, 169, 156, 178, 156, 186, 156, 192, 156, 200, 156, 208, +156, 214, 228, 209, 156, 225, 156, 232, 156, 239, 185, 246, 194, 203, 156, 253, +157, 71, 198, 175, 157, 87, 157, 93, 196, 174, 228, 244, 157, 114, 209, 250, +157, 131, 157, 139, 199, 177, 193, 202, 157, 162, 228, 253, 179, 206, 197, 236, +157, 191, 157, 199, 157, 208, 229, 164, 188, 164, 157, 232, 157, 240, 229, 168, +158, 66, 158, 74, 158, 84, 158, 94, 158, 104, 229, 171, 158, 120, 158, 131, +158, 140, 158, 149, 185, 224, 158, 167, 158, 176, 158, 186, 158, 191, 212, 214, +158, 203, 179, 180, 236, 191, 158, 223, 158, 228, 158, 233, 158, 236, 158, 244, +186, 230, 159, 69, 189, 253, 159, 80, 159, 87, 186, 184, 159, 103, 159, 108, +159, 117, 159, 124, 159, 134, 159, 143, 159, 150, 159, 160, 195, 186, 214, 243, +236, 212, 159, 188, 159, 196, 159, 204, 236, 218, 159, 219, 159, 227, 159, 235, +159, 244, 159, 253, 160, 70, 160, 78, 160, 86, 160, 95, 160, 105, 160, 114, +160, 124, 160, 134, 197, 192, 184, 184, 160, 151, 160, 159, 160, 166, 160, 172, +160, 177, 201, 252, 160, 190, 160, 195, 160, 201, 160, 210, 160, 219, 160, 227, +225, 239, 191, 241, 160, 245, 160, 251, 186, 221, 170, 73, 225, 249, 170, 79, +170, 87, 170, 95, 178, 194, 170, 104, 170, 109, 170, 114, 170, 122, 170, 132, +170, 139, 170, 148, 226, 179, 171, 68, 171, 77, 171, 84, 171, 91, 171, 99, +171, 107, 193, 225, 171, 117, 171, 125, 183, 169, 171, 138, 171, 146, 171, 152, +172, 64, 172, 74, 172, 79, 172, 87, 172, 95, 231, 247, 199, 217, 172, 112, +172, 121, 172, 132, 232, 164, 172, 144, 185, 229, 172, 160, 173, 69, 232, 172, +173, 85, 173, 93, 173, 100, 173, 110, 173, 119, 173, 130, 173, 139, 240, 172, +173, 152, 173, 160, 174, 70, 174, 78, 174, 86, 201, 245, 174, 99, 174, 103, +181, 233, 174, 111, 189, 231, 174, 124, 174, 131, 183, 172, 179, 235, 174, 154, +175, 64, 240, 218, 175, 75, 175, 78, 240, 230, 175, 86, 240, 228, 175, 94, +182, 187, 193, 161, 175, 109, 175, 116, 240, 246, 240, 250, 175, 137, 175, 142, +175, 146, 175, 151, 241, 162, 176, 65, 176, 73, 176, 81, 176, 88, 176, 97, +185, 239, 212, 237, 176, 116, 205, 238, 176, 132, 176, 141, 241, 229, 176, 157, +211, 175, 186, 208, 177, 73, 177, 81, 177, 89, 177, 94, 237, 237, 177, 105, +177, 115, 237, 243, 177, 128, 191, 244, 215, 197, 177, 146, 177, 154, 178, 65, +237, 254, 178, 77, 178, 86, 178, 90, 178, 97, 178, 105, 178, 112, 178, 117, +178, 124, 178, 132, 178, 142, 178, 151, 178, 158, 179, 66, 179, 71, 183, 175, +179, 83, 197, 248, 237, 191, 237, 206, 197, 233, 237, 194, 179, 113, 237, 202, +179, 124, 179, 134, 211, 178, 179, 149, 179, 157, 180, 68, 180, 73, 180, 78, +180, 83, 237, 218, 180, 97, 180, 104, 197, 205, 180, 117, 180, 128, 180, 136, +180, 143, 180, 151, 180, 160, 181, 72, 181, 81, 181, 90, 237, 231, 201, 231, +198, 237, 181, 120, 236, 239, 181, 129, 181, 135, 236, 247, 194, 187, 181, 157, +182, 69, 182, 78, 182, 87, 182, 96, 208, 227, 182, 106, 182, 112, 182, 120, +182, 125, 182, 131, 182, 139, 239, 249, 182, 151, 214, 201, 183, 68, 183, 78, +183, 86, 183, 91, 183, 100, 183, 109, 183, 118, 183, 129, 209, 168, 183, 142, +241, 186, 214, 207, 180, 220, 241, 188, 184, 72, 184, 81, 184, 90, 184, 99, +184, 108, 184, 114, 184, 121, 184, 130, 184, 136, 243, 201, 177, 202, 243, 215, +177, 191, 185, 66, 193, 253, 185, 80, 191, 240, 243, 217, 185, 94, 243, 223, +185, 109, 185, 115, 185, 124, 185, 131, 185, 138, 243, 236, 243, 240, 185, 155, +186, 65, 186, 73, 186, 80, 243, 247, 186, 94, 186, 102, 186, 110, 186, 117, +186, 125, 186, 135, 186, 142, 186, 152, 244, 166, 187, 71, 187, 80, 187, 90, +187, 100, 187, 110, 244, 204, 187, 125, 187, 135, 187, 140, 212, 193, 193, 184, +187, 158, 188, 66, 244, 216, 204, 199, 191, 183, 188, 92, 188, 101, 188, 109, +188, 119, 188, 129, 188, 139, 188, 147, 188, 154, 189, 67, 189, 77, 189, 87, +189, 97, 189, 107, 189, 117, 189, 126, 189, 136, 189, 146, 189, 156, 190, 69, +190, 78, 190, 87, 190, 97, 190, 107, 190, 117, 190, 128, 190, 138, 190, 148, +190, 158, 191, 71, 191, 81, 191, 91, 191, 101, 191, 111, 191, 121, 191, 131, +191, 139, 191, 149, 191, 159, 192, 72, 192, 82, 192, 92, 192, 101, 192, 111, +192, 121, 186, 236, 206, 179, 194, 218, 231, 164, 176, 237, 231, 171, 189, 202, +231, 176, 231, 181, 215, 219, 192, 194, 192, 137, 184, 191, 231, 205, 201, 201, +184, 215, 243, 191, 192, 155, 193, 64, 193, 70, 215, 239, 238, 188, 238, 192, +193, 98, 193, 105, 193, 113, 193, 118, 244, 202, 193, 133, 193, 139, 244, 225, +199, 204, 193, 159, 194, 69, 194, 75, 210, 171, 194, 87, 241, 232, 194, 95, +241, 241, 194, 106, 194, 110, 241, 246, 194, 121, 190, 219, 194, 138, 194, 146, +194, 155, 195, 66, 188, 161, 208, 164, 179, 166, 183, 190, 235, 200, 201, 246, +195, 95, 195, 102, 202, 164, 195, 111, 210, 200, 176, 183, 195, 122, 235, 219, +235, 228, 195, 138, 235, 227, 235, 225, 196, 64, 192, 176, 199, 187, 196, 82, +196, 89, 196, 94, 235, 239, 196, 104, 196, 111, 196, 119, 196, 125, 196, 133, +196, 142, 177, 219, 235, 251, 197, 66, 197, 76, 215, 212, 214, 194, 244, 167, +197, 100, 202, 230, 203, 180, 197, 118, 189, 162, 197, 123, 244, 185, 197, 138, +203, 210, 197, 154, 198, 66, 198, 70, 198, 75, 220, 183, 198, 85, 198, 90, +220, 184, 198, 95, 198, 100, 198, 106, 198, 108, 198, 111, 220, 214, 198, 120, +198, 126, 195, 175, 220, 221, 198, 140, 198, 146, 198, 154, 220, 238, 199, 64, +199, 70, 187, 196, 220, 234, 220, 253, 199, 84, 199, 92, 199, 99, 201, 175, +221, 183, 199, 118, 199, 124, 221, 178, 221, 210, 190, 213, 221, 202, 199, 151, +199, 157, 183, 198, 200, 73, 221, 201, 200, 83, 200, 91, 211, 169, 200, 104, +221, 199, 200, 120, 200, 130, 200, 139, 200, 144, 200, 151, 200, 156, 201, 65, +221, 220, 201, 78, 203, 226, 201, 94, 201, 103, 221, 240, 208, 238, 201, 121, +201, 128, 201, 135, 197, 238, 201, 150, 201, 158, 202, 71, 202, 78, 202, 86, +202, 94, 202, 102, 176, 170, 202, 114, 202, 121, 202, 130, 222, 168, 202, 147, +202, 155, 203, 64, 203, 71, 203, 80, 203, 88, 208, 189, 203, 102, 203, 110, +203, 119, 203, 126, 222, 188, 203, 143, 203, 152, 204, 65, 204, 73, 204, 82, +204, 90, 204, 100, 204, 108, 204, 118, 204, 126, 204, 137, 242, 175, 211, 221, +204, 158, 205, 67, 242, 180, 205, 77, 205, 83, 205, 91, 212, 233, 205, 102, +205, 106, 205, 114, 205, 118, 205, 123, 205, 129, 205, 137, 242, 211, 182, 234, +242, 218, 209, 209, 195, 219, 206, 70, 206, 78, 206, 85, 206, 92, 208, 171, +206, 105, 206, 113, 206, 120, 181, 251, 206, 133, 206, 139, 206, 146, 206, 155, +242, 253, 207, 72, 207, 79, 243, 161, 207, 94, 207, 101, 207, 109, 243, 181, +207, 126, 207, 135, 207, 143, 243, 182, 207, 159, 208, 70, 208, 79, 208, 87, +208, 94, 208, 102, 208, 109, 208, 114, 203, 165, 208, 126, 176, 192, 208, 137, +208, 145, 241, 200, 209, 64, 209, 72, 209, 80, 209, 85, 210, 225, 209, 99, +241, 212, 209, 111, 241, 211, 209, 124, 186, 214, 241, 210, 209, 147, 209, 154, +210, 64, 210, 73, 210, 82, 210, 92, 210, 100, 210, 109, 210, 119, 210, 129, +210, 135, 210, 145, 210, 155, 211, 68, 211, 78, 211, 88, 185, 230, 234, 236, +211, 101, 211, 108, 211, 114, 211, 122, 209, 212, 211, 141, 211, 151, 212, 64, +212, 74, 212, 84, 212, 94, 212, 103, 212, 112, 212, 122, 212, 133, 212, 143, +212, 153, 213, 65, 213, 73, 213, 82, 213, 92, 213, 102, 213, 112, 213, 122, +213, 133, 213, 143, 213, 153, 214, 66, 214, 76, 214, 86, 214, 96, 214, 105, +214, 115, 214, 125, 214, 135, 214, 145, 214, 155, 215, 68, 215, 78, 215, 88, +215, 97, 215, 106, 215, 116, 215, 126, 215, 137, 215, 147, 200, 207, 210, 233, +208, 237, 218, 172, 214, 223, 218, 180, 218, 185, 215, 158, 203, 181, 191, 206, +204, 184, 218, 203, 195, 213, 199, 171, 192, 190, 216, 66, 216, 75, 216, 81, +216, 90, 187, 191, 216, 105, 216, 114, 216, 121, 245, 246, 245, 249, 216, 145, +216, 155, 217, 68, 217, 78, 217, 88, 217, 98, 217, 108, 217, 118, 217, 129, +217, 139, 217, 149, 217, 159, 218, 72, 218, 79, 204, 176, 204, 249, 188, 214, +234, 226, 218, 81, 216, 211, 201, 226, 215, 223, 218, 95, 244, 242, 218, 110, +218, 118, 218, 128, 218, 137, 218, 143, 218, 148, 218, 155, 218, 160, 245, 200, +191, 231, 219, 79, 219, 82, 219, 90, 219, 96, 219, 105, 219, 110, 245, 218, +219, 123, 245, 229, 219, 132, 219, 140, 219, 149, 219, 157, 245, 237, 220, 72, +220, 78, 220, 86, 245, 242, 220, 103, 220, 110, 204, 201, 220, 129, 234, 166, +220, 148, 220, 158, 221, 71, 221, 81, 221, 91, 221, 101, 221, 111, 221, 121, +221, 132, 221, 142, 221, 152, 222, 65, 222, 75, 222, 85, 222, 95, 194, 214, +233, 244, 233, 251, 222, 99, 207, 189, 222, 102, 222, 109, 222, 116, 180, 239, +194, 245, 222, 134, 212, 182, 229, 200, 202, 246, 222, 149, 229, 204, 222, 157, +222, 160, 183, 234, 223, 74, 229, 212, 223, 85, 223, 91, 223, 95, 223, 102, +229, 219, 223, 116, 223, 124, 223, 130, 223, 138, 223, 143, 223, 148, 211, 202, +219, 161, 224, 64, 224, 70, 224, 75, 224, 81, 224, 86, 179, 187, 219, 177, +224, 107, 224, 117, 224, 126, 224, 134, 224, 143, 224, 151, 224, 160, 244, 252, +225, 72, 245, 161, 179, 234, 195, 184, 225, 87, 225, 94, 225, 98, 225, 106, +225, 114, 225, 120, 225, 128, 225, 138, 225, 141, 225, 150, 225, 159, 226, 72, +226, 82, 226, 92, 226, 102, 226, 112, 226, 122, 226, 133, 226, 143, 226, 153, +227, 66, 227, 76, 227, 86, 227, 96, 227, 106, 227, 115, 227, 125, 246, 198, +227, 145, 227, 155, 228, 68, 228, 77, 228, 87, 228, 96, 228, 106, 228, 116, +228, 126, 228, 137, 228, 147, 228, 157, 229, 70, 229, 80, 229, 90, 229, 100, +229, 110, 229, 119, 229, 130, 229, 140, 229, 150, 246, 202, 230, 72, 230, 82, +230, 92, 230, 101, 230, 111, 230, 121, 230, 132, 230, 142, 230, 152, 231, 64, +231, 73, 231, 83, 231, 93, 231, 103, 231, 113, 231, 123, 231, 134, 231, 144, +231, 154, 232, 67, 232, 77, 232, 86, 232, 96, 232, 106, 232, 116, 232, 125, +232, 136, 232, 146, 238, 201, 232, 150, 196, 198, 238, 214, 238, 220, 188, 216, +238, 230, 238, 239, 205, 173, 232, 157, 189, 194, 198, 204, 179, 250, 239, 180, +239, 187, 239, 192, 239, 196, 239, 200, 182, 198, 196, 247, 239, 217, 239, 223, +239, 232, 239, 239, 233, 81, 233, 90, 233, 100, 233, 110, 233, 120, 233, 131, +233, 141, 233, 151, 234, 64, 234, 74, 234, 84, 201, 193, 188, 228, 227, 204, +227, 208, 227, 214, 184, 183, 234, 103, 234, 111, 234, 115, 184, 189, 234, 120, +234, 128, 212, 186, 218, 238, 204, 213, 234, 153, 234, 160, 184, 244, 235, 74, +235, 83, 235, 92, 246, 192, 188, 175, 235, 105, 235, 113, 235, 122, 235, 130, +235, 136, 235, 142, 235, 147, 193, 216, 235, 160, 246, 175, 236, 79, 246, 178, +236, 96, 199, 224, 236, 111, 236, 116, 236, 125, 236, 133, 236, 142, 236, 149, +199, 202, 237, 67, 237, 75, 237, 81, 237, 91, 237, 101, 237, 111, 237, 121, +237, 130, 237, 135, 237, 142, 237, 152, 238, 65, 238, 75, 238, 85, 238, 95, +238, 105, 238, 115, 238, 125, 238, 136, 238, 146, 238, 156, 239, 69, 185, 203, +190, 177, 239, 72, 209, 213, 242, 173, 239, 84, 239, 94, 239, 104, 183, 231, +198, 174, 239, 124, 239, 133, 239, 143, 239, 153, 240, 66, 240, 74, 240, 84, +240, 94, 240, 103, 240, 113, 240, 123, 240, 134, 240, 142, 240, 151, 210, 251, +240, 154, 240, 158, 241, 64, 202, 215, 241, 72, 241, 80, 241, 90, 241, 100, +241, 110, 241, 120, 241, 131, 241, 141, 241, 151, 242, 64, 242, 74, 242, 84, +242, 94, 242, 104, 242, 114, 242, 124, 242, 135, 242, 145, 242, 155, 243, 68, +243, 78, 243, 82, 205, 213, 194, 230, 230, 235, 201, 167, 214, 232, 243, 96, +186, 161, 247, 196, 247, 198, 243, 121, 243, 130, 243, 138, 243, 145, 243, 153, +247, 220, 244, 73, 244, 82, 244, 90, 244, 99, 244, 108, 198, 199, 244, 117, +244, 124, 244, 135, 244, 145, 244, 155, 245, 68, 245, 78, 245, 88, 245, 98, +245, 108, 245, 118, 245, 129, 245, 139, 245, 149, 245, 159, 246, 72, 246, 82, +246, 92, 246, 102, 246, 112, 246, 122, 246, 133, 246, 143, 246, 153, 247, 66, +247, 76, 247, 86, 247, 96, 247, 106, 247, 116, 247, 126, 247, 133, 246, 215, +247, 141, 246, 227, 247, 145, 246, 243, 247, 150, 246, 253, 247, 167, 193, 219, +248, 69, 248, 79, 248, 89, 248, 99, 248, 109, 248, 119, 248, 130, 248, 140, +248, 150, 248, 160, 249, 73, 249, 83, 249, 93, 249, 103, 249, 113, 249, 123, +249, 134, 249, 144, 249, 154, 250, 67, 250, 77, 250, 87, 250, 97, 250, 107, +250, 117, 250, 128, 250, 138, 250, 148, 250, 158, 251, 71, 251, 81, 251, 91, +240, 177, 240, 182, 251, 98, 240, 193, 251, 101, 240, 203, 186, 215, 251, 113, +251, 120, 247, 228, 251, 135, 251, 143, 251, 151, 251, 160, 244, 240, 247, 226, +252, 87, 252, 92, 247, 237, 252, 103, 252, 109, 252, 118, 252, 125, 182, 166, +252, 140, 247, 247, 247, 248, 253, 68, 253, 73, 253, 82, 253, 90, 253, 100, +253, 110, 253, 120, 253, 131, 246, 182, 253, 139, 185, 168, 253, 154, 170, 161, +170, 171, 170, 181, 170, 191, 170, 201, 170, 211, 170, 221, 170, 231, 170, 241, +170, 251, 171, 167, 171, 177, 171, 187, 171, 197, 171, 207, 171, 217, 171, 227, +171, 237, 171, 247, 172, 163, 172, 173, 172, 183, 172, 193, 172, 203, 172, 213, +172, 223, 172, 233, 172, 243, 172, 253, 173, 169, 173, 179, 173, 189, 173, 199, +173, 209, 173, 219, 173, 229, 173, 239, 173, 249, 174, 165, 174, 175, 174, 185, +174, 195, 174, 205, 174, 215, 174, 225, 174, 235, 174, 245, 175, 161, 175, 171, +175, 181, 175, 191, 175, 201, 175, 211, 175, 221, 175, 231, 175, 241, 175, 251, +248, 167, 248, 177, 248, 187, 248, 197, 248, 207, 248, 217, 248, 227, 248, 237, +248, 247, 249, 163, 249, 173, 249, 183, 249, 193, 249, 203, 249, 213, 249, 223, +249, 233, 249, 243, 249, 253, 250, 169, 250, 179, 250, 189, 250, 199, 250, 209, +250, 219, 250, 229, 250, 239, 250, 249, 251, 165, 251, 175, 251, 185, 251, 195, +251, 205, 251, 215, 251, 225, 251, 235, 251, 245, 252, 161, 252, 171, 252, 181, +252, 191, 252, 201, 252, 211, 252, 221, 252, 231, 252, 241, 252, 251, 253, 167, +253, 177, 253, 187, 253, 197, 253, 207, 253, 217, 253, 227, 253, 237, 253, 247, +254, 163, 254, 173, 254, 183, 254, 193, 254, 203, 254, 213, 254, 223, 254, 233, +254, 243, 254, 253, 161, 72, 161, 82, 161, 92, 161, 102, 161, 112, 161, 122, +161, 133, 161, 143, 161, 153, 162, 66, 162, 76, 162, 86, 162, 96, 162, 106, +162, 116, 162, 126, 162, 137, 162, 147, 162, 157, 162, 227, 163, 68, 163, 78, +163, 88, 163, 98, 163, 108, 163, 118, 163, 129, 163, 139, 163, 149, 163, 159, +164, 72, 164, 82, 164, 92, 164, 102, 164, 112, 164, 122, 164, 133, 164, 143, +164, 153, 164, 246, 165, 65, 165, 75, 165, 85, 165, 95, 165, 105, 165, 115, +165, 125, 165, 136, 165, 146, 165, 156, 165, 252, 166, 71, 166, 81, 166, 91, +166, 101, 166, 111, 166, 121, 166, 132, 166, 142, 166, 152, 166, 186, 166, 220, +166, 249, 167, 68, 167, 78, 167, 88, 167, 98, 167, 108, 167, 118, 167, 129, +167, 139, 167, 149, 167, 159, 167, 202, 167, 245, 168, 150, 168, 160, 168, 237, +168, 247, 169, 93, 169, 144, 169, 155, 169, 241, 169, 251, 254, 81, 254, 91, +254, 101, 254, 111, 254, 121, 254, 132, 254, 142, 254, 152, 253, 156, 253, 157, +253, 158, 253, 159, 253, 160, 254, 64, 254, 71, 254, 75, 169, 85, 166, 227, +166, 235, 169, 109, 169, 118, 169, 129, 163, 161, 163, 171, 163, 181, 163, 191, +163, 201, 163, 211, 163, 221, 163, 231, 163, 241, 163, 251, 161, 233, 0 }); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_GBK_Android.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_GBK_Android.java new file mode 100644 index 0000000..0e80bd0 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_GBK_Android.java @@ -0,0 +1,527 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.GBK.class) + +public class Charset_MultiByte_GBK_Android extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "GBK"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +164, 167, 168, 176, 177, 183, 215, 224, 225, 232, 233, 234, 236, 237, 242, 243, +247, 249, 250, 252, 257, 275, 299, 324, 363, 462, 472, 593, 609, 711, 729, 913, +923, 933, 945, 955, 965, 1025, 1040, 1050, 1060, 1070, 1080, 1090, 1100, 8208, 8220, 8230, +8240, 8251, 8451, 8470, 8481, 8544, 8554, 8564, 8592, 8712, 8725, 8735, 8745, 8756, 8776, 8786, +8800, 8814, 8857, 8869, 8895, 8978, 9312, 9332, 9342, 9352, 9362, 9472, 9482, 9492, 9502, 9512, +9522, 9532, 9542, 9552, 9562, 9572, 9582, 9601, 9611, 9621, 9632, 9650, 9660, 9670, 9698, 9733, +9792, 12288, 12298, 12308, 12318, 12328, 12353, 12363, 12373, 12383, 12393, 12403, 12413, 12423, 12433, 12443, +12453, 12463, 12473, 12483, 12493, 12503, 12513, 12523, 12533, 12549, 12559, 12569, 12579, 12832, 12849, 12963, +13198, 13212, 13252, 13262, 19968, 19978, 19988, 19998, 20008, 20018, 20028, 20038, 20048, 20058, 20068, 20078, +20088, 20098, 20108, 20118, 20128, 20138, 20148, 20158, 20168, 20178, 20188, 20198, 20208, 20218, 20228, 20238, +20248, 20258, 20268, 20278, 20288, 20298, 20308, 20318, 20328, 20338, 20348, 20358, 20368, 20378, 20388, 20398, +20408, 20418, 20428, 20438, 20448, 20458, 20468, 20478, 20488, 20498, 20508, 20518, 20528, 20538, 20548, 20558, +20568, 20578, 20588, 20598, 20608, 20618, 20628, 20638, 20648, 20658, 20668, 20678, 20688, 20698, 20708, 20718, +20728, 20738, 20748, 20758, 20768, 20778, 20788, 20798, 20808, 20818, 20828, 20838, 20848, 20858, 20868, 20878, +20888, 20898, 20908, 20918, 20928, 20938, 20948, 20958, 20968, 20978, 20988, 20998, 21008, 21018, 21028, 21038, +21048, 21058, 21068, 21078, 21088, 21098, 21108, 21118, 21128, 21138, 21148, 21158, 21168, 21178, 21188, 21198, +21208, 21218, 21228, 21238, 21248, 21258, 21268, 21278, 21288, 21298, 21308, 21318, 21328, 21338, 21348, 21358, +21368, 21378, 21388, 21398, 21408, 21418, 21428, 21438, 21448, 21458, 21468, 21478, 21488, 21498, 21508, 21518, +21528, 21538, 21548, 21558, 21568, 21578, 21588, 21598, 21608, 21618, 21628, 21638, 21648, 21658, 21668, 21678, +21688, 21698, 21708, 21718, 21728, 21738, 21748, 21758, 21768, 21778, 21788, 21798, 21808, 21818, 21828, 21838, +21848, 21858, 21868, 21878, 21888, 21898, 21908, 21918, 21928, 21938, 21948, 21958, 21968, 21978, 21988, 21998, +22008, 22018, 22028, 22038, 22048, 22058, 22068, 22078, 22088, 22098, 22108, 22118, 22128, 22138, 22148, 22158, +22168, 22178, 22188, 22198, 22208, 22218, 22228, 22238, 22248, 22258, 22268, 22278, 22288, 22298, 22308, 22318, +22328, 22338, 22348, 22358, 22368, 22378, 22388, 22398, 22408, 22418, 22428, 22438, 22448, 22458, 22468, 22478, +22488, 22498, 22508, 22518, 22528, 22538, 22548, 22558, 22568, 22578, 22588, 22598, 22608, 22618, 22628, 22638, +22648, 22658, 22668, 22678, 22688, 22698, 22708, 22718, 22728, 22738, 22748, 22758, 22768, 22778, 22788, 22798, +22808, 22818, 22828, 22838, 22848, 22858, 22868, 22878, 22888, 22898, 22908, 22918, 22928, 22938, 22948, 22958, +22968, 22978, 22988, 22998, 23008, 23018, 23028, 23038, 23048, 23058, 23068, 23078, 23088, 23098, 23108, 23118, +23128, 23138, 23148, 23158, 23168, 23178, 23188, 23198, 23208, 23218, 23228, 23238, 23248, 23258, 23268, 23278, +23288, 23298, 23308, 23318, 23328, 23338, 23348, 23358, 23368, 23378, 23388, 23398, 23408, 23418, 23428, 23438, +23448, 23458, 23468, 23478, 23488, 23498, 23508, 23518, 23528, 23538, 23548, 23558, 23568, 23578, 23588, 23598, +23608, 23618, 23628, 23638, 23648, 23658, 23668, 23678, 23688, 23698, 23708, 23718, 23728, 23738, 23748, 23758, +23768, 23778, 23788, 23798, 23808, 23818, 23828, 23838, 23848, 23858, 23868, 23878, 23888, 23898, 23908, 23918, +23928, 23938, 23948, 23958, 23968, 23978, 23988, 23998, 24008, 24018, 24028, 24038, 24048, 24058, 24068, 24078, +24088, 24098, 24108, 24118, 24128, 24138, 24148, 24158, 24168, 24178, 24188, 24198, 24208, 24218, 24228, 24238, +24248, 24258, 24268, 24278, 24288, 24298, 24308, 24318, 24328, 24338, 24348, 24358, 24368, 24378, 24388, 24398, +24408, 24418, 24428, 24438, 24448, 24458, 24468, 24478, 24488, 24498, 24508, 24518, 24528, 24538, 24548, 24558, +24568, 24578, 24588, 24598, 24608, 24618, 24628, 24638, 24648, 24658, 24668, 24678, 24688, 24698, 24708, 24718, +24728, 24738, 24748, 24758, 24768, 24778, 24788, 24798, 24808, 24818, 24828, 24838, 24848, 24858, 24868, 24878, +24888, 24898, 24908, 24918, 24928, 24938, 24948, 24958, 24968, 24978, 24988, 24998, 25008, 25018, 25028, 25038, +25048, 25058, 25068, 25078, 25088, 25098, 25108, 25118, 25128, 25138, 25148, 25158, 25168, 25178, 25188, 25198, +25208, 25218, 25228, 25238, 25248, 25258, 25268, 25278, 25288, 25298, 25308, 25318, 25328, 25338, 25348, 25358, +25368, 25378, 25388, 25398, 25408, 25418, 25428, 25438, 25448, 25458, 25468, 25478, 25488, 25498, 25508, 25518, +25528, 25538, 25548, 25558, 25568, 25578, 25588, 25598, 25608, 25618, 25628, 25638, 25648, 25658, 25668, 25678, +25688, 25698, 25708, 25718, 25728, 25738, 25748, 25758, 25768, 25778, 25788, 25798, 25808, 25818, 25828, 25838, +25848, 25858, 25868, 25878, 25888, 25898, 25908, 25918, 25928, 25938, 25948, 25958, 25968, 25978, 25988, 25998, +26008, 26018, 26028, 26038, 26048, 26058, 26068, 26078, 26088, 26098, 26108, 26118, 26128, 26138, 26148, 26158, +26168, 26178, 26188, 26198, 26208, 26218, 26228, 26238, 26248, 26258, 26268, 26278, 26288, 26298, 26308, 26318, +26328, 26338, 26348, 26358, 26368, 26378, 26388, 26398, 26408, 26418, 26428, 26438, 26448, 26458, 26468, 26478, +26488, 26498, 26508, 26518, 26528, 26538, 26548, 26558, 26568, 26578, 26588, 26598, 26608, 26618, 26628, 26638, +26648, 26658, 26668, 26678, 26688, 26698, 26708, 26718, 26728, 26738, 26748, 26758, 26768, 26778, 26788, 26798, +26808, 26818, 26828, 26838, 26848, 26858, 26868, 26878, 26888, 26898, 26908, 26918, 26928, 26938, 26948, 26958, +26968, 26978, 26988, 26998, 27008, 27018, 27028, 27038, 27048, 27058, 27068, 27078, 27088, 27098, 27108, 27118, +27128, 27138, 27148, 27158, 27168, 27178, 27188, 27198, 27208, 27218, 27228, 27238, 27248, 27258, 27268, 27278, +27288, 27298, 27308, 27318, 27328, 27338, 27348, 27358, 27368, 27378, 27388, 27398, 27408, 27418, 27428, 27438, +27448, 27458, 27468, 27478, 27488, 27498, 27508, 27518, 27528, 27538, 27548, 27558, 27568, 27578, 27588, 27598, +27608, 27618, 27628, 27638, 27648, 27658, 27668, 27678, 27688, 27698, 27708, 27718, 27728, 27738, 27748, 27758, +27768, 27778, 27788, 27798, 27808, 27818, 27828, 27838, 27848, 27858, 27868, 27878, 27888, 27898, 27908, 27918, +27928, 27938, 27948, 27958, 27968, 27978, 27988, 27998, 28008, 28018, 28028, 28038, 28048, 28058, 28068, 28078, +28088, 28098, 28108, 28118, 28128, 28138, 28148, 28158, 28168, 28178, 28188, 28198, 28208, 28218, 28228, 28238, +28248, 28258, 28268, 28278, 28288, 28298, 28308, 28318, 28328, 28338, 28348, 28358, 28368, 28378, 28388, 28398, +28408, 28418, 28428, 28438, 28448, 28458, 28468, 28478, 28488, 28498, 28508, 28518, 28528, 28538, 28548, 28558, +28568, 28578, 28588, 28598, 28608, 28618, 28628, 28638, 28648, 28658, 28668, 28678, 28688, 28698, 28708, 28718, +28728, 28738, 28748, 28758, 28768, 28778, 28788, 28798, 28808, 28818, 28828, 28838, 28848, 28858, 28868, 28878, +28888, 28898, 28908, 28918, 28928, 28938, 28948, 28958, 28968, 28978, 28988, 28998, 29008, 29018, 29028, 29038, +29048, 29058, 29068, 29078, 29088, 29098, 29108, 29118, 29128, 29138, 29148, 29158, 29168, 29178, 29188, 29198, +29208, 29218, 29228, 29238, 29248, 29258, 29268, 29278, 29288, 29298, 29308, 29318, 29328, 29338, 29348, 29358, +29368, 29378, 29388, 29398, 29408, 29418, 29428, 29438, 29448, 29458, 29468, 29478, 29488, 29498, 29508, 29518, +29528, 29538, 29548, 29558, 29568, 29578, 29588, 29598, 29608, 29618, 29628, 29638, 29648, 29658, 29668, 29678, +29688, 29698, 29708, 29718, 29728, 29738, 29748, 29758, 29768, 29778, 29788, 29798, 29808, 29818, 29828, 29838, +29848, 29858, 29868, 29878, 29888, 29898, 29908, 29918, 29928, 29938, 29948, 29958, 29968, 29978, 29988, 29998, +30008, 30018, 30028, 30038, 30048, 30058, 30068, 30078, 30088, 30098, 30108, 30118, 30128, 30138, 30148, 30158, +30168, 30178, 30188, 30198, 30208, 30218, 30228, 30238, 30248, 30258, 30268, 30278, 30288, 30298, 30308, 30318, +30328, 30338, 30348, 30358, 30368, 30378, 30388, 30398, 30408, 30418, 30428, 30438, 30448, 30458, 30468, 30478, +30488, 30498, 30508, 30518, 30528, 30538, 30548, 30558, 30568, 30578, 30588, 30598, 30608, 30618, 30628, 30638, +30648, 30658, 30668, 30678, 30688, 30698, 30708, 30718, 30728, 30738, 30748, 30758, 30768, 30778, 30788, 30798, +30808, 30818, 30828, 30838, 30848, 30858, 30868, 30878, 30888, 30898, 30908, 30918, 30928, 30938, 30948, 30958, +30968, 30978, 30988, 30998, 31008, 31018, 31028, 31038, 31048, 31058, 31068, 31078, 31088, 31098, 31108, 31118, +31128, 31138, 31148, 31158, 31168, 31178, 31188, 31198, 31208, 31218, 31228, 31238, 31248, 31258, 31268, 31278, +31288, 31298, 31308, 31318, 31328, 31338, 31348, 31358, 31368, 31378, 31388, 31398, 31408, 31418, 31428, 31438, +31448, 31458, 31468, 31478, 31488, 31498, 31508, 31518, 31528, 31538, 31548, 31558, 31568, 31578, 31588, 31598, +31608, 31618, 31628, 31638, 31648, 31658, 31668, 31678, 31688, 31698, 31708, 31718, 31728, 31738, 31748, 31758, +31768, 31778, 31788, 31798, 31808, 31818, 31828, 31838, 31848, 31858, 31868, 31878, 31888, 31898, 31908, 31918, +31928, 31938, 31948, 31958, 31968, 31978, 31988, 31998, 32008, 32018, 32028, 32038, 32048, 32058, 32068, 32078, +32088, 32098, 32108, 32118, 32128, 32138, 32148, 32158, 32168, 32178, 32188, 32198, 32208, 32218, 32228, 32238, +32248, 32258, 32268, 32278, 32288, 32298, 32308, 32318, 32328, 32338, 32348, 32358, 32368, 32378, 32388, 32398, +32408, 32418, 32428, 32438, 32448, 32458, 32468, 32478, 32488, 32498, 32508, 32518, 32528, 32538, 32548, 32558, +32568, 32578, 32588, 32598, 32608, 32618, 32628, 32638, 32648, 32658, 32668, 32678, 32688, 32698, 32708, 32718, +32728, 32738, 32748, 32758, 32768, 32778, 32788, 32798, 32808, 32818, 32828, 32838, 32848, 32858, 32868, 32878, +32888, 32898, 32908, 32918, 32928, 32938, 32948, 32958, 32968, 32978, 32988, 32998, 33008, 33018, 33028, 33038, +33048, 33058, 33068, 33078, 33088, 33098, 33108, 33118, 33128, 33138, 33148, 33158, 33168, 33178, 33188, 33198, +33208, 33218, 33228, 33238, 33248, 33258, 33268, 33278, 33288, 33298, 33308, 33318, 33328, 33338, 33348, 33358, +33368, 33378, 33388, 33398, 33408, 33418, 33428, 33438, 33448, 33458, 33468, 33478, 33488, 33498, 33508, 33518, +33528, 33538, 33548, 33558, 33568, 33578, 33588, 33598, 33608, 33618, 33628, 33638, 33648, 33658, 33668, 33678, +33688, 33698, 33708, 33718, 33728, 33738, 33748, 33758, 33768, 33778, 33788, 33798, 33808, 33818, 33828, 33838, +33848, 33858, 33868, 33878, 33888, 33898, 33908, 33918, 33928, 33938, 33948, 33958, 33968, 33978, 33988, 33998, +34008, 34018, 34028, 34038, 34048, 34058, 34068, 34078, 34088, 34098, 34108, 34118, 34128, 34138, 34148, 34158, +34168, 34178, 34188, 34198, 34208, 34218, 34228, 34238, 34248, 34258, 34268, 34278, 34288, 34298, 34308, 34318, +34328, 34338, 34348, 34358, 34368, 34378, 34388, 34398, 34408, 34418, 34428, 34438, 34448, 34458, 34468, 34478, +34488, 34498, 34508, 34518, 34528, 34538, 34548, 34558, 34568, 34578, 34588, 34598, 34608, 34618, 34628, 34638, +34648, 34658, 34668, 34678, 34688, 34698, 34708, 34718, 34728, 34738, 34748, 34758, 34768, 34778, 34788, 34798, +34808, 34818, 34828, 34838, 34848, 34858, 34868, 34878, 34888, 34898, 34908, 34918, 34928, 34938, 34948, 34958, +34968, 34978, 34988, 34998, 35008, 35018, 35028, 35038, 35048, 35058, 35068, 35078, 35088, 35098, 35108, 35118, +35128, 35138, 35148, 35158, 35168, 35178, 35188, 35198, 35208, 35218, 35228, 35238, 35248, 35258, 35268, 35278, +35288, 35298, 35308, 35318, 35328, 35338, 35348, 35358, 35368, 35378, 35388, 35398, 35408, 35418, 35428, 35438, +35448, 35458, 35468, 35478, 35488, 35498, 35508, 35518, 35528, 35538, 35548, 35558, 35568, 35578, 35588, 35598, +35608, 35618, 35628, 35638, 35648, 35658, 35668, 35678, 35688, 35698, 35708, 35718, 35728, 35738, 35748, 35758, +35768, 35778, 35788, 35798, 35808, 35818, 35828, 35838, 35848, 35858, 35868, 35878, 35888, 35898, 35908, 35918, +35928, 35938, 35948, 35958, 35968, 35978, 35988, 35998, 36008, 36018, 36028, 36038, 36048, 36058, 36068, 36078, +36088, 36098, 36108, 36118, 36128, 36138, 36148, 36158, 36168, 36178, 36188, 36198, 36208, 36218, 36228, 36238, +36248, 36258, 36268, 36278, 36288, 36298, 36308, 36318, 36328, 36338, 36348, 36358, 36368, 36378, 36388, 36398, +36408, 36418, 36428, 36438, 36448, 36458, 36468, 36478, 36488, 36498, 36508, 36518, 36528, 36538, 36548, 36558, +36568, 36578, 36588, 36598, 36608, 36618, 36628, 36638, 36648, 36658, 36668, 36678, 36688, 36698, 36708, 36718, +36728, 36738, 36748, 36758, 36768, 36778, 36788, 36798, 36808, 36818, 36828, 36838, 36848, 36858, 36868, 36878, +36888, 36898, 36908, 36918, 36928, 36938, 36948, 36958, 36968, 36978, 36988, 36998, 37008, 37018, 37028, 37038, +37048, 37058, 37068, 37078, 37088, 37098, 37108, 37118, 37128, 37138, 37148, 37158, 37168, 37178, 37188, 37198, +37208, 37218, 37228, 37238, 37248, 37258, 37268, 37278, 37288, 37298, 37308, 37318, 37328, 37338, 37348, 37358, +37368, 37378, 37388, 37398, 37408, 37418, 37428, 37438, 37448, 37458, 37468, 37478, 37488, 37498, 37508, 37518, +37528, 37538, 37548, 37558, 37568, 37578, 37588, 37598, 37608, 37618, 37628, 37638, 37648, 37658, 37668, 37678, +37688, 37698, 37708, 37718, 37728, 37738, 37748, 37758, 37768, 37778, 37788, 37798, 37808, 37818, 37828, 37838, +37848, 37858, 37868, 37878, 37888, 37898, 37908, 37918, 37928, 37938, 37948, 37958, 37968, 37978, 37988, 37998, +38008, 38018, 38028, 38038, 38048, 38058, 38068, 38078, 38088, 38098, 38108, 38118, 38128, 38138, 38148, 38158, +38168, 38178, 38188, 38198, 38208, 38218, 38228, 38238, 38248, 38258, 38268, 38278, 38288, 38298, 38308, 38318, +38328, 38338, 38348, 38358, 38368, 38378, 38388, 38398, 38408, 38418, 38428, 38438, 38448, 38458, 38468, 38478, +38488, 38498, 38508, 38518, 38528, 38538, 38548, 38558, 38568, 38578, 38588, 38598, 38608, 38618, 38628, 38638, +38648, 38658, 38668, 38678, 38688, 38698, 38708, 38718, 38728, 38738, 38748, 38758, 38768, 38778, 38788, 38798, +38808, 38818, 38828, 38838, 38848, 38858, 38868, 38878, 38888, 38898, 38908, 38918, 38928, 38938, 38948, 38958, +38968, 38978, 38988, 38998, 39008, 39018, 39028, 39038, 39048, 39058, 39068, 39078, 39088, 39098, 39108, 39118, +39128, 39138, 39148, 39158, 39168, 39178, 39188, 39198, 39208, 39218, 39228, 39238, 39248, 39258, 39268, 39278, +39288, 39298, 39308, 39318, 39328, 39338, 39348, 39358, 39368, 39378, 39388, 39398, 39408, 39418, 39428, 39438, +39448, 39458, 39468, 39478, 39488, 39498, 39508, 39518, 39528, 39538, 39548, 39558, 39568, 39578, 39588, 39598, +39608, 39618, 39628, 39638, 39648, 39658, 39668, 39678, 39688, 39698, 39708, 39718, 39728, 39738, 39748, 39758, +39768, 39778, 39788, 39798, 39808, 39818, 39828, 39838, 39848, 39858, 39868, 39878, 39888, 39898, 39908, 39918, +39928, 39938, 39948, 39958, 39968, 39978, 39988, 39998, 40008, 40018, 40028, 40038, 40048, 40058, 40068, 40078, +40088, 40098, 40108, 40118, 40128, 40138, 40148, 40158, 40168, 40178, 40188, 40198, 40208, 40218, 40228, 40238, +40248, 40258, 40268, 40278, 40288, 40298, 40308, 40318, 40328, 40338, 40348, 40358, 40368, 40378, 40388, 40398, +40408, 40418, 40428, 40438, 40448, 40458, 40468, 40478, 40488, 40498, 40508, 40518, 40528, 40538, 40548, 40558, +40568, 40578, 40588, 40598, 40608, 40618, 40628, 40638, 40648, 40658, 40668, 40678, 40688, 40698, 40708, 40718, +40728, 40738, 40748, 40758, 40768, 40778, 40788, 40798, 40808, 40818, 40828, 40838, 40848, 40858, 40868, 57344, +57354, 57364, 57374, 57384, 57394, 57404, 57414, 57424, 57434, 57444, 57454, 57464, 57474, 57484, 57494, 57504, +57514, 57524, 57534, 57544, 57554, 57564, 57574, 57584, 57594, 57604, 57614, 57624, 57634, 57644, 57654, 57664, +57674, 57684, 57694, 57704, 57714, 57724, 57734, 57744, 57754, 57764, 57774, 57784, 57794, 57804, 57814, 57824, +57834, 57844, 57854, 57864, 57874, 57884, 57894, 57904, 57914, 57924, 57934, 57944, 57954, 57964, 57974, 57984, +57994, 58004, 58014, 58024, 58034, 58044, 58054, 58064, 58074, 58084, 58094, 58104, 58114, 58124, 58134, 58144, +58154, 58164, 58174, 58184, 58194, 58204, 58214, 58224, 58234, 58244, 58254, 58264, 58274, 58284, 58294, 58304, +58314, 58324, 58334, 58344, 58354, 58364, 58374, 58384, 58394, 58404, 58414, 58424, 58434, 58444, 58454, 58464, +58474, 58484, 58494, 58504, 58514, 58524, 58534, 58544, 58554, 58564, 58574, 58584, 58594, 58604, 58614, 58624, +58634, 58644, 58654, 58664, 58674, 58684, 58694, 58704, 58714, 58724, 58734, 58744, 58754, 58764, 58774, 58784, +58794, 58804, 58814, 58824, 58834, 58844, 58854, 58864, 58874, 58884, 58894, 58904, 58914, 58924, 58934, 58944, +58954, 58964, 58974, 58984, 58994, 59004, 59014, 59024, 59034, 59044, 59054, 59064, 59074, 59084, 59094, 59104, +59114, 59124, 59134, 59144, 59154, 59164, 59174, 59184, 59194, 59204, 59214, 59224, 59234, 59244, 59254, 59264, +59274, 59284, 59294, 59304, 59314, 59324, 59334, 59344, 59354, 59364, 59374, 59384, 59394, 59404, 59414, 59424, +59434, 59444, 59454, 59464, 59474, 59484, 63788, 63865, 63893, 63975, 63985, 64012, 64024, 64035, 65072, 65082, +65092, 65102, 65113, 65123, 65281, 65291, 65301, 65311, 65321, 65331, 65341, 65351, 65361, 65371, 65504, 65536 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +161, 232, 161, 236, 161, 167, 161, 227, 161, 192, 161, 164, 161, 193, 168, 164, +168, 162, 168, 168, 168, 166, 168, 186, 168, 172, 168, 170, 168, 176, 168, 174, +161, 194, 168, 180, 168, 178, 168, 185, 168, 161, 168, 165, 168, 169, 168, 189, +168, 177, 168, 163, 168, 182, 168, 187, 168, 192, 161, 166, 168, 66, 166, 161, +166, 171, 166, 180, 166, 193, 166, 203, 166, 212, 167, 167, 167, 161, 167, 172, +167, 182, 167, 192, 167, 218, 167, 228, 167, 238, 169, 92, 161, 176, 161, 173, +161, 235, 161, 249, 161, 230, 161, 237, 169, 89, 162, 241, 162, 251, 162, 165, +161, 251, 161, 202, 168, 77, 168, 78, 161, 201, 161, 224, 161, 214, 168, 80, +161, 217, 161, 218, 161, 209, 161, 205, 168, 83, 161, 208, 162, 217, 162, 197, +162, 207, 162, 177, 162, 187, 169, 164, 169, 174, 169, 184, 169, 194, 169, 204, +169, 214, 169, 224, 169, 234, 168, 84, 168, 94, 168, 104, 168, 114, 168, 120, +168, 131, 168, 138, 161, 246, 161, 248, 168, 139, 161, 244, 168, 141, 161, 239, +161, 226, 161, 161, 161, 182, 161, 178, 168, 149, 169, 71, 164, 161, 164, 171, +164, 181, 164, 191, 164, 201, 164, 211, 164, 221, 164, 231, 164, 241, 169, 97, +165, 165, 165, 175, 165, 185, 165, 195, 165, 205, 165, 215, 165, 225, 165, 235, +165, 245, 168, 197, 168, 207, 168, 217, 168, 227, 162, 229, 169, 90, 169, 73, +169, 74, 169, 76, 169, 80, 169, 81, 210, 187, 201, 207, 199, 210, 216, 169, +216, 173, 180, 174, 129, 83, 129, 88, 192, 214, 129, 93, 129, 97, 129, 105, +129, 112, 129, 121, 182, 254, 129, 129, 217, 239, 129, 136, 129, 140, 129, 147, +129, 148, 129, 152, 129, 155, 129, 158, 209, 246, 129, 168, 129, 174, 188, 191, +211, 197, 216, 243, 129, 192, 193, 230, 129, 203, 129, 211, 129, 215, 216, 250, +129, 220, 129, 226, 217, 174, 129, 237, 129, 242, 129, 249, 130, 64, 206, 234, +130, 74, 130, 83, 130, 89, 130, 95, 130, 98, 217, 179, 130, 107, 217, 194, +130, 124, 181, 185, 217, 195, 190, 235, 130, 146, 213, 174, 130, 162, 217, 203, +130, 176, 130, 184, 217, 204, 197, 188, 191, 254, 130, 214, 130, 223, 130, 233, +180, 162, 176, 193, 130, 254, 131, 73, 131, 82, 193, 197, 131, 100, 217, 215, +131, 113, 131, 122, 131, 130, 131, 139, 131, 149, 131, 158, 131, 168, 131, 178, +207, 200, 131, 186, 182, 181, 131, 199, 192, 188, 131, 205, 131, 209, 131, 214, +131, 220, 218, 163, 182, 172, 210, 177, 190, 187, 131, 245, 131, 251, 132, 68, +132, 75, 132, 81, 219, 202, 183, 214, 132, 91, 184, 213, 197, 208, 185, 206, +200, 175, 188, 193, 216, 221, 198, 202, 132, 133, 188, 244, 132, 146, 132, 155, +197, 252, 132, 170, 132, 178, 132, 181, 132, 185, 132, 192, 132, 199, 132, 206, +191, 177, 132, 221, 132, 230, 132, 239, 212, 200, 132, 251, 133, 67, 133, 71, +133, 77, 133, 85, 133, 92, 133, 97, 133, 101, 178, 169, 194, 177, 216, 180, +208, 182, 179, 167, 209, 225, 133, 133, 133, 139, 133, 143, 133, 152, 133, 160, +211, 214, 133, 170, 133, 174, 193, 237, 204, 168, 133, 181, 184, 247, 186, 243, +133, 190, 133, 194, 204, 253, 133, 200, 209, 189, 184, 230, 223, 190, 133, 218, +214, 220, 223, 218, 186, 244, 197, 216, 184, 192, 223, 203, 223, 229, 134, 66, +207, 204, 223, 211, 223, 223, 134, 80, 134, 83, 196, 196, 134, 93, 134, 100, +134, 106, 134, 112, 134, 120, 134, 126, 224, 167, 134, 138, 215, 196, 134, 149, +134, 156, 134, 164, 216, 196, 224, 164, 191, 166, 186, 176, 224, 184, 134, 192, +134, 200, 134, 209, 134, 214, 134, 220, 134, 227, 134, 232, 224, 205, 134, 240, +134, 245, 134, 251, 224, 209, 135, 75, 135, 81, 135, 88, 215, 236, 135, 100, +135, 109, 135, 116, 224, 224, 135, 130, 135, 135, 135, 143, 135, 151, 186, 191, +135, 166, 135, 176, 135, 185, 135, 194, 135, 202, 196, 210, 224, 236, 187, 216, +135, 230, 135, 236, 135, 242, 212, 178, 135, 253, 136, 72, 136, 79, 219, 220, +136, 90, 219, 224, 219, 208, 136, 106, 215, 185, 198, 186, 136, 118, 136, 124, +136, 130, 192, 221, 136, 145, 191, 209, 136, 154, 136, 161, 136, 169, 179, 199, +219, 245, 136, 187, 136, 196, 136, 203, 220, 165, 136, 215, 136, 222, 220, 166, +136, 236, 136, 244, 136, 253, 137, 71, 137, 79, 137, 86, 137, 95, 137, 102, +137, 112, 137, 119, 137, 126, 137, 135, 137, 141, 137, 149, 137, 159, 137, 168, +137, 176, 137, 185, 137, 194, 137, 203, 201, 249, 137, 216, 180, 166, 137, 232, +137, 238, 137, 244, 137, 248, 137, 253, 138, 67, 138, 71, 177, 188, 138, 81, +138, 88, 138, 98, 138, 103, 215, 177, 138, 113, 138, 118, 230, 165, 196, 221, +138, 138, 138, 145, 138, 152, 138, 157, 138, 162, 138, 169, 138, 178, 138, 186, +230, 174, 138, 195, 196, 200, 138, 208, 138, 217, 138, 223, 138, 231, 138, 238, +138, 247, 230, 190, 139, 72, 201, 244, 139, 86, 139, 96, 139, 105, 139, 113, +139, 123, 230, 199, 139, 139, 139, 146, 139, 154, 139, 160, 139, 166, 139, 173, +139, 182, 139, 192, 139, 201, 230, 212, 139, 219, 139, 229, 217, 248, 139, 246, +140, 64, 140, 72, 215, 206, 209, 167, 202, 235, 200, 230, 229, 179, 140, 97, +185, 217, 191, 205, 140, 107, 188, 210, 140, 117, 140, 122, 140, 129, 196, 175, +213, 175, 140, 150, 181, 188, 189, 171, 140, 168, 201, 208, 211, 200, 140, 185, +202, 172, 178, 227, 140, 197, 140, 202, 205, 192, 140, 215, 140, 222, 140, 230, +225, 172, 140, 242, 225, 177, 140, 252, 141, 67, 141, 72, 225, 187, 141, 87, +141, 96, 141, 104, 141, 109, 141, 117, 141, 126, 141, 133, 180, 222, 225, 198, +141, 155, 141, 162, 141, 171, 141, 179, 141, 185, 141, 194, 141, 202, 141, 209, +141, 217, 225, 214, 141, 236, 141, 246, 141, 254, 142, 73, 142, 83, 142, 92, +142, 101, 142, 110, 142, 119, 215, 243, 142, 128, 142, 133, 142, 138, 142, 144, +193, 177, 142, 152, 142, 160, 142, 167, 142, 172, 142, 179, 225, 163, 225, 165, +142, 202, 184, 201, 211, 215, 199, 236, 194, 174, 184, 253, 142, 232, 142, 238, +211, 185, 142, 251, 143, 68, 193, 206, 143, 83, 226, 222, 219, 200, 222, 195, +222, 196, 143, 115, 143, 120, 207, 210, 143, 132, 199, 191, 143, 147, 143, 157, +229, 233, 208, 206, 177, 242, 143, 178, 205, 249, 187, 178, 143, 191, 143, 196, +225, 229, 143, 211, 225, 232, 210, 228, 236, 254, 143, 232, 226, 232, 226, 229, +226, 238, 203, 203, 144, 67, 178, 192, 181, 161, 185, 214, 144, 86, 144, 93, +144, 99, 186, 227, 144, 112, 144, 118, 199, 161, 226, 253, 199, 196, 144, 136, +144, 143, 144, 148, 208, 252, 144, 158, 144, 165, 190, 170, 144, 180, 144, 185, +178, 210, 144, 193, 144, 198, 237, 169, 144, 210, 211, 222, 183, 223, 144, 231, +144, 241, 144, 250, 187, 197, 145, 73, 145, 82, 145, 89, 145, 98, 145, 106, +145, 116, 145, 124, 145, 134, 145, 143, 145, 149, 145, 158, 145, 166, 145, 173, +145, 180, 145, 190, 145, 199, 145, 208, 145, 217, 206, 236, 145, 226, 145, 230, +145, 235, 145, 242, 145, 249, 145, 253, 146, 65, 146, 70, 146, 78, 176, 231, +146, 86, 146, 91, 146, 98, 182, 182, 191, 217, 146, 112, 146, 119, 146, 124, +196, 233, 190, 220, 176, 221, 192, 185, 146, 140, 146, 145, 146, 149, 191, 230, +146, 163, 222, 216, 146, 169, 146, 177, 146, 184, 146, 189, 146, 193, 192, 204, +146, 206, 146, 212, 146, 218, 146, 226, 198, 254, 146, 235, 146, 242, 222, 231, +181, 167, 147, 65, 147, 72, 210, 190, 222, 235, 190, 190, 212, 174, 147, 104, +147, 109, 147, 115, 203, 209, 222, 249, 147, 135, 208, 175, 201, 227, 147, 154, +213, 170, 147, 170, 147, 178, 147, 187, 147, 194, 147, 200, 147, 208, 215, 178, +147, 223, 147, 228, 186, 179, 147, 240, 223, 167, 147, 254, 223, 169, 148, 79, +148, 89, 148, 98, 148, 107, 148, 116, 148, 125, 148, 135, 234, 183, 183, 197, +208, 167, 148, 158, 148, 164, 182, 216, 202, 253, 148, 183, 148, 193, 148, 200, +148, 206, 148, 211, 148, 216, 148, 223, 148, 230, 148, 235, 148, 240, 148, 248, +214, 188, 149, 64, 149, 71, 192, 165, 149, 83, 149, 89, 149, 96, 149, 102, +149, 107, 149, 114, 201, 206, 234, 205, 149, 133, 149, 139, 199, 231, 193, 192, +149, 158, 149, 166, 149, 174, 149, 183, 149, 190, 149, 198, 149, 207, 149, 217, +149, 227, 149, 233, 149, 241, 149, 247, 215, 238, 235, 195, 203, 183, 150, 79, +196, 190, 150, 90, 150, 97, 184, 203, 178, 196, 150, 113, 150, 118, 150, 123, +150, 128, 150, 134, 150, 140, 150, 148, 150, 152, 199, 185, 150, 161, 150, 167, +150, 174, 198, 226, 185, 241, 150, 189, 232, 205, 150, 202, 150, 209, 232, 221, +150, 216, 150, 224, 150, 232, 150, 240, 232, 238, 232, 240, 189, 219, 151, 66, +189, 176, 151, 75, 151, 82, 176, 240, 151, 97, 151, 105, 151, 114, 151, 120, +151, 126, 232, 249, 151, 143, 151, 150, 204, 196, 151, 166, 151, 173, 151, 179, +151, 187, 189, 183, 151, 202, 151, 209, 210, 172, 151, 225, 151, 232, 151, 242, +151, 250, 152, 65, 152, 72, 152, 80, 233, 175, 152, 89, 192, 198, 152, 103, +213, 165, 152, 118, 152, 125, 152, 135, 187, 177, 152, 150, 152, 157, 152, 166, +152, 175, 152, 183, 152, 192, 152, 202, 152, 209, 186, 225, 152, 224, 233, 208, +152, 239, 152, 248, 153, 64, 153, 72, 153, 82, 153, 90, 207, 173, 233, 213, +153, 113, 153, 122, 195, 202, 153, 140, 153, 150, 153, 160, 153, 170, 153, 180, +153, 190, 153, 200, 153, 210, 153, 220, 153, 230, 153, 240, 236, 163, 153, 254, +154, 71, 154, 78, 184, 232, 154, 93, 154, 102, 205, 225, 154, 115, 154, 122, +154, 126, 233, 230, 154, 138, 154, 147, 154, 156, 154, 162, 154, 169, 154, 176, +154, 179, 154, 186, 154, 194, 154, 201, 154, 209, 154, 216, 198, 248, 154, 224, +176, 177, 235, 181, 154, 238, 217, 224, 207, 171, 155, 65, 204, 192, 155, 74, +155, 80, 210, 202, 227, 231, 155, 95, 155, 102, 187, 166, 155, 108, 213, 180, +155, 119, 155, 125, 155, 130, 155, 134, 204, 169, 227, 248, 228, 167, 228, 169, +155, 159, 155, 165, 155, 171, 155, 176, 155, 181, 215, 199, 228, 177, 228, 183, +155, 199, 155, 205, 228, 188, 155, 219, 155, 225, 155, 231, 181, 211, 228, 204, +186, 212, 155, 250, 204, 202, 196, 215, 228, 196, 156, 83, 156, 88, 156, 94, +156, 103, 156, 107, 156, 113, 156, 117, 156, 123, 195, 236, 228, 216, 228, 207, +207, 230, 156, 160, 156, 169, 156, 178, 156, 186, 156, 192, 156, 200, 156, 208, +156, 214, 228, 209, 156, 225, 156, 232, 156, 239, 185, 246, 194, 203, 156, 253, +157, 71, 198, 175, 157, 87, 157, 93, 196, 174, 228, 244, 157, 114, 209, 250, +157, 131, 157, 139, 199, 177, 193, 202, 157, 162, 228, 253, 179, 206, 197, 236, +157, 191, 157, 199, 157, 208, 229, 164, 188, 164, 157, 232, 157, 240, 229, 168, +158, 66, 158, 74, 158, 84, 158, 94, 158, 104, 229, 171, 158, 120, 158, 131, +158, 140, 158, 149, 185, 224, 158, 167, 158, 176, 158, 186, 158, 191, 212, 214, +158, 203, 179, 180, 236, 191, 158, 223, 158, 228, 158, 233, 158, 236, 158, 244, +186, 230, 159, 69, 189, 253, 159, 80, 159, 87, 186, 184, 159, 103, 159, 108, +159, 117, 159, 124, 159, 134, 159, 143, 159, 150, 159, 160, 195, 186, 214, 243, +236, 212, 159, 188, 159, 196, 159, 204, 236, 218, 159, 219, 159, 227, 159, 235, +159, 244, 159, 253, 160, 70, 160, 78, 160, 86, 160, 95, 160, 105, 160, 114, +160, 124, 160, 134, 197, 192, 184, 184, 160, 151, 160, 159, 160, 166, 160, 172, +160, 177, 201, 252, 160, 190, 160, 195, 160, 201, 160, 210, 160, 219, 160, 227, +225, 239, 191, 241, 160, 245, 160, 251, 186, 221, 170, 73, 225, 249, 170, 79, +170, 87, 170, 95, 178, 194, 170, 104, 170, 109, 170, 114, 170, 122, 170, 132, +170, 139, 170, 148, 226, 179, 171, 68, 171, 77, 171, 84, 171, 91, 171, 99, +171, 107, 193, 225, 171, 117, 171, 125, 183, 169, 171, 138, 171, 146, 171, 152, +172, 64, 172, 74, 172, 79, 172, 87, 172, 95, 231, 247, 199, 217, 172, 112, +172, 121, 172, 132, 232, 164, 172, 144, 185, 229, 172, 160, 173, 69, 232, 172, +173, 85, 173, 93, 173, 100, 173, 110, 173, 119, 173, 130, 173, 139, 240, 172, +173, 152, 173, 160, 174, 70, 174, 78, 174, 86, 201, 245, 174, 99, 174, 103, +181, 233, 174, 111, 189, 231, 174, 124, 174, 131, 183, 172, 179, 235, 174, 154, +175, 64, 240, 218, 175, 75, 175, 78, 240, 230, 175, 86, 240, 228, 175, 94, +182, 187, 193, 161, 175, 109, 175, 116, 240, 246, 240, 250, 175, 137, 175, 142, +175, 146, 175, 151, 241, 162, 176, 65, 176, 73, 176, 81, 176, 88, 176, 97, +185, 239, 212, 237, 176, 116, 205, 238, 176, 132, 176, 141, 241, 229, 176, 157, +211, 175, 186, 208, 177, 73, 177, 81, 177, 89, 177, 94, 237, 237, 177, 105, +177, 115, 237, 243, 177, 128, 191, 244, 215, 197, 177, 146, 177, 154, 178, 65, +237, 254, 178, 77, 178, 86, 178, 90, 178, 97, 178, 105, 178, 112, 178, 117, +178, 124, 178, 132, 178, 142, 178, 151, 178, 158, 179, 66, 179, 71, 183, 175, +179, 83, 197, 248, 237, 191, 237, 206, 197, 233, 237, 194, 179, 113, 237, 202, +179, 124, 179, 134, 211, 178, 179, 149, 179, 157, 180, 68, 180, 73, 180, 78, +180, 83, 237, 218, 180, 97, 180, 104, 197, 205, 180, 117, 180, 128, 180, 136, +180, 143, 180, 151, 180, 160, 181, 72, 181, 81, 181, 90, 237, 231, 201, 231, +198, 237, 181, 120, 236, 239, 181, 129, 181, 135, 236, 247, 194, 187, 181, 157, +182, 69, 182, 78, 182, 87, 182, 96, 208, 227, 182, 106, 182, 112, 182, 120, +182, 125, 182, 131, 182, 139, 239, 249, 182, 151, 214, 201, 183, 68, 183, 78, +183, 86, 183, 91, 183, 100, 183, 109, 183, 118, 183, 129, 209, 168, 183, 142, +241, 186, 214, 207, 180, 220, 241, 188, 184, 72, 184, 81, 184, 90, 184, 99, +184, 108, 184, 114, 184, 121, 184, 130, 184, 136, 243, 201, 177, 202, 243, 215, +177, 191, 185, 66, 193, 253, 185, 80, 191, 240, 243, 217, 185, 94, 243, 223, +185, 109, 185, 115, 185, 124, 185, 131, 185, 138, 243, 236, 243, 240, 185, 155, +186, 65, 186, 73, 186, 80, 243, 247, 186, 94, 186, 102, 186, 110, 186, 117, +186, 125, 186, 135, 186, 142, 186, 152, 244, 166, 187, 71, 187, 80, 187, 90, +187, 100, 187, 110, 244, 204, 187, 125, 187, 135, 187, 140, 212, 193, 193, 184, +187, 158, 188, 66, 244, 216, 204, 199, 191, 183, 188, 92, 188, 101, 188, 109, +188, 119, 188, 129, 188, 139, 188, 147, 188, 154, 189, 67, 189, 77, 189, 87, +189, 97, 189, 107, 189, 117, 189, 126, 189, 136, 189, 146, 189, 156, 190, 69, +190, 78, 190, 87, 190, 97, 190, 107, 190, 117, 190, 128, 190, 138, 190, 148, +190, 158, 191, 71, 191, 81, 191, 91, 191, 101, 191, 111, 191, 121, 191, 131, +191, 139, 191, 149, 191, 159, 192, 72, 192, 82, 192, 92, 192, 101, 192, 111, +192, 121, 186, 236, 206, 179, 194, 218, 231, 164, 176, 237, 231, 171, 189, 202, +231, 176, 231, 181, 215, 219, 192, 194, 192, 137, 184, 191, 231, 205, 201, 201, +184, 215, 243, 191, 192, 155, 193, 64, 193, 70, 215, 239, 238, 188, 238, 192, +193, 98, 193, 105, 193, 113, 193, 118, 244, 202, 193, 133, 193, 139, 244, 225, +199, 204, 193, 159, 194, 69, 194, 75, 210, 171, 194, 87, 241, 232, 194, 95, +241, 241, 194, 106, 194, 110, 241, 246, 194, 121, 190, 219, 194, 138, 194, 146, +194, 155, 195, 66, 188, 161, 208, 164, 179, 166, 183, 190, 235, 200, 201, 246, +195, 95, 195, 102, 202, 164, 195, 111, 210, 200, 176, 183, 195, 122, 235, 219, +235, 228, 195, 138, 235, 227, 235, 225, 196, 64, 192, 176, 199, 187, 196, 82, +196, 89, 196, 94, 235, 239, 196, 104, 196, 111, 196, 119, 196, 125, 196, 133, +196, 142, 177, 219, 235, 251, 197, 66, 197, 76, 215, 212, 214, 194, 244, 167, +197, 100, 202, 230, 203, 180, 197, 118, 189, 162, 197, 123, 244, 185, 197, 138, +203, 210, 197, 154, 198, 66, 198, 70, 198, 75, 220, 183, 198, 85, 198, 90, +220, 184, 198, 95, 198, 100, 198, 106, 198, 108, 198, 111, 220, 214, 198, 120, +198, 126, 195, 175, 220, 221, 198, 140, 198, 146, 198, 154, 220, 238, 199, 64, +199, 70, 187, 196, 220, 234, 220, 253, 199, 84, 199, 92, 199, 99, 201, 175, +221, 183, 199, 118, 199, 124, 221, 178, 221, 210, 190, 213, 221, 202, 199, 151, +199, 157, 183, 198, 200, 73, 221, 201, 200, 83, 200, 91, 211, 169, 200, 104, +221, 199, 200, 120, 200, 130, 200, 139, 200, 144, 200, 151, 200, 156, 201, 65, +221, 220, 201, 78, 203, 226, 201, 94, 201, 103, 221, 240, 208, 238, 201, 121, +201, 128, 201, 135, 197, 238, 201, 150, 201, 158, 202, 71, 202, 78, 202, 86, +202, 94, 202, 102, 176, 170, 202, 114, 202, 121, 202, 130, 222, 168, 202, 147, +202, 155, 203, 64, 203, 71, 203, 80, 203, 88, 208, 189, 203, 102, 203, 110, +203, 119, 203, 126, 222, 188, 203, 143, 203, 152, 204, 65, 204, 73, 204, 82, +204, 90, 204, 100, 204, 108, 204, 118, 204, 126, 204, 137, 242, 175, 211, 221, +204, 158, 205, 67, 242, 180, 205, 77, 205, 83, 205, 91, 212, 233, 205, 102, +205, 106, 205, 114, 205, 118, 205, 123, 205, 129, 205, 137, 242, 211, 182, 234, +242, 218, 209, 209, 195, 219, 206, 70, 206, 78, 206, 85, 206, 92, 208, 171, +206, 105, 206, 113, 206, 120, 181, 251, 206, 133, 206, 139, 206, 146, 206, 155, +242, 253, 207, 72, 207, 79, 243, 161, 207, 94, 207, 101, 207, 109, 243, 181, +207, 126, 207, 135, 207, 143, 243, 182, 207, 159, 208, 70, 208, 79, 208, 87, +208, 94, 208, 102, 208, 109, 208, 114, 203, 165, 208, 126, 176, 192, 208, 137, +208, 145, 241, 200, 209, 64, 209, 72, 209, 80, 209, 85, 210, 225, 209, 99, +241, 212, 209, 111, 241, 211, 209, 124, 186, 214, 241, 210, 209, 147, 209, 154, +210, 64, 210, 73, 210, 82, 210, 92, 210, 100, 210, 109, 210, 119, 210, 129, +210, 135, 210, 145, 210, 155, 211, 68, 211, 78, 211, 88, 185, 230, 234, 236, +211, 101, 211, 108, 211, 114, 211, 122, 209, 212, 211, 141, 211, 151, 212, 64, +212, 74, 212, 84, 212, 94, 212, 103, 212, 112, 212, 122, 212, 133, 212, 143, +212, 153, 213, 65, 213, 73, 213, 82, 213, 92, 213, 102, 213, 112, 213, 122, +213, 133, 213, 143, 213, 153, 214, 66, 214, 76, 214, 86, 214, 96, 214, 105, +214, 115, 214, 125, 214, 135, 214, 145, 214, 155, 215, 68, 215, 78, 215, 88, +215, 97, 215, 106, 215, 116, 215, 126, 215, 137, 215, 147, 200, 207, 210, 233, +208, 237, 218, 172, 214, 223, 218, 180, 218, 185, 215, 158, 203, 181, 191, 206, +204, 184, 218, 203, 195, 213, 199, 171, 192, 190, 216, 66, 216, 75, 216, 81, +216, 90, 187, 191, 216, 105, 216, 114, 216, 121, 245, 246, 245, 249, 216, 145, +216, 155, 217, 68, 217, 78, 217, 88, 217, 98, 217, 108, 217, 118, 217, 129, +217, 139, 217, 149, 217, 159, 218, 72, 218, 79, 204, 176, 204, 249, 188, 214, +234, 226, 218, 81, 216, 211, 201, 226, 215, 223, 218, 95, 244, 242, 218, 110, +218, 118, 218, 128, 218, 137, 218, 143, 218, 148, 218, 155, 218, 160, 245, 200, +191, 231, 219, 79, 219, 82, 219, 90, 219, 96, 219, 105, 219, 110, 245, 218, +219, 123, 245, 229, 219, 132, 219, 140, 219, 149, 219, 157, 245, 237, 220, 72, +220, 78, 220, 86, 245, 242, 220, 103, 220, 110, 204, 201, 220, 129, 234, 166, +220, 148, 220, 158, 221, 71, 221, 81, 221, 91, 221, 101, 221, 111, 221, 121, +221, 132, 221, 142, 221, 152, 222, 65, 222, 75, 222, 85, 222, 95, 194, 214, +233, 244, 233, 251, 222, 99, 207, 189, 222, 102, 222, 109, 222, 116, 180, 239, +194, 245, 222, 134, 212, 182, 229, 200, 202, 246, 222, 149, 229, 204, 222, 157, +222, 160, 183, 234, 223, 74, 229, 212, 223, 85, 223, 91, 223, 95, 223, 102, +229, 219, 223, 116, 223, 124, 223, 130, 223, 138, 223, 143, 223, 148, 211, 202, +219, 161, 224, 64, 224, 70, 224, 75, 224, 81, 224, 86, 179, 187, 219, 177, +224, 107, 224, 117, 224, 126, 224, 134, 224, 143, 224, 151, 224, 160, 244, 252, +225, 72, 245, 161, 179, 234, 195, 184, 225, 87, 225, 94, 225, 98, 225, 106, +225, 114, 225, 120, 225, 128, 225, 138, 225, 141, 225, 150, 225, 159, 226, 72, +226, 82, 226, 92, 226, 102, 226, 112, 226, 122, 226, 133, 226, 143, 226, 153, +227, 66, 227, 76, 227, 86, 227, 96, 227, 106, 227, 115, 227, 125, 246, 198, +227, 145, 227, 155, 228, 68, 228, 77, 228, 87, 228, 96, 228, 106, 228, 116, +228, 126, 228, 137, 228, 147, 228, 157, 229, 70, 229, 80, 229, 90, 229, 100, +229, 110, 229, 119, 229, 130, 229, 140, 229, 150, 246, 202, 230, 72, 230, 82, +230, 92, 230, 101, 230, 111, 230, 121, 230, 132, 230, 142, 230, 152, 231, 64, +231, 73, 231, 83, 231, 93, 231, 103, 231, 113, 231, 123, 231, 134, 231, 144, +231, 154, 232, 67, 232, 77, 232, 86, 232, 96, 232, 106, 232, 116, 232, 125, +232, 136, 232, 146, 238, 201, 232, 150, 196, 198, 238, 214, 238, 220, 188, 216, +238, 230, 238, 239, 205, 173, 232, 157, 189, 194, 198, 204, 179, 250, 239, 180, +239, 187, 239, 192, 239, 196, 239, 200, 182, 198, 196, 247, 239, 217, 239, 223, +239, 232, 239, 239, 233, 81, 233, 90, 233, 100, 233, 110, 233, 120, 233, 131, +233, 141, 233, 151, 234, 64, 234, 74, 234, 84, 201, 193, 188, 228, 227, 204, +227, 208, 227, 214, 184, 183, 234, 103, 234, 111, 234, 115, 184, 189, 234, 120, +234, 128, 212, 186, 218, 238, 204, 213, 234, 153, 234, 160, 184, 244, 235, 74, +235, 83, 235, 92, 246, 192, 188, 175, 235, 105, 235, 113, 235, 122, 235, 130, +235, 136, 235, 142, 235, 147, 193, 216, 235, 160, 246, 175, 236, 79, 246, 178, +236, 96, 199, 224, 236, 111, 236, 116, 236, 125, 236, 133, 236, 142, 236, 149, +199, 202, 237, 67, 237, 75, 237, 81, 237, 91, 237, 101, 237, 111, 237, 121, +237, 130, 237, 135, 237, 142, 237, 152, 238, 65, 238, 75, 238, 85, 238, 95, +238, 105, 238, 115, 238, 125, 238, 136, 238, 146, 238, 156, 239, 69, 185, 203, +190, 177, 239, 72, 209, 213, 242, 173, 239, 84, 239, 94, 239, 104, 183, 231, +198, 174, 239, 124, 239, 133, 239, 143, 239, 153, 240, 66, 240, 74, 240, 84, +240, 94, 240, 103, 240, 113, 240, 123, 240, 134, 240, 142, 240, 151, 210, 251, +240, 154, 240, 158, 241, 64, 202, 215, 241, 72, 241, 80, 241, 90, 241, 100, +241, 110, 241, 120, 241, 131, 241, 141, 241, 151, 242, 64, 242, 74, 242, 84, +242, 94, 242, 104, 242, 114, 242, 124, 242, 135, 242, 145, 242, 155, 243, 68, +243, 78, 243, 82, 205, 213, 194, 230, 230, 235, 201, 167, 214, 232, 243, 96, +186, 161, 247, 196, 247, 198, 243, 121, 243, 130, 243, 138, 243, 145, 243, 153, +247, 220, 244, 73, 244, 82, 244, 90, 244, 99, 244, 108, 198, 199, 244, 117, +244, 124, 244, 135, 244, 145, 244, 155, 245, 68, 245, 78, 245, 88, 245, 98, +245, 108, 245, 118, 245, 129, 245, 139, 245, 149, 245, 159, 246, 72, 246, 82, +246, 92, 246, 102, 246, 112, 246, 122, 246, 133, 246, 143, 246, 153, 247, 66, +247, 76, 247, 86, 247, 96, 247, 106, 247, 116, 247, 126, 247, 133, 246, 215, +247, 141, 246, 227, 247, 145, 246, 243, 247, 150, 246, 253, 247, 167, 193, 219, +248, 69, 248, 79, 248, 89, 248, 99, 248, 109, 248, 119, 248, 130, 248, 140, +248, 150, 248, 160, 249, 73, 249, 83, 249, 93, 249, 103, 249, 113, 249, 123, +249, 134, 249, 144, 249, 154, 250, 67, 250, 77, 250, 87, 250, 97, 250, 107, +250, 117, 250, 128, 250, 138, 250, 148, 250, 158, 251, 71, 251, 81, 251, 91, +240, 177, 240, 182, 251, 98, 240, 193, 251, 101, 240, 203, 186, 215, 251, 113, +251, 120, 247, 228, 251, 135, 251, 143, 251, 151, 251, 160, 244, 240, 247, 226, +252, 87, 252, 92, 247, 237, 252, 103, 252, 109, 252, 118, 252, 125, 182, 166, +252, 140, 247, 247, 247, 248, 253, 68, 253, 73, 253, 82, 253, 90, 253, 100, +253, 110, 253, 120, 253, 131, 246, 182, 253, 139, 185, 168, 253, 154, 170, 161, +170, 171, 170, 181, 170, 191, 170, 201, 170, 211, 170, 221, 170, 231, 170, 241, +170, 251, 171, 167, 171, 177, 171, 187, 171, 197, 171, 207, 171, 217, 171, 227, +171, 237, 171, 247, 172, 163, 172, 173, 172, 183, 172, 193, 172, 203, 172, 213, +172, 223, 172, 233, 172, 243, 172, 253, 173, 169, 173, 179, 173, 189, 173, 199, +173, 209, 173, 219, 173, 229, 173, 239, 173, 249, 174, 165, 174, 175, 174, 185, +174, 195, 174, 205, 174, 215, 174, 225, 174, 235, 174, 245, 175, 161, 175, 171, +175, 181, 175, 191, 175, 201, 175, 211, 175, 221, 175, 231, 175, 241, 175, 251, +248, 167, 248, 177, 248, 187, 248, 197, 248, 207, 248, 217, 248, 227, 248, 237, +248, 247, 249, 163, 249, 173, 249, 183, 249, 193, 249, 203, 249, 213, 249, 223, +249, 233, 249, 243, 249, 253, 250, 169, 250, 179, 250, 189, 250, 199, 250, 209, +250, 219, 250, 229, 250, 239, 250, 249, 251, 165, 251, 175, 251, 185, 251, 195, +251, 205, 251, 215, 251, 225, 251, 235, 251, 245, 252, 161, 252, 171, 252, 181, +252, 191, 252, 201, 252, 211, 252, 221, 252, 231, 252, 241, 252, 251, 253, 167, +253, 177, 253, 187, 253, 197, 253, 207, 253, 217, 253, 227, 253, 237, 253, 247, +254, 163, 254, 173, 254, 183, 254, 193, 254, 203, 254, 213, 254, 223, 254, 233, +254, 243, 254, 253, 161, 72, 161, 82, 161, 92, 161, 102, 161, 112, 161, 122, +161, 133, 161, 143, 161, 153, 162, 66, 162, 76, 162, 86, 162, 96, 162, 106, +162, 116, 162, 126, 162, 137, 162, 147, 162, 157, 163, 70, 163, 80, 163, 90, +163, 100, 163, 110, 163, 120, 163, 131, 163, 141, 163, 151, 164, 64, 164, 74, +164, 84, 164, 94, 164, 104, 164, 114, 164, 124, 164, 135, 164, 145, 164, 155, +165, 68, 165, 78, 165, 88, 165, 98, 165, 108, 165, 118, 165, 129, 165, 139, +165, 149, 165, 159, 166, 72, 166, 82, 166, 92, 166, 102, 166, 112, 166, 122, +166, 133, 166, 143, 166, 153, 167, 66, 167, 76, 167, 86, 167, 96, 167, 106, +167, 116, 167, 126, 167, 137, 167, 147, 167, 157, 162, 227, 164, 248, 165, 250, +166, 190, 166, 236, 166, 253, 167, 202, 167, 245, 168, 150, 168, 160, 168, 237, +168, 247, 169, 93, 169, 144, 169, 155, 169, 241, 169, 251, 254, 81, 254, 91, +254, 101, 254, 111, 254, 121, 254, 132, 254, 142, 254, 152, 253, 156, 253, 157, +253, 158, 253, 159, 253, 160, 254, 64, 254, 71, 254, 75, 169, 85, 166, 227, +166, 235, 169, 109, 169, 118, 169, 129, 163, 161, 163, 171, 163, 181, 163, 191, +163, 201, 163, 211, 163, 221, 163, 231, 163, 241, 163, 251, 161, 233, 0 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_ISO_2022_JP.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_ISO_2022_JP.java new file mode 100644 index 0000000..54fd399 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_ISO_2022_JP.java @@ -0,0 +1,389 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.KnownFailure; +import dalvik.annotation.TestTargetClass; + +import java.nio.charset.CharacterCodingException; + +@TestTargetClass(targets.Charsets.ISO_2022_JP.class) + +public class Charset_MultiByte_ISO_2022_JP extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "ISO-2022-JP"; + + testChars = theseChars(new int[]{ +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +162, 163, 165, 167, 168, 172, 176, 177, 180, 182, 215, 247, 913, 914, 924, 934, +945, 955, 965, 1025, 1040, 1050, 1060, 1070, 1080, 1090, 1100, 8208, 8220, 8230, 8240, 8251, +8451, 8491, 8592, 8658, 8704, 8715, 8730, 8743, 8756, 8786, 8800, 8810, 8834, 8869, 8978, 9472, +9484, 9495, 9507, 9519, 9531, 9547, 9632, 9650, 9660, 9670, 9711, 9733, 9792, 9834, 12288, 12298, +12308, 12353, 12363, 12373, 12383, 12393, 12403, 12413, 12423, 12433, 12443, 12453, 12463, 12473, 12483, 12493, +12503, 12513, 12523, 12533, 19968, 19978, 19988, 19998, 20010, 20022, 20034, 20045, 20055, 20066, 20081, 20094, +20104, 20114, 20124, 20134, 20144, 20154, 20164, 20174, 20184, 20195, 20205, 20215, 20225, 20237, 20250, 20271, +20282, 20294, 20304, 20314, 20329, 20339, 20351, 20363, 20374, 20384, 20395, 20405, 20415, 20426, 20436, 20447, +20462, 20472, 20485, 20495, 20505, 20515, 20525, 20537, 20547, 20559, 20570, 20581, 20594, 20605, 20621, 20632, +20652, 20663, 20674, 20685, 20698, 20709, 20725, 20736, 20754, 20767, 20778, 20791, 20801, 20811, 20826, 20837, +20849, 20860, 20870, 20880, 20896, 20906, 20916, 20932, 20950, 20960, 20970, 20981, 20992, 21002, 21012, 21028, +21038, 21048, 21059, 21069, 21083, 21093, 21103, 21117, 21127, 21137, 21147, 21161, 21172, 21182, 21193, 21205, +21215, 21234, 21246, 21256, 21269, 21280, 21290, 21304, 21315, 21325, 21335, 21350, 21360, 21371, 21398, 21408, +21421, 21435, 21448, 21460, 21471, 21481, 21491, 21505, 21515, 21531, 21542, 21558, 21568, 21578, 21599, 21610, +21621, 21632, 21643, 21666, 21676, 21688, 21698, 21720, 21730, 21741, 21754, 21764, 21775, 21806, 21816, 21828, +21839, 21852, 21883, 21895, 21912, 21927, 21942, 21956, 21972, 21983, 22007, 22022, 22036, 22057, 22068, 22082, +22092, 22107, 22120, 22132, 22144, 22154, 22164, 22176, 22190, 22204, 22216, 22227, 22238, 22254, 22265, 22275, +22285, 22296, 22310, 22320, 22331, 22343, 22353, 22369, 22399, 22409, 22419, 22432, 22442, 22464, 22475, 22486, +22496, 22516, 22528, 22538, 22549, 22561, 22575, 22586, 22602, 22612, 22622, 22633, 22645, 22659, 22675, 22687, +22699, 22712, 22725, 22737, 22748, 22763, 22775, 22786, 22799, 22809, 22821, 22833, 22846, 22856, 22868, 22880, +22890, 22900, 22913, 22925, 22937, 22947, 22962, 22974, 22985, 22995, 23013, 23030, 23041, 23057, 23068, 23081, +23093, 23104, 23130, 23142, 23167, 23186, 23228, 23241, 23254, 23265, 23290, 23305, 23318, 23330, 23340, 23350, +23360, 23376, 23386, 23396, 23408, 23418, 23429, 23439, 23449, 23459, 23470, 23480, 23490, 23500, 23515, 23525, +23536, 23546, 23556, 23566, 23578, 23588, 23601, 23611, 23621, 23631, 23646, 23660, 23670, 23692, 23713, 23723, +23734, 23749, 23769, 23784, 23798, 23815, 23825, 23835, 23849, 23883, 23900, 23913, 23923, 23938, 23948, 23965, +23980, 23991, 24009, 24019, 24029, 24039, 24049, 24059, 24070, 24081, 24091, 24101, 24111, 24125, 24135, 24148, +24159, 24178, 24188, 24199, 24213, 24224, 24235, 24245, 24257, 24271, 24282, 24296, 24307, 24318, 24329, 24339, +24351, 24361, 24373, 24385, 24396, 24406, 24417, 24427, 24439, 24449, 24459, 24471, 24481, 24493, 24505, 24515, +24525, 24535, 24548, 24560, 24571, 24590, 24601, 24613, 24623, 24634, 24646, 24656, 24666, 24676, 24687, 24705, +24715, 24726, 24736, 24746, 24756, 24773, 24785, 24796, 24807, 24817, 24827, 24838, 24853, 24863, 24876, 24892, +24903, 24915, 24925, 24935, 24945, 24958, 24970, 24980, 24996, 25006, 25018, 25030, 25040, 25059, 25074, 25084, +25096, 25106, 25117, 25130, 25140, 25151, 25161, 25171, 25182, 25192, 25206, 25216, 25226, 25236, 25246, 25259, +25269, 25282, 25292, 25303, 25313, 25324, 25334, 25345, 25356, 25369, 25383, 25402, 25417, 25429, 25447, 25458, +25472, 25484, 25494, 25504, 25514, 25524, 25534, 25545, 25558, 25569, 25582, 25594, 25606, 25619, 25638, 25652, +25662, 25678, 25688, 25703, 25718, 25731, 25746, 25758, 25769, 25785, 25797, 25810, 25824, 25836, 25846, 25856, +25880, 25891, 25903, 25913, 25925, 25935, 25945, 25955, 25968, 25986, 25996, 26007, 26017, 26027, 26039, 26049, +26059, 26071, 26081, 26092, 26106, 26118, 26131, 26143, 26157, 26172, 26185, 26205, 26215, 26228, 26241, 26254, +26264, 26274, 26286, 26296, 26308, 26326, 26336, 26352, 26364, 26376, 26388, 26398, 26408, 26420, 26431, 26441, +26451, 26462, 26474, 26485, 26495, 26505, 26517, 26528, 26543, 26553, 26564, 26574, 26584, 26594, 26604, 26619, +26643, 26654, 26665, 26676, 26688, 26701, 26713, 26723, 26740, 26750, 26765, 26775, 26786, 26797, 26809, 26820, +26834, 26847, 26862, 26873, 26884, 26894, 26905, 26915, 26928, 26941, 26954, 26964, 26974, 26986, 26996, 27006, +27018, 27028, 27040, 27054, 27067, 27079, 27091, 27101, 27111, 27122, 27133, 27146, 27156, 27166, 27177, 27189, +27204, 27224, 27234, 27250, 27263, 27277, 27287, 27298, 27308, 27320, 27330, 27345, 27355, 27368, 27386, 27396, +27410, 27421, 27431, 27442, 27453, 27463, 27475, 27487, 27497, 27507, 27519, 27529, 27541, 27556, 27567, 27578, +27589, 27602, 27615, 27627, 27656, 27667, 27683, 27700, 27710, 27726, 27738, 27752, 27762, 27773, 27784, 27794, +27809, 27819, 27832, 27844, 27859, 27869, 27880, 27891, 27915, 27927, 27941, 27954, 27965, 27993, 28003, 28014, +28024, 28037, 28051, 28079, 28092, 28102, 28113, 28126, 28136, 28147, 28165, 28179, 28189, 28201, 28216, 28227, +28237, 28248, 28263, 28274, 28286, 28300, 28310, 28322, 28335, 28346, 28356, 28369, 28381, 28396, 28407, 28417, +28431, 28448, 28459, 28472, 28485, 28500, 28511, 28525, 28536, 28546, 28558, 28577, 28593, 28608, 28628, 28639, +28651, 28662, 28673, 28683, 28693, 28703, 28716, 28734, 28748, 28760, 28771, 28783, 28796, 28809, 28825, 28844, +28856, 28872, 28889, 28913, 28925, 28937, 28948, 28961, 28982, 29001, 29013, 29026, 29036, 29053, 29064, 29076, +29087, 29100, 29113, 29123, 29134, 29151, 29164, 29177, 29190, 29200, 29211, 29224, 29234, 29244, 29254, 29266, +29277, 29287, 29298, 29309, 29319, 29330, 29344, 29356, 29366, 29378, 29390, 29401, 29417, 29431, 29450, 29462, +29477, 29487, 29502, 29518, 29539, 29552, 29562, 29572, 29590, 29609, 29619, 29632, 29642, 29662, 29674, 29688, +29699, 29730, 29746, 29759, 29781, 29791, 29801, 29811, 29822, 29835, 29854, 29872, 29885, 29898, 29908, 29920, +29934, 29944, 29955, 29965, 29976, 29987, 30000, 30010, 30020, 30031, 30041, 30052, 30064, 30079, 30089, 30100, +30115, 30129, 30140, 30151, 30162, 30174, 30185, 30195, 30206, 30217, 30239, 30256, 30267, 30278, 30290, 30300, +30311, 30322, 30332, 30342, 30352, 30362, 30382, 30392, 30402, 30413, 30423, 30433, 30446, 30456, 30468, 30491, +30501, 30519, 30535, 30554, 30565, 30585, 30603, 30622, 30636, 30646, 30663, 30679, 30690, 30701, 30716, 30732, +30752, 30770, 30783, 30813, 30827, 30844, 30854, 30865, 30883, 30895, 30906, 30917, 30928, 30938, 30951, 30964, +30977, 30990, 31001, 31014, 31034, 31047, 31059, 31069, 31080, 31095, 31105, 31117, 31133, 31143, 31155, 31165, +31177, 31189, 31199, 31209, 31227, 31240, 31252, 31263, 31278, 31291, 31302, 31312, 31329, 31339, 31350, 31361, +31378, 31391, 31401, 31414, 31427, 31437, 31449, 31459, 31469, 31480, 31490, 31503, 31513, 31525, 31539, 31557, +31567, 31581, 31591, 31601, 31622, 31634, 31644, 31658, 31668, 31680, 31691, 31709, 31721, 31731, 31744, 31757, +31767, 31777, 31787, 31799, 31811, 31821, 31832, 31844, 31859, 31870, 31881, 31893, 31903, 31915, 31929, 31941, +31954, 31964, 31975, 31986, 31998, 32010, 32020, 32032, 32043, 32053, 32063, 32075, 32086, 32097, 32110, 32121, +32137, 32147, 32159, 32171, 32181, 32191, 32202, 32213, 32224, 32236, 32251, 32261, 32274, 32286, 32299, 32309, +32321, 32331, 32341, 32358, 32368, 32379, 32392, 32402, 32412, 32566, 32581, 32592, 32607, 32617, 32629, 32642, +32652, 32666, 32676, 32686, 32696, 32709, 32722, 32736, 32747, 32761, 32771, 32784, 32796, 32808, 32819, 32829, +32842, 32854, 32865, 32879, 32889, 32900, 32915, 32925, 32937, 32948, 32963, 32974, 32985, 32996, 33007, 33020, +33030, 33050, 33065, 33075, 33086, 33099, 33109, 33119, 33131, 33144, 33154, 33167, 33178, 33188, 33200, 33210, +33222, 33233, 33247, 33258, 33268, 33278, 33288, 33298, 33308, 33321, 33331, 33344, 33368, 33378, 33390, 33400, +33419, 33433, 33445, 33455, 33465, 33477, 33489, 33499, 33509, 33521, 33531, 33541, 33558, 33571, 33583, 33593, +33605, 33615, 33651, 33669, 33683, 33694, 33704, 33717, 33729, 33740, 33750, 33760, 33771, 33783, 33795, 33805, +33824, 33834, 33845, 33862, 33879, 33889, 33899, 33909, 33922, 33936, 33948, 33965, 33976, 33988, 34000, 34010, +34028, 34044, 34054, 34065, 34079, 34092, 34109, 34120, 34133, 34147, 34157, 34167, 34180, 34192, 34203, 34214, +34233, 34249, 34261, 34276, 34295, 34306, 34323, 34338, 34349, 34367, 34381, 34394, 34407, 34417, 34427, 34442, +34453, 34467, 34479, 34500, 34510, 34521, 34532, 34542, 34552, 34562, 34573, 34584, 34597, 34612, 34623, 34633, +34643, 34655, 34666, 34676, 34687, 34701, 34719, 34731, 34746, 34756, 34768, 34784, 34799, 34809, 34821, 34831, +34849, 34865, 34875, 34886, 34898, 34909, 34920, 34930, 34941, 34952, 34962, 34974, 34987, 34997, 35007, 35023, +35033, 35048, 35058, 35068, 35079, 35090, 35101, 35114, 35126, 35137, 35148, 35158, 35168, 35178, 35188, 35198, +35208, 35219, 35233, 35244, 35258, 35282, 35292, 35302, 35316, 35328, 35338, 35350, 35363, 35373, 35386, 35398, +35408, 35419, 35430, 35440, 35452, 35463, 35473, 35486, 35496, 35506, 35516, 35527, 35538, 35548, 35558, 35569, +35582, 35596, 35606, 35616, 35627, 35641, 35657, 35670, 35686, 35696, 35709, 35722, 35734, 35895, 35905, 35916, +35930, 35946, 35960, 35970, 35980, 35992, 36002, 36012, 36022, 36032, 36042, 36058, 36068, 36090, 36100, 36111, +36196, 36208, 36225, 36249, 36259, 36275, 36286, 36299, 36310, 36321, 36331, 36341, 36351, 36361, 36381, 36394, +36404, 36418, 36428, 36441, 36451, 36466, 36476, 36487, 36497, 36513, 36523, 36542, 36552, 36562, 36575, 36587, +36600, 36611, 36626, 36636, 36646, 36659, 36670, 36681, 36695, 36705, 36763, 36775, 36785, 36795, 36805, 36817, +36834, 36845, 36855, 36865, 36875, 36885, 36895, 36910, 36920, 36930, 36941, 36952, 36963, 36973, 36983, 36993, +37007, 37027, 37039, 37057, 37070, 37083, 37096, 37109, 37122, 37138, 37165, 37193, 37204, 37218, 37228, 37239, +37250, 37261, 37271, 37282, 37295, 37306, 37318, 37328, 37339, 37350, 37365, 37375, 37389, 37406, 37417, 37428, +37439, 37449, 37463, 37474, 37489, 37502, 37521, 37531, 37549, 37559, 37583, 37604, 37618, 37628, 37638, 37648, +37658, 37670, 37682, 37700, 37716, 37728, 37740, 37756, 37772, 37782, 37799, 37817, 37827, 37840, 37853, 37864, +37891, 37904, 37914, 37931, 37941, 37953, 37969, 37979, 37994, 38005, 38015, 38263, 38274, 38287, 38297, 38307, +38317, 38329, 38339, 38349, 38360, 38370, 38428, 38440, 38450, 38463, 38475, 38491, 38501, 38512, 38522, 38533, +38543, 38553, 38563, 38576, 38587, 38597, 38609, 38619, 38632, 38642, 38656, 38666, 38678, 38692, 38704, 38717, +38728, 38738, 38748, 38758, 38769, 38780, 38790, 38800, 38812, 38822, 38835, 38851, 38867, 38893, 38907, 38917, +38927, 38938, 38948, 38964, 38982, 38996, 39006, 39019, 39080, 39094, 39107, 39131, 39145, 39156, 39166, 39177, +39187, 39197, 39208, 39229, 39241, 39253, 39318, 39333, 39347, 39361, 39376, 39387, 39405, 39416, 39429, 39439, +39449, 39464, 39479, 39490, 39501, 39511, 39522, 39592, 39608, 39620, 39631, 39646, 39658, 39668, 39686, 39704, +39714, 39726, 39739, 39749, 39759, 39770, 39791, 39811, 39822, 39839, 39850, 39860, 39872, 39882, 39892, 39905, +39920, 39940, 39952, 39963, 39973, 39983, 39993, 40006, 40018, 40032, 40054, 40165, 40176, 40195, 40206, 40219, +40230, 40251, 40262, 40272, 40284, 40300, 40314, 40327, 40346, 40356, 40367, 40378, 40388, 40399, 40409, 40422, +40434, 40445, 40474, 40565, 40575, 40587, 40597, 40607, 40617, 40632, 40644, 40654, 40664, 40677, 40687, 40697, +40711, 40723, 40736, 40748, 40763, 40778, 40788, 40799, 40810, 40822, 40845, 40860, 65281, 65291, 65301, 65311, +65321, 65331, 65341, 65351, 65361, 65371, 65381, 65391, 65401, 65411, 65421, 65431, 65507 + }); + + testBytes = theseBytes(new int[]{ +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +27, 36, 66, 33, 113, 33, 114, 27, 40, 74, 92, 27, 36, 66, 33, 120, +33, 47, 34, 76, 33, 107, 33, 94, 33, 45, 34, 121, 33, 95, 33, 96, +38, 33, 38, 34, 38, 44, 38, 53, 38, 65, 38, 75, 38, 84, 39, 39, +39, 33, 39, 44, 39, 54, 39, 64, 39, 90, 39, 100, 39, 110, 33, 62, +33, 72, 33, 68, 34, 115, 34, 40, 33, 110, 34, 114, 34, 43, 34, 77, +34, 79, 34, 59, 34, 101, 34, 74, 33, 104, 34, 98, 33, 98, 34, 99, +34, 62, 34, 93, 34, 94, 40, 33, 40, 35, 40, 49, 40, 50, 40, 56, +40, 53, 40, 54, 34, 35, 34, 37, 34, 39, 34, 33, 34, 126, 33, 122, +33, 106, 34, 118, 33, 33, 33, 84, 33, 76, 36, 33, 36, 43, 36, 53, +36, 63, 36, 73, 36, 83, 36, 93, 36, 103, 36, 113, 33, 43, 37, 37, +37, 47, 37, 57, 37, 67, 37, 77, 37, 87, 37, 97, 37, 107, 37, 117, +48, 108, 62, 101, 51, 110, 62, 103, 80, 36, 80, 38, 80, 41, 70, 99, +62, 104, 86, 38, 77, 112, 52, 37, 77, 61, 56, 95, 48, 33, 75, 114, +80, 55, 63, 77, 80, 60, 80, 58, 73, 85, 66, 101, 80, 65, 80, 67, +52, 107, 56, 96, 50, 113, 71, 108, 59, 71, 67, 34, 58, 52, 80, 69, +80, 80, 50, 66, 59, 72, 78, 99, 80, 85, 54, 34, 85, 37, 63, 47, +74, 88, 61, 83, 80, 87, 80, 88, 61, 36, 74, 112, 80, 102, 96, 71, +56, 117, 74, 111, 79, 65, 55, 112, 80, 112, 74, 80, 80, 118, 55, 114, +60, 69, 53, 54, 75, 53, 59, 49, 58, 69, 61, 125, 81, 36, 70, 47, +78, 61, 81, 39, 81, 44, 53, 55, 60, 116, 61, 126, 77, 37, 81, 54, +48, 116, 57, 110, 69, 94, 70, 126, 54, 38, 55, 115, 49, 95, 102, 110, +52, 39, 81, 81, 58, 99, 64, 40, 82, 69, 81, 92, 70, 100, 81, 97, +69, 97, 52, 41, 81, 101, 72, 61, 81, 105, 55, 116, 68, 102, 65, 48, +57, 100, 71, 109, 73, 123, 81, 119, 55, 96, 81, 125, 78, 79, 61, 117, +79, 43, 51, 47, 74, 89, 70, 48, 74, 103, 55, 46, 56, 123, 82, 51, +82, 56, 62, 34, 72, 91, 82, 62, 64, 105, 82, 68, 70, 110, 55, 53, +48, 117, 82, 74, 82, 77, 82, 78, 49, 94, 53, 110, 75, 116, 61, 71, +82, 87, 67, 33, 49, 38, 82, 94, 49, 37, 55, 47, 72, 93, 82, 101, +82, 96, 57, 112, 82, 108, 60, 118, 82, 106, 82, 114, 58, 112, 82, 120, +82, 123, 82, 121, 83, 34, 83, 38, 83, 47, 83, 45, 83, 46, 49, 52, +83, 41, 83, 52, 83, 57, 66, 111, 76, 100, 83, 53, 83, 65, 83, 73, +83, 67, 55, 118, 49, 68, 83, 78, 83, 81, 83, 77, 83, 83, 67, 50, +83, 82, 50, 94, 83, 92, 49, 61, 65, 57, 51, 122, 52, 111, 74, 46, +83, 102, 83, 103, 83, 105, 83, 104, 83, 108, 83, 112, 83, 116, 83, 119, +50, 115, 83, 121, 83, 122, 74, 96, 84, 35, 84, 37, 84, 41, 67, 79, +84, 45, 54, 81, 57, 35, 84, 51, 84, 52, 84, 53, 84, 54, 84, 55, +84, 58, 84, 49, 75, 100, 84, 66, 73, 86, 62, 125, 75, 89, 84, 65, +66, 68, 84, 72, 116, 33, 58, 102, 50, 116, 69, 99, 58, 73, 49, 118, +63, 80, 54, 45, 74, 104, 84, 82, 84, 83, 84, 87, 84, 89, 84, 91, +84, 96, 59, 78, 68, 91, 84, 105, 50, 70, 61, 72, 84, 110, 60, 58, +84, 115, 70, 96, 75, 91, 84, 123, 67, 37, 69, 91, 85, 34, 85, 43, +76, 47, 85, 38, 85, 39, 62, 42, 59, 80, 64, 43, 49, 56, 48, 40, +48, 82, 85, 48, 85, 49, 74, 90, 85, 55, 85, 52, 58, 39, 73, 88, +76, 59, 71, 94, 85, 60, 60, 59, 85, 69, 67, 100, 85, 70, 52, 114, +85, 74, 62, 110, 68, 92, 85, 78, 85, 82, 59, 82, 85, 85, 56, 73, +85, 89, 85, 94, 66, 112, 57, 40, 67, 104, 64, 107, 53, 92, 85, 98, +60, 100, 73, 89, 52, 50, 85, 108, 85, 110, 59, 123, 60, 77, 70, 51, +62, 48, 76, 96, 61, 34, 63, 44, 53, 111, 86, 34, 66, 48, 86, 36, +86, 39, 86, 41, 50, 44, 86, 45, 86, 47, 86, 50, 86, 53, 50, 101, +69, 103, 63, 114, 86, 66, 86, 65, 74, 120, 86, 75, 86, 63, 63, 115, +86, 77, 86, 81, 86, 58, 86, 83, 86, 84, 86, 88, 86, 90, 86, 92, +64, 110, 57, 42, 56, 74, 52, 44, 72, 65, 86, 102, 86, 103, 63, 99, +66, 83, 75, 57, 86, 115, 86, 111, 86, 112, 52, 51, 77, 68, 72, 95, +68, 108, 86, 121, 56, 75, 48, 67, 86, 122, 86, 126, 87, 36, 87, 40, +87, 44, 87, 48, 87, 50, 53, 93, 68, 111, 87, 56, 68, 37, 87, 59, +87, 61, 87, 65, 87, 68, 68, 38, 87, 71, 64, 44, 78, 39, 70, 64, +56, 102, 87, 84, 69, 48, 63, 52, 71, 38, 59, 86, 87, 88, 88, 45, +87, 87, 87, 99, 87, 96, 53, 94, 54, 49, 87, 106, 87, 113, 54, 50, +87, 107, 87, 117, 66, 41, 87, 122, 88, 39, 88, 35, 77, 42, 48, 45, +88, 44, 62, 112, 79, 71, 64, 75, 87, 124, 88, 61, 88, 60, 88, 52, +88, 51, 52, 54, 88, 71, 88, 70, 88, 64, 88, 88, 88, 87, 55, 69, +88, 85, 77, 93, 88, 96, 88, 94, 74, 48, 88, 99, 88, 107, 88, 106, +50, 123, 88, 112, 68, 40, 88, 118, 88, 121, 50, 124, 108, 67, 89, 35, +66, 87, 75, 60, 72, 98, 66, 71, 89, 42, 89, 46, 73, 94, 53, 59, +71, 68, 89, 56, 66, 114, 72, 100, 68, 113, 89, 68, 89, 66, 89, 57, +51, 72, 51, 103, 59, 34, 59, 125, 89, 72, 53, 115, 89, 75, 68, 114, +66, 42, 74, 97, 74, 123, 55, 126, 89, 87, 62, 56, 89, 85, 78, 43, +65, 60, 68, 79, 89, 97, 89, 102, 77, 44, 48, 46, 52, 120, 77, 73, +89, 108, 89, 109, 89, 110, 89, 107, 58, 113, 89, 119, 69, 38, 89, 116, +89, 118, 55, 98, 59, 53, 70, 53, 89, 124, 51, 73, 90, 35, 90, 34, +90, 43, 53, 60, 90, 49, 90, 53, 90, 55, 90, 59, 59, 89, 50, 126, +56, 78, 73, 82, 54, 53, 59, 54, 63, 116, 90, 76, 73, 76, 69, 77, +48, 54, 90, 81, 90, 82, 90, 85, 64, 123, 52, 122, 90, 92, 61, 92, +50, 34, 58, 43, 48, 87, 64, 49, 62, 60, 67, 107, 90, 105, 90, 108, +90, 110, 64, 50, 54, 71, 90, 117, 90, 120, 68, 42, 74, 107, 91, 34, +91, 33, 91, 35, 91, 37, 91, 41, 82, 88, 55, 110, 58, 115, 91, 46, +76, 90, 75, 81, 91, 51, 63, 121, 60, 93, 91, 57, 91, 66, 53, 79, +72, 68, 91, 62, 75, 109, 79, 72, 56, 79, 91, 84, 74, 65, 91, 85, +68, 83, 91, 82, 91, 75, 58, 58, 64, 114, 91, 89, 91, 91, 64, 115, +91, 92, 91, 93, 91, 98, 91, 99, 91, 111, 91, 117, 91, 116, 57, 60, +62, 63, 91, 104, 91, 110, 52, 126, 75, 64, 69, 111, 63, 57, 92, 42, +92, 38, 68, 71, 63, 122, 92, 48, 92, 63, 92, 61, 77, 76, 92, 56, +92, 65, 92, 68, 92, 60, 92, 57, 58, 103, 79, 49, 92, 85, 92, 70, +92, 80, 116, 34, 92, 74, 92, 79, 92, 97, 92, 96, 65, 101, 92, 104, +92, 102, 92, 100, 56, 34, 62, 65, 92, 109, 53, 76, 92, 115, 92, 111, +51, 96, 92, 122, 93, 33, 92, 125, 93, 40, 93, 38, 93, 37, 93, 42, +54, 123, 72, 39, 93, 50, 77, 115, 93, 51, 49, 53, 50, 36, 77, 95, +54, 86, 93, 60, 52, 63, 93, 67, 74, 98, 58, 80, 93, 71, 61, 94, +93, 77, 93, 79, 93, 82, 59, 38, 53, 35, 70, 71, 93, 91, 93, 93, +93, 97, 93, 98, 93, 102, 63, 101, 72, 69, 72, 70, 49, 120, 93, 113, +53, 98, 53, 37, 68, 64, 93, 115, 75, 87, 75, 119, 74, 40, 93, 117, +93, 119, 93, 123, 67, 109, 49, 75, 77, 78, 64, 118, 68, 69, 61, 39, +94, 42, 94, 54, 94, 49, 73, 98, 63, 59, 94, 58, 94, 50, 51, 54, +78, 67, 94, 66, 61, 74, 94, 68, 94, 70, 61, 95, 64, 54, 55, 76, +94, 97, 50, 57, 94, 98, 94, 92, 94, 90, 62, 69, 77, 47, 94, 83, +79, 81, 72, 46, 61, 96, 48, 110, 94, 106, 69, 46, 94, 107, 51, 106, +66, 108, 94, 118, 95, 35, 53, 121, 79, 51, 71, 121, 76, 33, 65, 50, +52, 67, 55, 105, 51, 99, 95, 44, 95, 38, 95, 45, 95, 48, 95, 54, +69, 67, 55, 99, 95, 62, 95, 59, 77, 116, 111, 105, 95, 71, 95, 68, +73, 78, 95, 79, 64, 37, 95, 81, 94, 117, 70, 103, 95, 84, 69, 116, +60, 94, 79, 39, 95, 85, 95, 89, 95, 90, 78, 117, 95, 96, 95, 88, +95, 98, 95, 97, 49, 107, 76, 53, 65, 51, 78, 123, 95, 102, 95, 105, +95, 108, 64, 122, 95, 103, 77, 80, 61, 79, 95, 114, 95, 116, 71, 51, +95, 121, 83, 91, 95, 123, 96, 33, 71, 122, 96, 36, 96, 37, 96, 38, +96, 42, 96, 44, 96, 47, 68, 45, 76, 70, 75, 82, 64, 55, 56, 35, +96, 54, 96, 55, 53, 62, 56, 36, 62, 117, 54, 56, 96, 64, 65, 64, +60, 109, 96, 70, 96, 73, 96, 75, 96, 80, 96, 78, 96, 81, 96, 82, +61, 67, 96, 88, 96, 92, 56, 60, 54, 106, 52, 97, 96, 94, 96, 97, +59, 57, 96, 100, 55, 62, 96, 105, 53, 101, 66, 118, 96, 106, 96, 109, +96, 108, 96, 110, 96, 114, 58, 60, 96, 119, 96, 120, 96, 121, 52, 68, +60, 37, 96, 123, 96, 125, 97, 33, 97, 37, 97, 41, 97, 44, 97, 48, +52, 69, 59, 58, 69, 68, 68, 46, 97, 55, 48, 90, 78, 49, 97, 63, +48, 91, 53, 38, 97, 73, 97, 75, 97, 79, 97, 87, 97, 86, 62, 73, +97, 90, 97, 93, 65, 105, 97, 101, 97, 94, 97, 104, 97, 105, 97, 112, +97, 113, 97, 116, 76, 126, 97, 117, 97, 124, 98, 33, 98, 36, 51, 39, +59, 41, 98, 45, 72, 105, 98, 48, 98, 51, 98, 52, 69, 112, 98, 56, +76, 92, 65, 106, 98, 64, 98, 70, 98, 68, 98, 71, 98, 73, 98, 74, +98, 78, 98, 81, 98, 83, 98, 86, 61, 86, 98, 88, 98, 94, 98, 96, +76, 112, 67, 59, 98, 101, 98, 102, 98, 105, 75, 36, 57, 92, 62, 75, +78, 50, 98, 111, 98, 110, 72, 106, 98, 114, 98, 117, 51, 78, 98, 124, +72, 88, 99, 34, 99, 33, 99, 36, 62, 76, 65, 67, 99, 40, 98, 104, +60, 40, 53, 64, 99, 49, 61, 75, 73, 60, 69, 120, 54, 88, 50, 82, +99, 53, 99, 54, 99, 58, 54, 89, 99, 61, 99, 62, 65, 69, 67, 97, +48, 92, 99, 67, 76, 45, 99, 72, 60, 111, 99, 75, 75, 84, 48, 44, +99, 81, 51, 79, 53, 102, 70, 77, 67, 98, 55, 34, 99, 93, 99, 96, +51, 118, 99, 103, 99, 107, 61, 87, 99, 113, 81, 63, 99, 115, 99, 116, +99, 121, 63, 90, 99, 119, 100, 38, 72, 53, 100, 56, 100, 42, 100, 44, +74, 79, 100, 54, 100, 51, 67, 61, 100, 62, 64, 97, 100, 58, 100, 64, +100, 65, 100, 74, 100, 71, 100, 77, 100, 76, 52, 74, 100, 84, 100, 83, +100, 87, 64, 82, 100, 92, 100, 94, 74, 70, 76, 98, 74, 52, 71, 116, +48, 64, 100, 104, 100, 111, 100, 114, 100, 117, 100, 118, 78, 72, 100, 122, +53, 106, 101, 36, 61, 99, 65, 71, 59, 103, 101, 42, 101, 41, 101, 38, +101, 45, 77, 109, 101, 49, 56, 40, 101, 53, 101, 52, 101, 70, 101, 64, +101, 61, 76, 74, 54, 91, 101, 110, 68, 121, 76, 75, 101, 76, 101, 79, +101, 83, 60, 74, 75, 37, 101, 92, 72, 75, 55, 82, 65, 54, 101, 90, +55, 43, 101, 108, 101, 114, 101, 117, 101, 124, 52, 76, 102, 33, 102, 37, +102, 42, 102, 45, 71, 77, 102, 48, 102, 53, 102, 57, 55, 50, 102, 62, +102, 64, 102, 66, 61, 44, 63, 105, 52, 101, 102, 75, 57, 77, 66, 81, +102, 83, 102, 85, 60, 42, 67, 63, 102, 88, 64, 59, 65, 111, 78, 126, +102, 100, 102, 103, 102, 107, 52, 78, 56, 42, 58, 104, 48, 95, 66, 91, +102, 114, 48, 125, 102, 120, 103, 38, 64, 72, 53, 83, 102, 123, 71, 62, +103, 35, 102, 126, 79, 83, 103, 53, 60, 112, 68, 50, 103, 48, 57, 81, +73, 102, 103, 51, 103, 56, 103, 63, 50, 50, 103, 66, 103, 71, 60, 43, +67, 87, 103, 76, 54, 61, 80, 48, 61, 88, 103, 85, 103, 88, 103, 89, +103, 91, 103, 96, 58, 49, 103, 103, 48, 114, 73, 103, 51, 41, 63, 68, +54, 92, 52, 35, 49, 113, 50, 87, 60, 99, 49, 81, 103, 120, 51, 125, +104, 35, 104, 52, 104, 42, 104, 39, 104, 41, 49, 65, 104, 58, 104, 46, +103, 118, 52, 80, 104, 62, 104, 57, 104, 71, 54, 93, 62, 84, 104, 74, +104, 65, 104, 72, 104, 68, 104, 76, 104, 78, 104, 84, 104, 98, 104, 94, +67, 120, 73, 114, 104, 89, 48, 42, 104, 92, 61, 47, 73, 71, 104, 90, +62, 120, 67, 95, 104, 108, 104, 107, 75, 41, 104, 122, 104, 81, 74, 78, +104, 119, 104, 118, 74, 67, 104, 126, 105, 36, 104, 124, 105, 43, 105, 49, +71, 118, 105, 51, 105, 45, 65, 38, 105, 55, 105, 52, 105, 57, 70, 35, +61, 115, 105, 34, 105, 63, 105, 68, 77, 118, 105, 71, 105, 72, 53, 117, +105, 76, 105, 77, 48, 58, 50, 99, 59, 61, 105, 79, 105, 85, 105, 86, +51, 66, 51, 63, 72, 58, 72, 90, 66, 125, 75, 42, 105, 107, 67, 88, +105, 114, 105, 110, 105, 111, 64, 102, 106, 33, 105, 118, 106, 35, 105, 122, +71, 104, 77, 59, 106, 38, 106, 46, 77, 102, 106, 47, 106, 44, 106, 54, +106, 52, 51, 42, 106, 36, 106, 55, 106, 66, 106, 67, 106, 71, 61, 48, +106, 74, 62, 87, 73, 61, 106, 85, 106, 83, 55, 54, 106, 88, 106, 81, +72, 111, 106, 84, 106, 95, 78, 34, 106, 101, 106, 107, 106, 108, 106, 105, +74, 35, 75, 43, 106, 124, 106, 116, 106, 121, 106, 118, 106, 123, 50, 40, +106, 125, 107, 36, 107, 38, 107, 40, 107, 42, 107, 44, 107, 46, 107, 49, +107, 52, 51, 81, 107, 57, 63, 40, 107, 60, 56, 64, 63, 86, 107, 63, +55, 109, 64, 95, 63, 71, 107, 73, 58, 62, 107, 71, 59, 110, 53, 77, +107, 75, 56, 88, 107, 84, 56, 108, 107, 82, 50, 93, 53, 67, 67, 76, +78, 74, 68, 53, 68, 124, 107, 97, 66, 122, 107, 104, 107, 108, 107, 111, +107, 115, 54, 96, 107, 122, 107, 123, 55, 89, 53, 68, 108, 37, 90, 78, +108, 43, 67, 43, 108, 47, 108, 50, 70, 90, 57, 107, 108, 56, 108, 58, +75, 70, 108, 66, 57, 87, 64, 85, 108, 74, 50, 108, 66, 49, 108, 79, +108, 77, 108, 81, 108, 83, 108, 87, 64, 86, 65, 118, 108, 99, 108, 100, +60, 113, 66, 45, 108, 102, 108, 109, 108, 106, 64, 87, 108, 111, 65, 41, +108, 117, 108, 116, 108, 118, 109, 41, 108, 125, 108, 122, 109, 35, 109, 38, +109, 42, 109, 45, 109, 46, 109, 48, 109, 54, 109, 58, 63, 72, 109, 63, +109, 65, 56, 46, 70, 112, 109, 71, 60, 52, 51, 83, 109, 76, 109, 79, +109, 83, 109, 84, 109, 89, 109, 91, 109, 94, 55, 37, 63, 73, 82, 33, +63, 43, 68, 84, 63, 87, 54, 97, 109, 107, 69, 51, 76, 66, 65, 119, +109, 121, 109, 116, 66, 46, 66, 97, 48, 111, 63, 107, 74, 87, 110, 41, +56, 47, 65, 120, 65, 43, 110, 50, 110, 54, 70, 97, 110, 56, 48, 106, +79, 58, 110, 62, 73, 116, 77, 57, 110, 63, 110, 64, 69, 34, 70, 83, +63, 108, 63, 93, 61, 55, 57, 115, 110, 78, 66, 105, 72, 48, 110, 79, +110, 81, 110, 85, 72, 80, 110, 90, 110, 94, 75, 85, 110, 96, 110, 99, +70, 95, 110, 98, 111, 79, 78, 107, 110, 111, 110, 107, 110, 105, 72, 45, +57, 91, 75, 72, 65, 45, 110, 117, 65, 44, 110, 121, 110, 119, 61, 123, +73, 70, 57, 93, 59, 44, 63, 109, 111, 35, 54, 83, 79, 63, 110, 125, +68, 87, 111, 41, 55, 45, 111, 42, 51, 121, 58, 63, 51, 59, 111, 49, +111, 55, 111, 57, 111, 56, 111, 52, 111, 63, 111, 65, 111, 60, 111, 67, +111, 68, 111, 71, 52, 85, 111, 74, 111, 78, 111, 81, 111, 88, 68, 57, +111, 89, 49, 60, 111, 95, 51, 85, 111, 99, 111, 102, 111, 106, 111, 107, +70, 46, 111, 115, 73, 108, 111, 117, 75, 73, 48, 36, 111, 123, 74, 69, +52, 89, 49, 34, 56, 49, 54, 121, 63, 111, 55, 100, 78, 89, 112, 46, +64, 73, 50, 109, 59, 40, 63, 119, 49, 43, 49, 64, 60, 123, 78, 110, +112, 67, 112, 69, 112, 71, 112, 73, 112, 77, 64, 68, 112, 80, 112, 83, +112, 87, 112, 90, 112, 93, 112, 96, 112, 97, 112, 99, 112, 101, 112, 103, +52, 90, 112, 108, 49, 36, 57, 96, 112, 114, 55, 91, 112, 117, 49, 80, +112, 121, 52, 105, 78, 96, 112, 124, 73, 119, 113, 39, 113, 41, 72, 116, +113, 43, 48, 59, 62, 126, 113, 46, 50, 110, 113, 51, 52, 91, 113, 57, +113, 60, 113, 67, 60, 115, 113, 70, 67, 90, 71, 125, 67, 115, 113, 75, +113, 79, 113, 84, 113, 87, 113, 86, 113, 89, 66, 77, 113, 91, 113, 93, +113, 98, 113, 100, 113, 102, 57, 124, 51, 60, 63, 113, 113, 112, 113, 116, +72, 49, 113, 124, 114, 34, 114, 35, 114, 38, 114, 45, 100, 120, 76, 37, +114, 50, 53, 123, 79, 37, 114, 57, 48, 62, 114, 61, 75, 110, 114, 64, +114, 65, 114, 66, 114, 75, 114, 76, 114, 80, 114, 90, 79, 76, 114, 92, +114, 93, 48, 115, 51, 111, 114, 99, 75, 112, 114, 102, 114, 104, 68, 59, +114, 108, 114, 112, 50, 42, 49, 117, 114, 115, 57, 99, 114, 125, 115, 37, +49, 45, 75, 50, 115, 44, 115, 41, 115, 45, 115, 46, 114, 116, 115, 53, +115, 49, 115, 55, 115, 57, 115, 60, 79, 73, 115, 63, 115, 64, 115, 67, +60, 47, 115, 72, 115, 75, 78, 91, 115, 79, 115, 80, 50, 43, 115, 85, +96, 84, 115, 93, 115, 95, 115, 99, 115, 103, 56, 93, 65, 77, 115, 108, +73, 33, 115, 110, 115, 112, 115, 114, 115, 120, 115, 123, 78, 54, 115, 125, +33, 42, 33, 92, 35, 53, 33, 41, 35, 73, 35, 83, 33, 79, 35, 103, +35, 113, 33, 80, 27, 40, 73, 37, 47, 57, 67, 77, 87, 27, 36, 66, +33, 49 + }); + + super.setUp(); + } + + @KnownFailure("This Characterset is not properly supported in Android!") + @Override + public void test_CodecDynamic() throws CharacterCodingException { + super.test_CodecDynamic(); + } + + @KnownFailure("This Characterset is not properly supported in Android!") + @Override + public void test_Decode() throws CharacterCodingException { + super.test_Decode(); + } + + @KnownFailure("This Characterset is not properly supported in Android!") + @Override + public void test_Encode() throws CharacterCodingException { + super.test_Encode(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16.java new file mode 100644 index 0000000..1d93f54 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16.java @@ -0,0 +1,395 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +// SEE correspondig_Android test class: +//@TestTargetClass(targets.Charsets.UTF_16.class) + +public class Charset_MultiByte_UTF_16 extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "UTF-16"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, +176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, +192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, +208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, +224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, +240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, +256, 296, 336, 376, 416, 456, 496, 536, 576, 616, 656, 696, 736, 776, 816, 856, +896, 936, 976, 1016, 1056, 1096, 1136, 1176, 1216, 1256, 1296, 1336, 1376, 1416, 1456, 1496, +1536, 1576, 1616, 1656, 1696, 1736, 1776, 1816, 1856, 1896, 1936, 1976, 2016, 2056, 2096, 2136, +2176, 2216, 2256, 2296, 2336, 2376, 2416, 2456, 2496, 2536, 2576, 2616, 2656, 2696, 2736, 2776, +2816, 2856, 2896, 2936, 2976, 3016, 3056, 3096, 3136, 3176, 3216, 3256, 3296, 3336, 3376, 3416, +3456, 3496, 3536, 3576, 3616, 3656, 3696, 3736, 3776, 3816, 3856, 3896, 3936, 3976, 4016, 4056, +4096, 4136, 4176, 4216, 4256, 4296, 4336, 4376, 4416, 4456, 4496, 4536, 4576, 4616, 4656, 4696, +4736, 4776, 4816, 4856, 4896, 4936, 4976, 5016, 5056, 5096, 5136, 5176, 5216, 5256, 5296, 5336, +5376, 5416, 5456, 5496, 5536, 5576, 5616, 5656, 5696, 5736, 5776, 5816, 5856, 5896, 5936, 5976, +6016, 6056, 6096, 6136, 6176, 6216, 6256, 6296, 6336, 6376, 6416, 6456, 6496, 6536, 6576, 6616, +6656, 6696, 6736, 6776, 6816, 6856, 6896, 6936, 6976, 7016, 7056, 7096, 7136, 7176, 7216, 7256, +7296, 7336, 7376, 7416, 7456, 7496, 7536, 7576, 7616, 7656, 7696, 7736, 7776, 7816, 7856, 7896, +7936, 7976, 8016, 8056, 8096, 8136, 8176, 8216, 8256, 8296, 8336, 8376, 8416, 8456, 8496, 8536, +8576, 8616, 8656, 8696, 8736, 8776, 8816, 8856, 8896, 8936, 8976, 9016, 9056, 9096, 9136, 9176, +9216, 9256, 9296, 9336, 9376, 9416, 9456, 9496, 9536, 9576, 9616, 9656, 9696, 9736, 9776, 9816, +9856, 9896, 9936, 9976, 10016, 10056, 10096, 10136, 10176, 10216, 10256, 10296, 10336, 10376, 10416, 10456, +10496, 10536, 10576, 10616, 10656, 10696, 10736, 10776, 10816, 10856, 10896, 10936, 10976, 11016, 11056, 11096, +11136, 11176, 11216, 11256, 11296, 11336, 11376, 11416, 11456, 11496, 11536, 11576, 11616, 11656, 11696, 11736, +11776, 11816, 11856, 11896, 11936, 11976, 12016, 12056, 12096, 12136, 12176, 12216, 12256, 12296, 12336, 12376, +12416, 12456, 12496, 12536, 12576, 12616, 12656, 12696, 12736, 12776, 12816, 12856, 12896, 12936, 12976, 13016, +13056, 13096, 13136, 13176, 13216, 13256, 13296, 13336, 13376, 13416, 13456, 13496, 13536, 13576, 13616, 13656, +13696, 13736, 13776, 13816, 13856, 13896, 13936, 13976, 14016, 14056, 14096, 14136, 14176, 14216, 14256, 14296, +14336, 14376, 14416, 14456, 14496, 14536, 14576, 14616, 14656, 14696, 14736, 14776, 14816, 14856, 14896, 14936, +14976, 15016, 15056, 15096, 15136, 15176, 15216, 15256, 15296, 15336, 15376, 15416, 15456, 15496, 15536, 15576, +15616, 15656, 15696, 15736, 15776, 15816, 15856, 15896, 15936, 15976, 16016, 16056, 16096, 16136, 16176, 16216, +16256, 16296, 16336, 16376, 16416, 16456, 16496, 16536, 16576, 16616, 16656, 16696, 16736, 16776, 16816, 16856, +16896, 16936, 16976, 17016, 17056, 17096, 17136, 17176, 17216, 17256, 17296, 17336, 17376, 17416, 17456, 17496, +17536, 17576, 17616, 17656, 17696, 17736, 17776, 17816, 17856, 17896, 17936, 17976, 18016, 18056, 18096, 18136, +18176, 18216, 18256, 18296, 18336, 18376, 18416, 18456, 18496, 18536, 18576, 18616, 18656, 18696, 18736, 18776, +18816, 18856, 18896, 18936, 18976, 19016, 19056, 19096, 19136, 19176, 19216, 19256, 19296, 19336, 19376, 19416, +19456, 19496, 19536, 19576, 19616, 19656, 19696, 19736, 19776, 19816, 19856, 19896, 19936, 19976, 20016, 20056, +20096, 20136, 20176, 20216, 20256, 20296, 20336, 20376, 20416, 20456, 20496, 20536, 20576, 20616, 20656, 20696, +20736, 20776, 20816, 20856, 20896, 20936, 20976, 21016, 21056, 21096, 21136, 21176, 21216, 21256, 21296, 21336, +21376, 21416, 21456, 21496, 21536, 21576, 21616, 21656, 21696, 21736, 21776, 21816, 21856, 21896, 21936, 21976, +22016, 22056, 22096, 22136, 22176, 22216, 22256, 22296, 22336, 22376, 22416, 22456, 22496, 22536, 22576, 22616, +22656, 22696, 22736, 22776, 22816, 22856, 22896, 22936, 22976, 23016, 23056, 23096, 23136, 23176, 23216, 23256, +23296, 23336, 23376, 23416, 23456, 23496, 23536, 23576, 23616, 23656, 23696, 23736, 23776, 23816, 23856, 23896, +23936, 23976, 24016, 24056, 24096, 24136, 24176, 24216, 24256, 24296, 24336, 24376, 24416, 24456, 24496, 24536, +24576, 24616, 24656, 24696, 24736, 24776, 24816, 24856, 24896, 24936, 24976, 25016, 25056, 25096, 25136, 25176, +25216, 25256, 25296, 25336, 25376, 25416, 25456, 25496, 25536, 25576, 25616, 25656, 25696, 25736, 25776, 25816, +25856, 25896, 25936, 25976, 26016, 26056, 26096, 26136, 26176, 26216, 26256, 26296, 26336, 26376, 26416, 26456, +26496, 26536, 26576, 26616, 26656, 26696, 26736, 26776, 26816, 26856, 26896, 26936, 26976, 27016, 27056, 27096, +27136, 27176, 27216, 27256, 27296, 27336, 27376, 27416, 27456, 27496, 27536, 27576, 27616, 27656, 27696, 27736, +27776, 27816, 27856, 27896, 27936, 27976, 28016, 28056, 28096, 28136, 28176, 28216, 28256, 28296, 28336, 28376, +28416, 28456, 28496, 28536, 28576, 28616, 28656, 28696, 28736, 28776, 28816, 28856, 28896, 28936, 28976, 29016, +29056, 29096, 29136, 29176, 29216, 29256, 29296, 29336, 29376, 29416, 29456, 29496, 29536, 29576, 29616, 29656, +29696, 29736, 29776, 29816, 29856, 29896, 29936, 29976, 30016, 30056, 30096, 30136, 30176, 30216, 30256, 30296, +30336, 30376, 30416, 30456, 30496, 30536, 30576, 30616, 30656, 30696, 30736, 30776, 30816, 30856, 30896, 30936, +30976, 31016, 31056, 31096, 31136, 31176, 31216, 31256, 31296, 31336, 31376, 31416, 31456, 31496, 31536, 31576, +31616, 31656, 31696, 31736, 31776, 31816, 31856, 31896, 31936, 31976, 32016, 32056, 32096, 32136, 32176, 32216, +32256, 32296, 32336, 32376, 32416, 32456, 32496, 32536, 32576, 32616, 32656, 32696, 32736, 32776, 32816, 32856, +32896, 32936, 32976, 33016, 33056, 33096, 33136, 33176, 33216, 33256, 33296, 33336, 33376, 33416, 33456, 33496, +33536, 33576, 33616, 33656, 33696, 33736, 33776, 33816, 33856, 33896, 33936, 33976, 34016, 34056, 34096, 34136, +34176, 34216, 34256, 34296, 34336, 34376, 34416, 34456, 34496, 34536, 34576, 34616, 34656, 34696, 34736, 34776, +34816, 34856, 34896, 34936, 34976, 35016, 35056, 35096, 35136, 35176, 35216, 35256, 35296, 35336, 35376, 35416, +35456, 35496, 35536, 35576, 35616, 35656, 35696, 35736, 35776, 35816, 35856, 35896, 35936, 35976, 36016, 36056, +36096, 36136, 36176, 36216, 36256, 36296, 36336, 36376, 36416, 36456, 36496, 36536, 36576, 36616, 36656, 36696, +36736, 36776, 36816, 36856, 36896, 36936, 36976, 37016, 37056, 37096, 37136, 37176, 37216, 37256, 37296, 37336, +37376, 37416, 37456, 37496, 37536, 37576, 37616, 37656, 37696, 37736, 37776, 37816, 37856, 37896, 37936, 37976, +38016, 38056, 38096, 38136, 38176, 38216, 38256, 38296, 38336, 38376, 38416, 38456, 38496, 38536, 38576, 38616, +38656, 38696, 38736, 38776, 38816, 38856, 38896, 38936, 38976, 39016, 39056, 39096, 39136, 39176, 39216, 39256, +39296, 39336, 39376, 39416, 39456, 39496, 39536, 39576, 39616, 39656, 39696, 39736, 39776, 39816, 39856, 39896, +39936, 39976, 40016, 40056, 40096, 40136, 40176, 40216, 40256, 40296, 40336, 40376, 40416, 40456, 40496, 40536, +40576, 40616, 40656, 40696, 40736, 40776, 40816, 40856, 40896, 40936, 40976, 41016, 41056, 41096, 41136, 41176, +41216, 41256, 41296, 41336, 41376, 41416, 41456, 41496, 41536, 41576, 41616, 41656, 41696, 41736, 41776, 41816, +41856, 41896, 41936, 41976, 42016, 42056, 42096, 42136, 42176, 42216, 42256, 42296, 42336, 42376, 42416, 42456, +42496, 42536, 42576, 42616, 42656, 42696, 42736, 42776, 42816, 42856, 42896, 42936, 42976, 43016, 43056, 43096, +43136, 43176, 43216, 43256, 43296, 43336, 43376, 43416, 43456, 43496, 43536, 43576, 43616, 43656, 43696, 43736, +43776, 43816, 43856, 43896, 43936, 43976, 44016, 44056, 44096, 44136, 44176, 44216, 44256, 44296, 44336, 44376, +44416, 44456, 44496, 44536, 44576, 44616, 44656, 44696, 44736, 44776, 44816, 44856, 44896, 44936, 44976, 45016, +45056, 45096, 45136, 45176, 45216, 45256, 45296, 45336, 45376, 45416, 45456, 45496, 45536, 45576, 45616, 45656, +45696, 45736, 45776, 45816, 45856, 45896, 45936, 45976, 46016, 46056, 46096, 46136, 46176, 46216, 46256, 46296, +46336, 46376, 46416, 46456, 46496, 46536, 46576, 46616, 46656, 46696, 46736, 46776, 46816, 46856, 46896, 46936, +46976, 47016, 47056, 47096, 47136, 47176, 47216, 47256, 47296, 47336, 47376, 47416, 47456, 47496, 47536, 47576, +47616, 47656, 47696, 47736, 47776, 47816, 47856, 47896, 47936, 47976, 48016, 48056, 48096, 48136, 48176, 48216, +48256, 48296, 48336, 48376, 48416, 48456, 48496, 48536, 48576, 48616, 48656, 48696, 48736, 48776, 48816, 48856, +48896, 48936, 48976, 49016, 49056, 49096, 49136, 49176, 49216, 49256, 49296, 49336, 49376, 49416, 49456, 49496, +49536, 49576, 49616, 49656, 49696, 49736, 49776, 49816, 49856, 49896, 49936, 49976, 50016, 50056, 50096, 50136, +50176, 50216, 50256, 50296, 50336, 50376, 50416, 50456, 50496, 50536, 50576, 50616, 50656, 50696, 50736, 50776, +50816, 50856, 50896, 50936, 50976, 51016, 51056, 51096, 51136, 51176, 51216, 51256, 51296, 51336, 51376, 51416, +51456, 51496, 51536, 51576, 51616, 51656, 51696, 51736, 51776, 51816, 51856, 51896, 51936, 51976, 52016, 52056, +52096, 52136, 52176, 52216, 52256, 52296, 52336, 52376, 52416, 52456, 52496, 52536, 52576, 52616, 52656, 52696, +52736, 52776, 52816, 52856, 52896, 52936, 52976, 53016, 53056, 53096, 53136, 53176, 53216, 53256, 53296, 53336, +53376, 53416, 53456, 53496, 53536, 53576, 53616, 53656, 53696, 53736, 53776, 53816, 53856, 53896, 53936, 53976, +54016, 54056, 54096, 54136, 54176, 54216, 54256, 54296, 54336, 54376, 54416, 54456, 54496, 54536, 54576, 54616, +54656, 54696, 54736, 54776, 54816, 54856, 54896, 54936, 54976, 55016, 55056, 55096, 55136, 55176, 55216, 55256, +57344, 57384, 57424, 57464, 57504, 57544, 57584, 57624, 57664, 57704, 57744, 57784, 57824, 57864, 57904, 57944, +57984, 58024, 58064, 58104, 58144, 58184, 58224, 58264, 58304, 58344, 58384, 58424, 58464, 58504, 58544, 58584, +58624, 58664, 58704, 58744, 58784, 58824, 58864, 58904, 58944, 58984, 59024, 59064, 59104, 59144, 59184, 59224, +59264, 59304, 59344, 59384, 59424, 59464, 59504, 59544, 59584, 59624, 59664, 59704, 59744, 59784, 59824, 59864, +59904, 59944, 59984, 60024, 60064, 60104, 60144, 60184, 60224, 60264, 60304, 60344, 60384, 60424, 60464, 60504, +60544, 60584, 60624, 60664, 60704, 60744, 60784, 60824, 60864, 60904, 60944, 60984, 61024, 61064, 61104, 61144, +61184, 61224, 61264, 61304, 61344, 61384, 61424, 61464, 61504, 61544, 61584, 61624, 61664, 61704, 61744, 61784, +61824, 61864, 61904, 61944, 61984, 62024, 62064, 62104, 62144, 62184, 62224, 62264, 62304, 62344, 62384, 62424, +62464, 62504, 62544, 62584, 62624, 62664, 62704, 62744, 62784, 62824, 62864, 62904, 62944, 62984, 63024, 63064, +63104, 63144, 63184, 63224, 63264, 63304, 63344, 63384, 63424, 63464, 63504, 63544, 63584, 63624, 63664, 63704, +63744, 63784, 63824, 63864, 63904, 63944, 63984, 64024, 64064, 64104, 64144, 64184, 64224, 64264, 64304, 64344, +64384, 64424, 64464, 64504, 64544, 64584, 64624, 64664, 64704, 64744, 64784, 64824, 64864, 64904, 64944, 64984, +65024, 65064, 65104, 65144, 65184, 65224, 65264, 65304, 65344, 65384, 65424, 65464, 65504 + }); + + testBytes = theseBytes(new int[]{ +254, 255, 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, +0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, +0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, +0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, +0, 31, 0, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, +0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0, 44, 0, 45, 0, 46, +0, 47, 0, 48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0, 54, +0, 55, 0, 56, 0, 57, 0, 58, 0, 59, 0, 60, 0, 61, 0, 62, +0, 63, 0, 64, 0, 65, 0, 66, 0, 67, 0, 68, 0, 69, 0, 70, +0, 71, 0, 72, 0, 73, 0, 74, 0, 75, 0, 76, 0, 77, 0, 78, +0, 79, 0, 80, 0, 81, 0, 82, 0, 83, 0, 84, 0, 85, 0, 86, +0, 87, 0, 88, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, +0, 95, 0, 96, 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, +0, 103, 0, 104, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, 110, +0, 111, 0, 112, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, +0, 119, 0, 120, 0, 121, 0, 122, 0, 123, 0, 124, 0, 125, 0, 126, +0, 127, 0, 128, 0, 129, 0, 130, 0, 131, 0, 132, 0, 133, 0, 134, +0, 135, 0, 136, 0, 137, 0, 138, 0, 139, 0, 140, 0, 141, 0, 142, +0, 143, 0, 144, 0, 145, 0, 146, 0, 147, 0, 148, 0, 149, 0, 150, +0, 151, 0, 152, 0, 153, 0, 154, 0, 155, 0, 156, 0, 157, 0, 158, +0, 159, 0, 160, 0, 161, 0, 162, 0, 163, 0, 164, 0, 165, 0, 166, +0, 167, 0, 168, 0, 169, 0, 170, 0, 171, 0, 172, 0, 173, 0, 174, +0, 175, 0, 176, 0, 177, 0, 178, 0, 179, 0, 180, 0, 181, 0, 182, +0, 183, 0, 184, 0, 185, 0, 186, 0, 187, 0, 188, 0, 189, 0, 190, +0, 191, 0, 192, 0, 193, 0, 194, 0, 195, 0, 196, 0, 197, 0, 198, +0, 199, 0, 200, 0, 201, 0, 202, 0, 203, 0, 204, 0, 205, 0, 206, +0, 207, 0, 208, 0, 209, 0, 210, 0, 211, 0, 212, 0, 213, 0, 214, +0, 215, 0, 216, 0, 217, 0, 218, 0, 219, 0, 220, 0, 221, 0, 222, +0, 223, 0, 224, 0, 225, 0, 226, 0, 227, 0, 228, 0, 229, 0, 230, +0, 231, 0, 232, 0, 233, 0, 234, 0, 235, 0, 236, 0, 237, 0, 238, +0, 239, 0, 240, 0, 241, 0, 242, 0, 243, 0, 244, 0, 245, 0, 246, +0, 247, 0, 248, 0, 249, 0, 250, 0, 251, 0, 252, 0, 253, 0, 254, +0, 255, 1, 0, 1, 40, 1, 80, 1, 120, 1, 160, 1, 200, 1, 240, +2, 24, 2, 64, 2, 104, 2, 144, 2, 184, 2, 224, 3, 8, 3, 48, +3, 88, 3, 128, 3, 168, 3, 208, 3, 248, 4, 32, 4, 72, 4, 112, +4, 152, 4, 192, 4, 232, 5, 16, 5, 56, 5, 96, 5, 136, 5, 176, +5, 216, 6, 0, 6, 40, 6, 80, 6, 120, 6, 160, 6, 200, 6, 240, +7, 24, 7, 64, 7, 104, 7, 144, 7, 184, 7, 224, 8, 8, 8, 48, +8, 88, 8, 128, 8, 168, 8, 208, 8, 248, 9, 32, 9, 72, 9, 112, +9, 152, 9, 192, 9, 232, 10, 16, 10, 56, 10, 96, 10, 136, 10, 176, +10, 216, 11, 0, 11, 40, 11, 80, 11, 120, 11, 160, 11, 200, 11, 240, +12, 24, 12, 64, 12, 104, 12, 144, 12, 184, 12, 224, 13, 8, 13, 48, +13, 88, 13, 128, 13, 168, 13, 208, 13, 248, 14, 32, 14, 72, 14, 112, +14, 152, 14, 192, 14, 232, 15, 16, 15, 56, 15, 96, 15, 136, 15, 176, +15, 216, 16, 0, 16, 40, 16, 80, 16, 120, 16, 160, 16, 200, 16, 240, +17, 24, 17, 64, 17, 104, 17, 144, 17, 184, 17, 224, 18, 8, 18, 48, +18, 88, 18, 128, 18, 168, 18, 208, 18, 248, 19, 32, 19, 72, 19, 112, +19, 152, 19, 192, 19, 232, 20, 16, 20, 56, 20, 96, 20, 136, 20, 176, +20, 216, 21, 0, 21, 40, 21, 80, 21, 120, 21, 160, 21, 200, 21, 240, +22, 24, 22, 64, 22, 104, 22, 144, 22, 184, 22, 224, 23, 8, 23, 48, +23, 88, 23, 128, 23, 168, 23, 208, 23, 248, 24, 32, 24, 72, 24, 112, +24, 152, 24, 192, 24, 232, 25, 16, 25, 56, 25, 96, 25, 136, 25, 176, +25, 216, 26, 0, 26, 40, 26, 80, 26, 120, 26, 160, 26, 200, 26, 240, +27, 24, 27, 64, 27, 104, 27, 144, 27, 184, 27, 224, 28, 8, 28, 48, +28, 88, 28, 128, 28, 168, 28, 208, 28, 248, 29, 32, 29, 72, 29, 112, +29, 152, 29, 192, 29, 232, 30, 16, 30, 56, 30, 96, 30, 136, 30, 176, +30, 216, 31, 0, 31, 40, 31, 80, 31, 120, 31, 160, 31, 200, 31, 240, +32, 24, 32, 64, 32, 104, 32, 144, 32, 184, 32, 224, 33, 8, 33, 48, +33, 88, 33, 128, 33, 168, 33, 208, 33, 248, 34, 32, 34, 72, 34, 112, +34, 152, 34, 192, 34, 232, 35, 16, 35, 56, 35, 96, 35, 136, 35, 176, +35, 216, 36, 0, 36, 40, 36, 80, 36, 120, 36, 160, 36, 200, 36, 240, +37, 24, 37, 64, 37, 104, 37, 144, 37, 184, 37, 224, 38, 8, 38, 48, +38, 88, 38, 128, 38, 168, 38, 208, 38, 248, 39, 32, 39, 72, 39, 112, +39, 152, 39, 192, 39, 232, 40, 16, 40, 56, 40, 96, 40, 136, 40, 176, +40, 216, 41, 0, 41, 40, 41, 80, 41, 120, 41, 160, 41, 200, 41, 240, +42, 24, 42, 64, 42, 104, 42, 144, 42, 184, 42, 224, 43, 8, 43, 48, +43, 88, 43, 128, 43, 168, 43, 208, 43, 248, 44, 32, 44, 72, 44, 112, +44, 152, 44, 192, 44, 232, 45, 16, 45, 56, 45, 96, 45, 136, 45, 176, +45, 216, 46, 0, 46, 40, 46, 80, 46, 120, 46, 160, 46, 200, 46, 240, +47, 24, 47, 64, 47, 104, 47, 144, 47, 184, 47, 224, 48, 8, 48, 48, +48, 88, 48, 128, 48, 168, 48, 208, 48, 248, 49, 32, 49, 72, 49, 112, +49, 152, 49, 192, 49, 232, 50, 16, 50, 56, 50, 96, 50, 136, 50, 176, +50, 216, 51, 0, 51, 40, 51, 80, 51, 120, 51, 160, 51, 200, 51, 240, +52, 24, 52, 64, 52, 104, 52, 144, 52, 184, 52, 224, 53, 8, 53, 48, +53, 88, 53, 128, 53, 168, 53, 208, 53, 248, 54, 32, 54, 72, 54, 112, +54, 152, 54, 192, 54, 232, 55, 16, 55, 56, 55, 96, 55, 136, 55, 176, +55, 216, 56, 0, 56, 40, 56, 80, 56, 120, 56, 160, 56, 200, 56, 240, +57, 24, 57, 64, 57, 104, 57, 144, 57, 184, 57, 224, 58, 8, 58, 48, +58, 88, 58, 128, 58, 168, 58, 208, 58, 248, 59, 32, 59, 72, 59, 112, +59, 152, 59, 192, 59, 232, 60, 16, 60, 56, 60, 96, 60, 136, 60, 176, +60, 216, 61, 0, 61, 40, 61, 80, 61, 120, 61, 160, 61, 200, 61, 240, +62, 24, 62, 64, 62, 104, 62, 144, 62, 184, 62, 224, 63, 8, 63, 48, +63, 88, 63, 128, 63, 168, 63, 208, 63, 248, 64, 32, 64, 72, 64, 112, +64, 152, 64, 192, 64, 232, 65, 16, 65, 56, 65, 96, 65, 136, 65, 176, +65, 216, 66, 0, 66, 40, 66, 80, 66, 120, 66, 160, 66, 200, 66, 240, +67, 24, 67, 64, 67, 104, 67, 144, 67, 184, 67, 224, 68, 8, 68, 48, +68, 88, 68, 128, 68, 168, 68, 208, 68, 248, 69, 32, 69, 72, 69, 112, +69, 152, 69, 192, 69, 232, 70, 16, 70, 56, 70, 96, 70, 136, 70, 176, +70, 216, 71, 0, 71, 40, 71, 80, 71, 120, 71, 160, 71, 200, 71, 240, +72, 24, 72, 64, 72, 104, 72, 144, 72, 184, 72, 224, 73, 8, 73, 48, +73, 88, 73, 128, 73, 168, 73, 208, 73, 248, 74, 32, 74, 72, 74, 112, +74, 152, 74, 192, 74, 232, 75, 16, 75, 56, 75, 96, 75, 136, 75, 176, +75, 216, 76, 0, 76, 40, 76, 80, 76, 120, 76, 160, 76, 200, 76, 240, +77, 24, 77, 64, 77, 104, 77, 144, 77, 184, 77, 224, 78, 8, 78, 48, +78, 88, 78, 128, 78, 168, 78, 208, 78, 248, 79, 32, 79, 72, 79, 112, +79, 152, 79, 192, 79, 232, 80, 16, 80, 56, 80, 96, 80, 136, 80, 176, +80, 216, 81, 0, 81, 40, 81, 80, 81, 120, 81, 160, 81, 200, 81, 240, +82, 24, 82, 64, 82, 104, 82, 144, 82, 184, 82, 224, 83, 8, 83, 48, +83, 88, 83, 128, 83, 168, 83, 208, 83, 248, 84, 32, 84, 72, 84, 112, +84, 152, 84, 192, 84, 232, 85, 16, 85, 56, 85, 96, 85, 136, 85, 176, +85, 216, 86, 0, 86, 40, 86, 80, 86, 120, 86, 160, 86, 200, 86, 240, +87, 24, 87, 64, 87, 104, 87, 144, 87, 184, 87, 224, 88, 8, 88, 48, +88, 88, 88, 128, 88, 168, 88, 208, 88, 248, 89, 32, 89, 72, 89, 112, +89, 152, 89, 192, 89, 232, 90, 16, 90, 56, 90, 96, 90, 136, 90, 176, +90, 216, 91, 0, 91, 40, 91, 80, 91, 120, 91, 160, 91, 200, 91, 240, +92, 24, 92, 64, 92, 104, 92, 144, 92, 184, 92, 224, 93, 8, 93, 48, +93, 88, 93, 128, 93, 168, 93, 208, 93, 248, 94, 32, 94, 72, 94, 112, +94, 152, 94, 192, 94, 232, 95, 16, 95, 56, 95, 96, 95, 136, 95, 176, +95, 216, 96, 0, 96, 40, 96, 80, 96, 120, 96, 160, 96, 200, 96, 240, +97, 24, 97, 64, 97, 104, 97, 144, 97, 184, 97, 224, 98, 8, 98, 48, +98, 88, 98, 128, 98, 168, 98, 208, 98, 248, 99, 32, 99, 72, 99, 112, +99, 152, 99, 192, 99, 232, 100, 16, 100, 56, 100, 96, 100, 136, 100, 176, +100, 216, 101, 0, 101, 40, 101, 80, 101, 120, 101, 160, 101, 200, 101, 240, +102, 24, 102, 64, 102, 104, 102, 144, 102, 184, 102, 224, 103, 8, 103, 48, +103, 88, 103, 128, 103, 168, 103, 208, 103, 248, 104, 32, 104, 72, 104, 112, +104, 152, 104, 192, 104, 232, 105, 16, 105, 56, 105, 96, 105, 136, 105, 176, +105, 216, 106, 0, 106, 40, 106, 80, 106, 120, 106, 160, 106, 200, 106, 240, +107, 24, 107, 64, 107, 104, 107, 144, 107, 184, 107, 224, 108, 8, 108, 48, +108, 88, 108, 128, 108, 168, 108, 208, 108, 248, 109, 32, 109, 72, 109, 112, +109, 152, 109, 192, 109, 232, 110, 16, 110, 56, 110, 96, 110, 136, 110, 176, +110, 216, 111, 0, 111, 40, 111, 80, 111, 120, 111, 160, 111, 200, 111, 240, +112, 24, 112, 64, 112, 104, 112, 144, 112, 184, 112, 224, 113, 8, 113, 48, +113, 88, 113, 128, 113, 168, 113, 208, 113, 248, 114, 32, 114, 72, 114, 112, +114, 152, 114, 192, 114, 232, 115, 16, 115, 56, 115, 96, 115, 136, 115, 176, +115, 216, 116, 0, 116, 40, 116, 80, 116, 120, 116, 160, 116, 200, 116, 240, +117, 24, 117, 64, 117, 104, 117, 144, 117, 184, 117, 224, 118, 8, 118, 48, +118, 88, 118, 128, 118, 168, 118, 208, 118, 248, 119, 32, 119, 72, 119, 112, +119, 152, 119, 192, 119, 232, 120, 16, 120, 56, 120, 96, 120, 136, 120, 176, +120, 216, 121, 0, 121, 40, 121, 80, 121, 120, 121, 160, 121, 200, 121, 240, +122, 24, 122, 64, 122, 104, 122, 144, 122, 184, 122, 224, 123, 8, 123, 48, +123, 88, 123, 128, 123, 168, 123, 208, 123, 248, 124, 32, 124, 72, 124, 112, +124, 152, 124, 192, 124, 232, 125, 16, 125, 56, 125, 96, 125, 136, 125, 176, +125, 216, 126, 0, 126, 40, 126, 80, 126, 120, 126, 160, 126, 200, 126, 240, +127, 24, 127, 64, 127, 104, 127, 144, 127, 184, 127, 224, 128, 8, 128, 48, +128, 88, 128, 128, 128, 168, 128, 208, 128, 248, 129, 32, 129, 72, 129, 112, +129, 152, 129, 192, 129, 232, 130, 16, 130, 56, 130, 96, 130, 136, 130, 176, +130, 216, 131, 0, 131, 40, 131, 80, 131, 120, 131, 160, 131, 200, 131, 240, +132, 24, 132, 64, 132, 104, 132, 144, 132, 184, 132, 224, 133, 8, 133, 48, +133, 88, 133, 128, 133, 168, 133, 208, 133, 248, 134, 32, 134, 72, 134, 112, +134, 152, 134, 192, 134, 232, 135, 16, 135, 56, 135, 96, 135, 136, 135, 176, +135, 216, 136, 0, 136, 40, 136, 80, 136, 120, 136, 160, 136, 200, 136, 240, +137, 24, 137, 64, 137, 104, 137, 144, 137, 184, 137, 224, 138, 8, 138, 48, +138, 88, 138, 128, 138, 168, 138, 208, 138, 248, 139, 32, 139, 72, 139, 112, +139, 152, 139, 192, 139, 232, 140, 16, 140, 56, 140, 96, 140, 136, 140, 176, +140, 216, 141, 0, 141, 40, 141, 80, 141, 120, 141, 160, 141, 200, 141, 240, +142, 24, 142, 64, 142, 104, 142, 144, 142, 184, 142, 224, 143, 8, 143, 48, +143, 88, 143, 128, 143, 168, 143, 208, 143, 248, 144, 32, 144, 72, 144, 112, +144, 152, 144, 192, 144, 232, 145, 16, 145, 56, 145, 96, 145, 136, 145, 176, +145, 216, 146, 0, 146, 40, 146, 80, 146, 120, 146, 160, 146, 200, 146, 240, +147, 24, 147, 64, 147, 104, 147, 144, 147, 184, 147, 224, 148, 8, 148, 48, +148, 88, 148, 128, 148, 168, 148, 208, 148, 248, 149, 32, 149, 72, 149, 112, +149, 152, 149, 192, 149, 232, 150, 16, 150, 56, 150, 96, 150, 136, 150, 176, +150, 216, 151, 0, 151, 40, 151, 80, 151, 120, 151, 160, 151, 200, 151, 240, +152, 24, 152, 64, 152, 104, 152, 144, 152, 184, 152, 224, 153, 8, 153, 48, +153, 88, 153, 128, 153, 168, 153, 208, 153, 248, 154, 32, 154, 72, 154, 112, +154, 152, 154, 192, 154, 232, 155, 16, 155, 56, 155, 96, 155, 136, 155, 176, +155, 216, 156, 0, 156, 40, 156, 80, 156, 120, 156, 160, 156, 200, 156, 240, +157, 24, 157, 64, 157, 104, 157, 144, 157, 184, 157, 224, 158, 8, 158, 48, +158, 88, 158, 128, 158, 168, 158, 208, 158, 248, 159, 32, 159, 72, 159, 112, +159, 152, 159, 192, 159, 232, 160, 16, 160, 56, 160, 96, 160, 136, 160, 176, +160, 216, 161, 0, 161, 40, 161, 80, 161, 120, 161, 160, 161, 200, 161, 240, +162, 24, 162, 64, 162, 104, 162, 144, 162, 184, 162, 224, 163, 8, 163, 48, +163, 88, 163, 128, 163, 168, 163, 208, 163, 248, 164, 32, 164, 72, 164, 112, +164, 152, 164, 192, 164, 232, 165, 16, 165, 56, 165, 96, 165, 136, 165, 176, +165, 216, 166, 0, 166, 40, 166, 80, 166, 120, 166, 160, 166, 200, 166, 240, +167, 24, 167, 64, 167, 104, 167, 144, 167, 184, 167, 224, 168, 8, 168, 48, +168, 88, 168, 128, 168, 168, 168, 208, 168, 248, 169, 32, 169, 72, 169, 112, +169, 152, 169, 192, 169, 232, 170, 16, 170, 56, 170, 96, 170, 136, 170, 176, +170, 216, 171, 0, 171, 40, 171, 80, 171, 120, 171, 160, 171, 200, 171, 240, +172, 24, 172, 64, 172, 104, 172, 144, 172, 184, 172, 224, 173, 8, 173, 48, +173, 88, 173, 128, 173, 168, 173, 208, 173, 248, 174, 32, 174, 72, 174, 112, +174, 152, 174, 192, 174, 232, 175, 16, 175, 56, 175, 96, 175, 136, 175, 176, +175, 216, 176, 0, 176, 40, 176, 80, 176, 120, 176, 160, 176, 200, 176, 240, +177, 24, 177, 64, 177, 104, 177, 144, 177, 184, 177, 224, 178, 8, 178, 48, +178, 88, 178, 128, 178, 168, 178, 208, 178, 248, 179, 32, 179, 72, 179, 112, +179, 152, 179, 192, 179, 232, 180, 16, 180, 56, 180, 96, 180, 136, 180, 176, +180, 216, 181, 0, 181, 40, 181, 80, 181, 120, 181, 160, 181, 200, 181, 240, +182, 24, 182, 64, 182, 104, 182, 144, 182, 184, 182, 224, 183, 8, 183, 48, +183, 88, 183, 128, 183, 168, 183, 208, 183, 248, 184, 32, 184, 72, 184, 112, +184, 152, 184, 192, 184, 232, 185, 16, 185, 56, 185, 96, 185, 136, 185, 176, +185, 216, 186, 0, 186, 40, 186, 80, 186, 120, 186, 160, 186, 200, 186, 240, +187, 24, 187, 64, 187, 104, 187, 144, 187, 184, 187, 224, 188, 8, 188, 48, +188, 88, 188, 128, 188, 168, 188, 208, 188, 248, 189, 32, 189, 72, 189, 112, +189, 152, 189, 192, 189, 232, 190, 16, 190, 56, 190, 96, 190, 136, 190, 176, +190, 216, 191, 0, 191, 40, 191, 80, 191, 120, 191, 160, 191, 200, 191, 240, +192, 24, 192, 64, 192, 104, 192, 144, 192, 184, 192, 224, 193, 8, 193, 48, +193, 88, 193, 128, 193, 168, 193, 208, 193, 248, 194, 32, 194, 72, 194, 112, +194, 152, 194, 192, 194, 232, 195, 16, 195, 56, 195, 96, 195, 136, 195, 176, +195, 216, 196, 0, 196, 40, 196, 80, 196, 120, 196, 160, 196, 200, 196, 240, +197, 24, 197, 64, 197, 104, 197, 144, 197, 184, 197, 224, 198, 8, 198, 48, +198, 88, 198, 128, 198, 168, 198, 208, 198, 248, 199, 32, 199, 72, 199, 112, +199, 152, 199, 192, 199, 232, 200, 16, 200, 56, 200, 96, 200, 136, 200, 176, +200, 216, 201, 0, 201, 40, 201, 80, 201, 120, 201, 160, 201, 200, 201, 240, +202, 24, 202, 64, 202, 104, 202, 144, 202, 184, 202, 224, 203, 8, 203, 48, +203, 88, 203, 128, 203, 168, 203, 208, 203, 248, 204, 32, 204, 72, 204, 112, +204, 152, 204, 192, 204, 232, 205, 16, 205, 56, 205, 96, 205, 136, 205, 176, +205, 216, 206, 0, 206, 40, 206, 80, 206, 120, 206, 160, 206, 200, 206, 240, +207, 24, 207, 64, 207, 104, 207, 144, 207, 184, 207, 224, 208, 8, 208, 48, +208, 88, 208, 128, 208, 168, 208, 208, 208, 248, 209, 32, 209, 72, 209, 112, +209, 152, 209, 192, 209, 232, 210, 16, 210, 56, 210, 96, 210, 136, 210, 176, +210, 216, 211, 0, 211, 40, 211, 80, 211, 120, 211, 160, 211, 200, 211, 240, +212, 24, 212, 64, 212, 104, 212, 144, 212, 184, 212, 224, 213, 8, 213, 48, +213, 88, 213, 128, 213, 168, 213, 208, 213, 248, 214, 32, 214, 72, 214, 112, +214, 152, 214, 192, 214, 232, 215, 16, 215, 56, 215, 96, 215, 136, 215, 176, +215, 216, 224, 0, 224, 40, 224, 80, 224, 120, 224, 160, 224, 200, 224, 240, +225, 24, 225, 64, 225, 104, 225, 144, 225, 184, 225, 224, 226, 8, 226, 48, +226, 88, 226, 128, 226, 168, 226, 208, 226, 248, 227, 32, 227, 72, 227, 112, +227, 152, 227, 192, 227, 232, 228, 16, 228, 56, 228, 96, 228, 136, 228, 176, +228, 216, 229, 0, 229, 40, 229, 80, 229, 120, 229, 160, 229, 200, 229, 240, +230, 24, 230, 64, 230, 104, 230, 144, 230, 184, 230, 224, 231, 8, 231, 48, +231, 88, 231, 128, 231, 168, 231, 208, 231, 248, 232, 32, 232, 72, 232, 112, +232, 152, 232, 192, 232, 232, 233, 16, 233, 56, 233, 96, 233, 136, 233, 176, +233, 216, 234, 0, 234, 40, 234, 80, 234, 120, 234, 160, 234, 200, 234, 240, +235, 24, 235, 64, 235, 104, 235, 144, 235, 184, 235, 224, 236, 8, 236, 48, +236, 88, 236, 128, 236, 168, 236, 208, 236, 248, 237, 32, 237, 72, 237, 112, +237, 152, 237, 192, 237, 232, 238, 16, 238, 56, 238, 96, 238, 136, 238, 176, +238, 216, 239, 0, 239, 40, 239, 80, 239, 120, 239, 160, 239, 200, 239, 240, +240, 24, 240, 64, 240, 104, 240, 144, 240, 184, 240, 224, 241, 8, 241, 48, +241, 88, 241, 128, 241, 168, 241, 208, 241, 248, 242, 32, 242, 72, 242, 112, +242, 152, 242, 192, 242, 232, 243, 16, 243, 56, 243, 96, 243, 136, 243, 176, +243, 216, 244, 0, 244, 40, 244, 80, 244, 120, 244, 160, 244, 200, 244, 240, +245, 24, 245, 64, 245, 104, 245, 144, 245, 184, 245, 224, 246, 8, 246, 48, +246, 88, 246, 128, 246, 168, 246, 208, 246, 248, 247, 32, 247, 72, 247, 112, +247, 152, 247, 192, 247, 232, 248, 16, 248, 56, 248, 96, 248, 136, 248, 176, +248, 216, 249, 0, 249, 40, 249, 80, 249, 120, 249, 160, 249, 200, 249, 240, +250, 24, 250, 64, 250, 104, 250, 144, 250, 184, 250, 224, 251, 8, 251, 48, +251, 88, 251, 128, 251, 168, 251, 208, 251, 248, 252, 32, 252, 72, 252, 112, +252, 152, 252, 192, 252, 232, 253, 16, 253, 56, 253, 96, 253, 136, 253, 176, +253, 216, 254, 0, 254, 40, 254, 80, 254, 120, 254, 160, 254, 200, 254, 240, +255, 24, 255, 64, 255, 104, 255, 144, 255, 184, 255, 224 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16BE.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16BE.java new file mode 100644 index 0000000..2139061 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16BE.java @@ -0,0 +1,394 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.UTF_16BE.class) + +public class Charset_MultiByte_UTF_16BE extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "UTF-16BE"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, +176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, +192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, +208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, +224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, +240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, +256, 296, 336, 376, 416, 456, 496, 536, 576, 616, 656, 696, 736, 776, 816, 856, +896, 936, 976, 1016, 1056, 1096, 1136, 1176, 1216, 1256, 1296, 1336, 1376, 1416, 1456, 1496, +1536, 1576, 1616, 1656, 1696, 1736, 1776, 1816, 1856, 1896, 1936, 1976, 2016, 2056, 2096, 2136, +2176, 2216, 2256, 2296, 2336, 2376, 2416, 2456, 2496, 2536, 2576, 2616, 2656, 2696, 2736, 2776, +2816, 2856, 2896, 2936, 2976, 3016, 3056, 3096, 3136, 3176, 3216, 3256, 3296, 3336, 3376, 3416, +3456, 3496, 3536, 3576, 3616, 3656, 3696, 3736, 3776, 3816, 3856, 3896, 3936, 3976, 4016, 4056, +4096, 4136, 4176, 4216, 4256, 4296, 4336, 4376, 4416, 4456, 4496, 4536, 4576, 4616, 4656, 4696, +4736, 4776, 4816, 4856, 4896, 4936, 4976, 5016, 5056, 5096, 5136, 5176, 5216, 5256, 5296, 5336, +5376, 5416, 5456, 5496, 5536, 5576, 5616, 5656, 5696, 5736, 5776, 5816, 5856, 5896, 5936, 5976, +6016, 6056, 6096, 6136, 6176, 6216, 6256, 6296, 6336, 6376, 6416, 6456, 6496, 6536, 6576, 6616, +6656, 6696, 6736, 6776, 6816, 6856, 6896, 6936, 6976, 7016, 7056, 7096, 7136, 7176, 7216, 7256, +7296, 7336, 7376, 7416, 7456, 7496, 7536, 7576, 7616, 7656, 7696, 7736, 7776, 7816, 7856, 7896, +7936, 7976, 8016, 8056, 8096, 8136, 8176, 8216, 8256, 8296, 8336, 8376, 8416, 8456, 8496, 8536, +8576, 8616, 8656, 8696, 8736, 8776, 8816, 8856, 8896, 8936, 8976, 9016, 9056, 9096, 9136, 9176, +9216, 9256, 9296, 9336, 9376, 9416, 9456, 9496, 9536, 9576, 9616, 9656, 9696, 9736, 9776, 9816, +9856, 9896, 9936, 9976, 10016, 10056, 10096, 10136, 10176, 10216, 10256, 10296, 10336, 10376, 10416, 10456, +10496, 10536, 10576, 10616, 10656, 10696, 10736, 10776, 10816, 10856, 10896, 10936, 10976, 11016, 11056, 11096, +11136, 11176, 11216, 11256, 11296, 11336, 11376, 11416, 11456, 11496, 11536, 11576, 11616, 11656, 11696, 11736, +11776, 11816, 11856, 11896, 11936, 11976, 12016, 12056, 12096, 12136, 12176, 12216, 12256, 12296, 12336, 12376, +12416, 12456, 12496, 12536, 12576, 12616, 12656, 12696, 12736, 12776, 12816, 12856, 12896, 12936, 12976, 13016, +13056, 13096, 13136, 13176, 13216, 13256, 13296, 13336, 13376, 13416, 13456, 13496, 13536, 13576, 13616, 13656, +13696, 13736, 13776, 13816, 13856, 13896, 13936, 13976, 14016, 14056, 14096, 14136, 14176, 14216, 14256, 14296, +14336, 14376, 14416, 14456, 14496, 14536, 14576, 14616, 14656, 14696, 14736, 14776, 14816, 14856, 14896, 14936, +14976, 15016, 15056, 15096, 15136, 15176, 15216, 15256, 15296, 15336, 15376, 15416, 15456, 15496, 15536, 15576, +15616, 15656, 15696, 15736, 15776, 15816, 15856, 15896, 15936, 15976, 16016, 16056, 16096, 16136, 16176, 16216, +16256, 16296, 16336, 16376, 16416, 16456, 16496, 16536, 16576, 16616, 16656, 16696, 16736, 16776, 16816, 16856, +16896, 16936, 16976, 17016, 17056, 17096, 17136, 17176, 17216, 17256, 17296, 17336, 17376, 17416, 17456, 17496, +17536, 17576, 17616, 17656, 17696, 17736, 17776, 17816, 17856, 17896, 17936, 17976, 18016, 18056, 18096, 18136, +18176, 18216, 18256, 18296, 18336, 18376, 18416, 18456, 18496, 18536, 18576, 18616, 18656, 18696, 18736, 18776, +18816, 18856, 18896, 18936, 18976, 19016, 19056, 19096, 19136, 19176, 19216, 19256, 19296, 19336, 19376, 19416, +19456, 19496, 19536, 19576, 19616, 19656, 19696, 19736, 19776, 19816, 19856, 19896, 19936, 19976, 20016, 20056, +20096, 20136, 20176, 20216, 20256, 20296, 20336, 20376, 20416, 20456, 20496, 20536, 20576, 20616, 20656, 20696, +20736, 20776, 20816, 20856, 20896, 20936, 20976, 21016, 21056, 21096, 21136, 21176, 21216, 21256, 21296, 21336, +21376, 21416, 21456, 21496, 21536, 21576, 21616, 21656, 21696, 21736, 21776, 21816, 21856, 21896, 21936, 21976, +22016, 22056, 22096, 22136, 22176, 22216, 22256, 22296, 22336, 22376, 22416, 22456, 22496, 22536, 22576, 22616, +22656, 22696, 22736, 22776, 22816, 22856, 22896, 22936, 22976, 23016, 23056, 23096, 23136, 23176, 23216, 23256, +23296, 23336, 23376, 23416, 23456, 23496, 23536, 23576, 23616, 23656, 23696, 23736, 23776, 23816, 23856, 23896, +23936, 23976, 24016, 24056, 24096, 24136, 24176, 24216, 24256, 24296, 24336, 24376, 24416, 24456, 24496, 24536, +24576, 24616, 24656, 24696, 24736, 24776, 24816, 24856, 24896, 24936, 24976, 25016, 25056, 25096, 25136, 25176, +25216, 25256, 25296, 25336, 25376, 25416, 25456, 25496, 25536, 25576, 25616, 25656, 25696, 25736, 25776, 25816, +25856, 25896, 25936, 25976, 26016, 26056, 26096, 26136, 26176, 26216, 26256, 26296, 26336, 26376, 26416, 26456, +26496, 26536, 26576, 26616, 26656, 26696, 26736, 26776, 26816, 26856, 26896, 26936, 26976, 27016, 27056, 27096, +27136, 27176, 27216, 27256, 27296, 27336, 27376, 27416, 27456, 27496, 27536, 27576, 27616, 27656, 27696, 27736, +27776, 27816, 27856, 27896, 27936, 27976, 28016, 28056, 28096, 28136, 28176, 28216, 28256, 28296, 28336, 28376, +28416, 28456, 28496, 28536, 28576, 28616, 28656, 28696, 28736, 28776, 28816, 28856, 28896, 28936, 28976, 29016, +29056, 29096, 29136, 29176, 29216, 29256, 29296, 29336, 29376, 29416, 29456, 29496, 29536, 29576, 29616, 29656, +29696, 29736, 29776, 29816, 29856, 29896, 29936, 29976, 30016, 30056, 30096, 30136, 30176, 30216, 30256, 30296, +30336, 30376, 30416, 30456, 30496, 30536, 30576, 30616, 30656, 30696, 30736, 30776, 30816, 30856, 30896, 30936, +30976, 31016, 31056, 31096, 31136, 31176, 31216, 31256, 31296, 31336, 31376, 31416, 31456, 31496, 31536, 31576, +31616, 31656, 31696, 31736, 31776, 31816, 31856, 31896, 31936, 31976, 32016, 32056, 32096, 32136, 32176, 32216, +32256, 32296, 32336, 32376, 32416, 32456, 32496, 32536, 32576, 32616, 32656, 32696, 32736, 32776, 32816, 32856, +32896, 32936, 32976, 33016, 33056, 33096, 33136, 33176, 33216, 33256, 33296, 33336, 33376, 33416, 33456, 33496, +33536, 33576, 33616, 33656, 33696, 33736, 33776, 33816, 33856, 33896, 33936, 33976, 34016, 34056, 34096, 34136, +34176, 34216, 34256, 34296, 34336, 34376, 34416, 34456, 34496, 34536, 34576, 34616, 34656, 34696, 34736, 34776, +34816, 34856, 34896, 34936, 34976, 35016, 35056, 35096, 35136, 35176, 35216, 35256, 35296, 35336, 35376, 35416, +35456, 35496, 35536, 35576, 35616, 35656, 35696, 35736, 35776, 35816, 35856, 35896, 35936, 35976, 36016, 36056, +36096, 36136, 36176, 36216, 36256, 36296, 36336, 36376, 36416, 36456, 36496, 36536, 36576, 36616, 36656, 36696, +36736, 36776, 36816, 36856, 36896, 36936, 36976, 37016, 37056, 37096, 37136, 37176, 37216, 37256, 37296, 37336, +37376, 37416, 37456, 37496, 37536, 37576, 37616, 37656, 37696, 37736, 37776, 37816, 37856, 37896, 37936, 37976, +38016, 38056, 38096, 38136, 38176, 38216, 38256, 38296, 38336, 38376, 38416, 38456, 38496, 38536, 38576, 38616, +38656, 38696, 38736, 38776, 38816, 38856, 38896, 38936, 38976, 39016, 39056, 39096, 39136, 39176, 39216, 39256, +39296, 39336, 39376, 39416, 39456, 39496, 39536, 39576, 39616, 39656, 39696, 39736, 39776, 39816, 39856, 39896, +39936, 39976, 40016, 40056, 40096, 40136, 40176, 40216, 40256, 40296, 40336, 40376, 40416, 40456, 40496, 40536, +40576, 40616, 40656, 40696, 40736, 40776, 40816, 40856, 40896, 40936, 40976, 41016, 41056, 41096, 41136, 41176, +41216, 41256, 41296, 41336, 41376, 41416, 41456, 41496, 41536, 41576, 41616, 41656, 41696, 41736, 41776, 41816, +41856, 41896, 41936, 41976, 42016, 42056, 42096, 42136, 42176, 42216, 42256, 42296, 42336, 42376, 42416, 42456, +42496, 42536, 42576, 42616, 42656, 42696, 42736, 42776, 42816, 42856, 42896, 42936, 42976, 43016, 43056, 43096, +43136, 43176, 43216, 43256, 43296, 43336, 43376, 43416, 43456, 43496, 43536, 43576, 43616, 43656, 43696, 43736, +43776, 43816, 43856, 43896, 43936, 43976, 44016, 44056, 44096, 44136, 44176, 44216, 44256, 44296, 44336, 44376, +44416, 44456, 44496, 44536, 44576, 44616, 44656, 44696, 44736, 44776, 44816, 44856, 44896, 44936, 44976, 45016, +45056, 45096, 45136, 45176, 45216, 45256, 45296, 45336, 45376, 45416, 45456, 45496, 45536, 45576, 45616, 45656, +45696, 45736, 45776, 45816, 45856, 45896, 45936, 45976, 46016, 46056, 46096, 46136, 46176, 46216, 46256, 46296, +46336, 46376, 46416, 46456, 46496, 46536, 46576, 46616, 46656, 46696, 46736, 46776, 46816, 46856, 46896, 46936, +46976, 47016, 47056, 47096, 47136, 47176, 47216, 47256, 47296, 47336, 47376, 47416, 47456, 47496, 47536, 47576, +47616, 47656, 47696, 47736, 47776, 47816, 47856, 47896, 47936, 47976, 48016, 48056, 48096, 48136, 48176, 48216, +48256, 48296, 48336, 48376, 48416, 48456, 48496, 48536, 48576, 48616, 48656, 48696, 48736, 48776, 48816, 48856, +48896, 48936, 48976, 49016, 49056, 49096, 49136, 49176, 49216, 49256, 49296, 49336, 49376, 49416, 49456, 49496, +49536, 49576, 49616, 49656, 49696, 49736, 49776, 49816, 49856, 49896, 49936, 49976, 50016, 50056, 50096, 50136, +50176, 50216, 50256, 50296, 50336, 50376, 50416, 50456, 50496, 50536, 50576, 50616, 50656, 50696, 50736, 50776, +50816, 50856, 50896, 50936, 50976, 51016, 51056, 51096, 51136, 51176, 51216, 51256, 51296, 51336, 51376, 51416, +51456, 51496, 51536, 51576, 51616, 51656, 51696, 51736, 51776, 51816, 51856, 51896, 51936, 51976, 52016, 52056, +52096, 52136, 52176, 52216, 52256, 52296, 52336, 52376, 52416, 52456, 52496, 52536, 52576, 52616, 52656, 52696, +52736, 52776, 52816, 52856, 52896, 52936, 52976, 53016, 53056, 53096, 53136, 53176, 53216, 53256, 53296, 53336, +53376, 53416, 53456, 53496, 53536, 53576, 53616, 53656, 53696, 53736, 53776, 53816, 53856, 53896, 53936, 53976, +54016, 54056, 54096, 54136, 54176, 54216, 54256, 54296, 54336, 54376, 54416, 54456, 54496, 54536, 54576, 54616, +54656, 54696, 54736, 54776, 54816, 54856, 54896, 54936, 54976, 55016, 55056, 55096, 55136, 55176, 55216, 55256, +57344, 57384, 57424, 57464, 57504, 57544, 57584, 57624, 57664, 57704, 57744, 57784, 57824, 57864, 57904, 57944, +57984, 58024, 58064, 58104, 58144, 58184, 58224, 58264, 58304, 58344, 58384, 58424, 58464, 58504, 58544, 58584, +58624, 58664, 58704, 58744, 58784, 58824, 58864, 58904, 58944, 58984, 59024, 59064, 59104, 59144, 59184, 59224, +59264, 59304, 59344, 59384, 59424, 59464, 59504, 59544, 59584, 59624, 59664, 59704, 59744, 59784, 59824, 59864, +59904, 59944, 59984, 60024, 60064, 60104, 60144, 60184, 60224, 60264, 60304, 60344, 60384, 60424, 60464, 60504, +60544, 60584, 60624, 60664, 60704, 60744, 60784, 60824, 60864, 60904, 60944, 60984, 61024, 61064, 61104, 61144, +61184, 61224, 61264, 61304, 61344, 61384, 61424, 61464, 61504, 61544, 61584, 61624, 61664, 61704, 61744, 61784, +61824, 61864, 61904, 61944, 61984, 62024, 62064, 62104, 62144, 62184, 62224, 62264, 62304, 62344, 62384, 62424, +62464, 62504, 62544, 62584, 62624, 62664, 62704, 62744, 62784, 62824, 62864, 62904, 62944, 62984, 63024, 63064, +63104, 63144, 63184, 63224, 63264, 63304, 63344, 63384, 63424, 63464, 63504, 63544, 63584, 63624, 63664, 63704, +63744, 63784, 63824, 63864, 63904, 63944, 63984, 64024, 64064, 64104, 64144, 64184, 64224, 64264, 64304, 64344, +64384, 64424, 64464, 64504, 64544, 64584, 64624, 64664, 64704, 64744, 64784, 64824, 64864, 64904, 64944, 64984, +65024, 65064, 65104, 65144, 65184, 65224, 65264, 65304, 65344, 65384, 65424, 65464, 65504 + }); + + testBytes = theseBytes(new int[]{ +0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, +0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, +0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, +0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, +0, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, +0, 40, 0, 41, 0, 42, 0, 43, 0, 44, 0, 45, 0, 46, 0, 47, +0, 48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0, 54, 0, 55, +0, 56, 0, 57, 0, 58, 0, 59, 0, 60, 0, 61, 0, 62, 0, 63, +0, 64, 0, 65, 0, 66, 0, 67, 0, 68, 0, 69, 0, 70, 0, 71, +0, 72, 0, 73, 0, 74, 0, 75, 0, 76, 0, 77, 0, 78, 0, 79, +0, 80, 0, 81, 0, 82, 0, 83, 0, 84, 0, 85, 0, 86, 0, 87, +0, 88, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, +0, 96, 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0, 103, +0, 104, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, 110, 0, 111, +0, 112, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, +0, 120, 0, 121, 0, 122, 0, 123, 0, 124, 0, 125, 0, 126, 0, 127, +0, 128, 0, 129, 0, 130, 0, 131, 0, 132, 0, 133, 0, 134, 0, 135, +0, 136, 0, 137, 0, 138, 0, 139, 0, 140, 0, 141, 0, 142, 0, 143, +0, 144, 0, 145, 0, 146, 0, 147, 0, 148, 0, 149, 0, 150, 0, 151, +0, 152, 0, 153, 0, 154, 0, 155, 0, 156, 0, 157, 0, 158, 0, 159, +0, 160, 0, 161, 0, 162, 0, 163, 0, 164, 0, 165, 0, 166, 0, 167, +0, 168, 0, 169, 0, 170, 0, 171, 0, 172, 0, 173, 0, 174, 0, 175, +0, 176, 0, 177, 0, 178, 0, 179, 0, 180, 0, 181, 0, 182, 0, 183, +0, 184, 0, 185, 0, 186, 0, 187, 0, 188, 0, 189, 0, 190, 0, 191, +0, 192, 0, 193, 0, 194, 0, 195, 0, 196, 0, 197, 0, 198, 0, 199, +0, 200, 0, 201, 0, 202, 0, 203, 0, 204, 0, 205, 0, 206, 0, 207, +0, 208, 0, 209, 0, 210, 0, 211, 0, 212, 0, 213, 0, 214, 0, 215, +0, 216, 0, 217, 0, 218, 0, 219, 0, 220, 0, 221, 0, 222, 0, 223, +0, 224, 0, 225, 0, 226, 0, 227, 0, 228, 0, 229, 0, 230, 0, 231, +0, 232, 0, 233, 0, 234, 0, 235, 0, 236, 0, 237, 0, 238, 0, 239, +0, 240, 0, 241, 0, 242, 0, 243, 0, 244, 0, 245, 0, 246, 0, 247, +0, 248, 0, 249, 0, 250, 0, 251, 0, 252, 0, 253, 0, 254, 0, 255, +1, 0, 1, 40, 1, 80, 1, 120, 1, 160, 1, 200, 1, 240, 2, 24, +2, 64, 2, 104, 2, 144, 2, 184, 2, 224, 3, 8, 3, 48, 3, 88, +3, 128, 3, 168, 3, 208, 3, 248, 4, 32, 4, 72, 4, 112, 4, 152, +4, 192, 4, 232, 5, 16, 5, 56, 5, 96, 5, 136, 5, 176, 5, 216, +6, 0, 6, 40, 6, 80, 6, 120, 6, 160, 6, 200, 6, 240, 7, 24, +7, 64, 7, 104, 7, 144, 7, 184, 7, 224, 8, 8, 8, 48, 8, 88, +8, 128, 8, 168, 8, 208, 8, 248, 9, 32, 9, 72, 9, 112, 9, 152, +9, 192, 9, 232, 10, 16, 10, 56, 10, 96, 10, 136, 10, 176, 10, 216, +11, 0, 11, 40, 11, 80, 11, 120, 11, 160, 11, 200, 11, 240, 12, 24, +12, 64, 12, 104, 12, 144, 12, 184, 12, 224, 13, 8, 13, 48, 13, 88, +13, 128, 13, 168, 13, 208, 13, 248, 14, 32, 14, 72, 14, 112, 14, 152, +14, 192, 14, 232, 15, 16, 15, 56, 15, 96, 15, 136, 15, 176, 15, 216, +16, 0, 16, 40, 16, 80, 16, 120, 16, 160, 16, 200, 16, 240, 17, 24, +17, 64, 17, 104, 17, 144, 17, 184, 17, 224, 18, 8, 18, 48, 18, 88, +18, 128, 18, 168, 18, 208, 18, 248, 19, 32, 19, 72, 19, 112, 19, 152, +19, 192, 19, 232, 20, 16, 20, 56, 20, 96, 20, 136, 20, 176, 20, 216, +21, 0, 21, 40, 21, 80, 21, 120, 21, 160, 21, 200, 21, 240, 22, 24, +22, 64, 22, 104, 22, 144, 22, 184, 22, 224, 23, 8, 23, 48, 23, 88, +23, 128, 23, 168, 23, 208, 23, 248, 24, 32, 24, 72, 24, 112, 24, 152, +24, 192, 24, 232, 25, 16, 25, 56, 25, 96, 25, 136, 25, 176, 25, 216, +26, 0, 26, 40, 26, 80, 26, 120, 26, 160, 26, 200, 26, 240, 27, 24, +27, 64, 27, 104, 27, 144, 27, 184, 27, 224, 28, 8, 28, 48, 28, 88, +28, 128, 28, 168, 28, 208, 28, 248, 29, 32, 29, 72, 29, 112, 29, 152, +29, 192, 29, 232, 30, 16, 30, 56, 30, 96, 30, 136, 30, 176, 30, 216, +31, 0, 31, 40, 31, 80, 31, 120, 31, 160, 31, 200, 31, 240, 32, 24, +32, 64, 32, 104, 32, 144, 32, 184, 32, 224, 33, 8, 33, 48, 33, 88, +33, 128, 33, 168, 33, 208, 33, 248, 34, 32, 34, 72, 34, 112, 34, 152, +34, 192, 34, 232, 35, 16, 35, 56, 35, 96, 35, 136, 35, 176, 35, 216, +36, 0, 36, 40, 36, 80, 36, 120, 36, 160, 36, 200, 36, 240, 37, 24, +37, 64, 37, 104, 37, 144, 37, 184, 37, 224, 38, 8, 38, 48, 38, 88, +38, 128, 38, 168, 38, 208, 38, 248, 39, 32, 39, 72, 39, 112, 39, 152, +39, 192, 39, 232, 40, 16, 40, 56, 40, 96, 40, 136, 40, 176, 40, 216, +41, 0, 41, 40, 41, 80, 41, 120, 41, 160, 41, 200, 41, 240, 42, 24, +42, 64, 42, 104, 42, 144, 42, 184, 42, 224, 43, 8, 43, 48, 43, 88, +43, 128, 43, 168, 43, 208, 43, 248, 44, 32, 44, 72, 44, 112, 44, 152, +44, 192, 44, 232, 45, 16, 45, 56, 45, 96, 45, 136, 45, 176, 45, 216, +46, 0, 46, 40, 46, 80, 46, 120, 46, 160, 46, 200, 46, 240, 47, 24, +47, 64, 47, 104, 47, 144, 47, 184, 47, 224, 48, 8, 48, 48, 48, 88, +48, 128, 48, 168, 48, 208, 48, 248, 49, 32, 49, 72, 49, 112, 49, 152, +49, 192, 49, 232, 50, 16, 50, 56, 50, 96, 50, 136, 50, 176, 50, 216, +51, 0, 51, 40, 51, 80, 51, 120, 51, 160, 51, 200, 51, 240, 52, 24, +52, 64, 52, 104, 52, 144, 52, 184, 52, 224, 53, 8, 53, 48, 53, 88, +53, 128, 53, 168, 53, 208, 53, 248, 54, 32, 54, 72, 54, 112, 54, 152, +54, 192, 54, 232, 55, 16, 55, 56, 55, 96, 55, 136, 55, 176, 55, 216, +56, 0, 56, 40, 56, 80, 56, 120, 56, 160, 56, 200, 56, 240, 57, 24, +57, 64, 57, 104, 57, 144, 57, 184, 57, 224, 58, 8, 58, 48, 58, 88, +58, 128, 58, 168, 58, 208, 58, 248, 59, 32, 59, 72, 59, 112, 59, 152, +59, 192, 59, 232, 60, 16, 60, 56, 60, 96, 60, 136, 60, 176, 60, 216, +61, 0, 61, 40, 61, 80, 61, 120, 61, 160, 61, 200, 61, 240, 62, 24, +62, 64, 62, 104, 62, 144, 62, 184, 62, 224, 63, 8, 63, 48, 63, 88, +63, 128, 63, 168, 63, 208, 63, 248, 64, 32, 64, 72, 64, 112, 64, 152, +64, 192, 64, 232, 65, 16, 65, 56, 65, 96, 65, 136, 65, 176, 65, 216, +66, 0, 66, 40, 66, 80, 66, 120, 66, 160, 66, 200, 66, 240, 67, 24, +67, 64, 67, 104, 67, 144, 67, 184, 67, 224, 68, 8, 68, 48, 68, 88, +68, 128, 68, 168, 68, 208, 68, 248, 69, 32, 69, 72, 69, 112, 69, 152, +69, 192, 69, 232, 70, 16, 70, 56, 70, 96, 70, 136, 70, 176, 70, 216, +71, 0, 71, 40, 71, 80, 71, 120, 71, 160, 71, 200, 71, 240, 72, 24, +72, 64, 72, 104, 72, 144, 72, 184, 72, 224, 73, 8, 73, 48, 73, 88, +73, 128, 73, 168, 73, 208, 73, 248, 74, 32, 74, 72, 74, 112, 74, 152, +74, 192, 74, 232, 75, 16, 75, 56, 75, 96, 75, 136, 75, 176, 75, 216, +76, 0, 76, 40, 76, 80, 76, 120, 76, 160, 76, 200, 76, 240, 77, 24, +77, 64, 77, 104, 77, 144, 77, 184, 77, 224, 78, 8, 78, 48, 78, 88, +78, 128, 78, 168, 78, 208, 78, 248, 79, 32, 79, 72, 79, 112, 79, 152, +79, 192, 79, 232, 80, 16, 80, 56, 80, 96, 80, 136, 80, 176, 80, 216, +81, 0, 81, 40, 81, 80, 81, 120, 81, 160, 81, 200, 81, 240, 82, 24, +82, 64, 82, 104, 82, 144, 82, 184, 82, 224, 83, 8, 83, 48, 83, 88, +83, 128, 83, 168, 83, 208, 83, 248, 84, 32, 84, 72, 84, 112, 84, 152, +84, 192, 84, 232, 85, 16, 85, 56, 85, 96, 85, 136, 85, 176, 85, 216, +86, 0, 86, 40, 86, 80, 86, 120, 86, 160, 86, 200, 86, 240, 87, 24, +87, 64, 87, 104, 87, 144, 87, 184, 87, 224, 88, 8, 88, 48, 88, 88, +88, 128, 88, 168, 88, 208, 88, 248, 89, 32, 89, 72, 89, 112, 89, 152, +89, 192, 89, 232, 90, 16, 90, 56, 90, 96, 90, 136, 90, 176, 90, 216, +91, 0, 91, 40, 91, 80, 91, 120, 91, 160, 91, 200, 91, 240, 92, 24, +92, 64, 92, 104, 92, 144, 92, 184, 92, 224, 93, 8, 93, 48, 93, 88, +93, 128, 93, 168, 93, 208, 93, 248, 94, 32, 94, 72, 94, 112, 94, 152, +94, 192, 94, 232, 95, 16, 95, 56, 95, 96, 95, 136, 95, 176, 95, 216, +96, 0, 96, 40, 96, 80, 96, 120, 96, 160, 96, 200, 96, 240, 97, 24, +97, 64, 97, 104, 97, 144, 97, 184, 97, 224, 98, 8, 98, 48, 98, 88, +98, 128, 98, 168, 98, 208, 98, 248, 99, 32, 99, 72, 99, 112, 99, 152, +99, 192, 99, 232, 100, 16, 100, 56, 100, 96, 100, 136, 100, 176, 100, 216, +101, 0, 101, 40, 101, 80, 101, 120, 101, 160, 101, 200, 101, 240, 102, 24, +102, 64, 102, 104, 102, 144, 102, 184, 102, 224, 103, 8, 103, 48, 103, 88, +103, 128, 103, 168, 103, 208, 103, 248, 104, 32, 104, 72, 104, 112, 104, 152, +104, 192, 104, 232, 105, 16, 105, 56, 105, 96, 105, 136, 105, 176, 105, 216, +106, 0, 106, 40, 106, 80, 106, 120, 106, 160, 106, 200, 106, 240, 107, 24, +107, 64, 107, 104, 107, 144, 107, 184, 107, 224, 108, 8, 108, 48, 108, 88, +108, 128, 108, 168, 108, 208, 108, 248, 109, 32, 109, 72, 109, 112, 109, 152, +109, 192, 109, 232, 110, 16, 110, 56, 110, 96, 110, 136, 110, 176, 110, 216, +111, 0, 111, 40, 111, 80, 111, 120, 111, 160, 111, 200, 111, 240, 112, 24, +112, 64, 112, 104, 112, 144, 112, 184, 112, 224, 113, 8, 113, 48, 113, 88, +113, 128, 113, 168, 113, 208, 113, 248, 114, 32, 114, 72, 114, 112, 114, 152, +114, 192, 114, 232, 115, 16, 115, 56, 115, 96, 115, 136, 115, 176, 115, 216, +116, 0, 116, 40, 116, 80, 116, 120, 116, 160, 116, 200, 116, 240, 117, 24, +117, 64, 117, 104, 117, 144, 117, 184, 117, 224, 118, 8, 118, 48, 118, 88, +118, 128, 118, 168, 118, 208, 118, 248, 119, 32, 119, 72, 119, 112, 119, 152, +119, 192, 119, 232, 120, 16, 120, 56, 120, 96, 120, 136, 120, 176, 120, 216, +121, 0, 121, 40, 121, 80, 121, 120, 121, 160, 121, 200, 121, 240, 122, 24, +122, 64, 122, 104, 122, 144, 122, 184, 122, 224, 123, 8, 123, 48, 123, 88, +123, 128, 123, 168, 123, 208, 123, 248, 124, 32, 124, 72, 124, 112, 124, 152, +124, 192, 124, 232, 125, 16, 125, 56, 125, 96, 125, 136, 125, 176, 125, 216, +126, 0, 126, 40, 126, 80, 126, 120, 126, 160, 126, 200, 126, 240, 127, 24, +127, 64, 127, 104, 127, 144, 127, 184, 127, 224, 128, 8, 128, 48, 128, 88, +128, 128, 128, 168, 128, 208, 128, 248, 129, 32, 129, 72, 129, 112, 129, 152, +129, 192, 129, 232, 130, 16, 130, 56, 130, 96, 130, 136, 130, 176, 130, 216, +131, 0, 131, 40, 131, 80, 131, 120, 131, 160, 131, 200, 131, 240, 132, 24, +132, 64, 132, 104, 132, 144, 132, 184, 132, 224, 133, 8, 133, 48, 133, 88, +133, 128, 133, 168, 133, 208, 133, 248, 134, 32, 134, 72, 134, 112, 134, 152, +134, 192, 134, 232, 135, 16, 135, 56, 135, 96, 135, 136, 135, 176, 135, 216, +136, 0, 136, 40, 136, 80, 136, 120, 136, 160, 136, 200, 136, 240, 137, 24, +137, 64, 137, 104, 137, 144, 137, 184, 137, 224, 138, 8, 138, 48, 138, 88, +138, 128, 138, 168, 138, 208, 138, 248, 139, 32, 139, 72, 139, 112, 139, 152, +139, 192, 139, 232, 140, 16, 140, 56, 140, 96, 140, 136, 140, 176, 140, 216, +141, 0, 141, 40, 141, 80, 141, 120, 141, 160, 141, 200, 141, 240, 142, 24, +142, 64, 142, 104, 142, 144, 142, 184, 142, 224, 143, 8, 143, 48, 143, 88, +143, 128, 143, 168, 143, 208, 143, 248, 144, 32, 144, 72, 144, 112, 144, 152, +144, 192, 144, 232, 145, 16, 145, 56, 145, 96, 145, 136, 145, 176, 145, 216, +146, 0, 146, 40, 146, 80, 146, 120, 146, 160, 146, 200, 146, 240, 147, 24, +147, 64, 147, 104, 147, 144, 147, 184, 147, 224, 148, 8, 148, 48, 148, 88, +148, 128, 148, 168, 148, 208, 148, 248, 149, 32, 149, 72, 149, 112, 149, 152, +149, 192, 149, 232, 150, 16, 150, 56, 150, 96, 150, 136, 150, 176, 150, 216, +151, 0, 151, 40, 151, 80, 151, 120, 151, 160, 151, 200, 151, 240, 152, 24, +152, 64, 152, 104, 152, 144, 152, 184, 152, 224, 153, 8, 153, 48, 153, 88, +153, 128, 153, 168, 153, 208, 153, 248, 154, 32, 154, 72, 154, 112, 154, 152, +154, 192, 154, 232, 155, 16, 155, 56, 155, 96, 155, 136, 155, 176, 155, 216, +156, 0, 156, 40, 156, 80, 156, 120, 156, 160, 156, 200, 156, 240, 157, 24, +157, 64, 157, 104, 157, 144, 157, 184, 157, 224, 158, 8, 158, 48, 158, 88, +158, 128, 158, 168, 158, 208, 158, 248, 159, 32, 159, 72, 159, 112, 159, 152, +159, 192, 159, 232, 160, 16, 160, 56, 160, 96, 160, 136, 160, 176, 160, 216, +161, 0, 161, 40, 161, 80, 161, 120, 161, 160, 161, 200, 161, 240, 162, 24, +162, 64, 162, 104, 162, 144, 162, 184, 162, 224, 163, 8, 163, 48, 163, 88, +163, 128, 163, 168, 163, 208, 163, 248, 164, 32, 164, 72, 164, 112, 164, 152, +164, 192, 164, 232, 165, 16, 165, 56, 165, 96, 165, 136, 165, 176, 165, 216, +166, 0, 166, 40, 166, 80, 166, 120, 166, 160, 166, 200, 166, 240, 167, 24, +167, 64, 167, 104, 167, 144, 167, 184, 167, 224, 168, 8, 168, 48, 168, 88, +168, 128, 168, 168, 168, 208, 168, 248, 169, 32, 169, 72, 169, 112, 169, 152, +169, 192, 169, 232, 170, 16, 170, 56, 170, 96, 170, 136, 170, 176, 170, 216, +171, 0, 171, 40, 171, 80, 171, 120, 171, 160, 171, 200, 171, 240, 172, 24, +172, 64, 172, 104, 172, 144, 172, 184, 172, 224, 173, 8, 173, 48, 173, 88, +173, 128, 173, 168, 173, 208, 173, 248, 174, 32, 174, 72, 174, 112, 174, 152, +174, 192, 174, 232, 175, 16, 175, 56, 175, 96, 175, 136, 175, 176, 175, 216, +176, 0, 176, 40, 176, 80, 176, 120, 176, 160, 176, 200, 176, 240, 177, 24, +177, 64, 177, 104, 177, 144, 177, 184, 177, 224, 178, 8, 178, 48, 178, 88, +178, 128, 178, 168, 178, 208, 178, 248, 179, 32, 179, 72, 179, 112, 179, 152, +179, 192, 179, 232, 180, 16, 180, 56, 180, 96, 180, 136, 180, 176, 180, 216, +181, 0, 181, 40, 181, 80, 181, 120, 181, 160, 181, 200, 181, 240, 182, 24, +182, 64, 182, 104, 182, 144, 182, 184, 182, 224, 183, 8, 183, 48, 183, 88, +183, 128, 183, 168, 183, 208, 183, 248, 184, 32, 184, 72, 184, 112, 184, 152, +184, 192, 184, 232, 185, 16, 185, 56, 185, 96, 185, 136, 185, 176, 185, 216, +186, 0, 186, 40, 186, 80, 186, 120, 186, 160, 186, 200, 186, 240, 187, 24, +187, 64, 187, 104, 187, 144, 187, 184, 187, 224, 188, 8, 188, 48, 188, 88, +188, 128, 188, 168, 188, 208, 188, 248, 189, 32, 189, 72, 189, 112, 189, 152, +189, 192, 189, 232, 190, 16, 190, 56, 190, 96, 190, 136, 190, 176, 190, 216, +191, 0, 191, 40, 191, 80, 191, 120, 191, 160, 191, 200, 191, 240, 192, 24, +192, 64, 192, 104, 192, 144, 192, 184, 192, 224, 193, 8, 193, 48, 193, 88, +193, 128, 193, 168, 193, 208, 193, 248, 194, 32, 194, 72, 194, 112, 194, 152, +194, 192, 194, 232, 195, 16, 195, 56, 195, 96, 195, 136, 195, 176, 195, 216, +196, 0, 196, 40, 196, 80, 196, 120, 196, 160, 196, 200, 196, 240, 197, 24, +197, 64, 197, 104, 197, 144, 197, 184, 197, 224, 198, 8, 198, 48, 198, 88, +198, 128, 198, 168, 198, 208, 198, 248, 199, 32, 199, 72, 199, 112, 199, 152, +199, 192, 199, 232, 200, 16, 200, 56, 200, 96, 200, 136, 200, 176, 200, 216, +201, 0, 201, 40, 201, 80, 201, 120, 201, 160, 201, 200, 201, 240, 202, 24, +202, 64, 202, 104, 202, 144, 202, 184, 202, 224, 203, 8, 203, 48, 203, 88, +203, 128, 203, 168, 203, 208, 203, 248, 204, 32, 204, 72, 204, 112, 204, 152, +204, 192, 204, 232, 205, 16, 205, 56, 205, 96, 205, 136, 205, 176, 205, 216, +206, 0, 206, 40, 206, 80, 206, 120, 206, 160, 206, 200, 206, 240, 207, 24, +207, 64, 207, 104, 207, 144, 207, 184, 207, 224, 208, 8, 208, 48, 208, 88, +208, 128, 208, 168, 208, 208, 208, 248, 209, 32, 209, 72, 209, 112, 209, 152, +209, 192, 209, 232, 210, 16, 210, 56, 210, 96, 210, 136, 210, 176, 210, 216, +211, 0, 211, 40, 211, 80, 211, 120, 211, 160, 211, 200, 211, 240, 212, 24, +212, 64, 212, 104, 212, 144, 212, 184, 212, 224, 213, 8, 213, 48, 213, 88, +213, 128, 213, 168, 213, 208, 213, 248, 214, 32, 214, 72, 214, 112, 214, 152, +214, 192, 214, 232, 215, 16, 215, 56, 215, 96, 215, 136, 215, 176, 215, 216, +224, 0, 224, 40, 224, 80, 224, 120, 224, 160, 224, 200, 224, 240, 225, 24, +225, 64, 225, 104, 225, 144, 225, 184, 225, 224, 226, 8, 226, 48, 226, 88, +226, 128, 226, 168, 226, 208, 226, 248, 227, 32, 227, 72, 227, 112, 227, 152, +227, 192, 227, 232, 228, 16, 228, 56, 228, 96, 228, 136, 228, 176, 228, 216, +229, 0, 229, 40, 229, 80, 229, 120, 229, 160, 229, 200, 229, 240, 230, 24, +230, 64, 230, 104, 230, 144, 230, 184, 230, 224, 231, 8, 231, 48, 231, 88, +231, 128, 231, 168, 231, 208, 231, 248, 232, 32, 232, 72, 232, 112, 232, 152, +232, 192, 232, 232, 233, 16, 233, 56, 233, 96, 233, 136, 233, 176, 233, 216, +234, 0, 234, 40, 234, 80, 234, 120, 234, 160, 234, 200, 234, 240, 235, 24, +235, 64, 235, 104, 235, 144, 235, 184, 235, 224, 236, 8, 236, 48, 236, 88, +236, 128, 236, 168, 236, 208, 236, 248, 237, 32, 237, 72, 237, 112, 237, 152, +237, 192, 237, 232, 238, 16, 238, 56, 238, 96, 238, 136, 238, 176, 238, 216, +239, 0, 239, 40, 239, 80, 239, 120, 239, 160, 239, 200, 239, 240, 240, 24, +240, 64, 240, 104, 240, 144, 240, 184, 240, 224, 241, 8, 241, 48, 241, 88, +241, 128, 241, 168, 241, 208, 241, 248, 242, 32, 242, 72, 242, 112, 242, 152, +242, 192, 242, 232, 243, 16, 243, 56, 243, 96, 243, 136, 243, 176, 243, 216, +244, 0, 244, 40, 244, 80, 244, 120, 244, 160, 244, 200, 244, 240, 245, 24, +245, 64, 245, 104, 245, 144, 245, 184, 245, 224, 246, 8, 246, 48, 246, 88, +246, 128, 246, 168, 246, 208, 246, 248, 247, 32, 247, 72, 247, 112, 247, 152, +247, 192, 247, 232, 248, 16, 248, 56, 248, 96, 248, 136, 248, 176, 248, 216, +249, 0, 249, 40, 249, 80, 249, 120, 249, 160, 249, 200, 249, 240, 250, 24, +250, 64, 250, 104, 250, 144, 250, 184, 250, 224, 251, 8, 251, 48, 251, 88, +251, 128, 251, 168, 251, 208, 251, 248, 252, 32, 252, 72, 252, 112, 252, 152, +252, 192, 252, 232, 253, 16, 253, 56, 253, 96, 253, 136, 253, 176, 253, 216, +254, 0, 254, 40, 254, 80, 254, 120, 254, 160, 254, 200, 254, 240, 255, 24, +255, 64, 255, 104, 255, 144, 255, 184, 255, 224 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16LE.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16LE.java new file mode 100644 index 0000000..606fcff --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16LE.java @@ -0,0 +1,394 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.UTF_16LE.class) + +public class Charset_MultiByte_UTF_16LE extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "UTF-16LE"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, +176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, +192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, +208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, +224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, +240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, +256, 296, 336, 376, 416, 456, 496, 536, 576, 616, 656, 696, 736, 776, 816, 856, +896, 936, 976, 1016, 1056, 1096, 1136, 1176, 1216, 1256, 1296, 1336, 1376, 1416, 1456, 1496, +1536, 1576, 1616, 1656, 1696, 1736, 1776, 1816, 1856, 1896, 1936, 1976, 2016, 2056, 2096, 2136, +2176, 2216, 2256, 2296, 2336, 2376, 2416, 2456, 2496, 2536, 2576, 2616, 2656, 2696, 2736, 2776, +2816, 2856, 2896, 2936, 2976, 3016, 3056, 3096, 3136, 3176, 3216, 3256, 3296, 3336, 3376, 3416, +3456, 3496, 3536, 3576, 3616, 3656, 3696, 3736, 3776, 3816, 3856, 3896, 3936, 3976, 4016, 4056, +4096, 4136, 4176, 4216, 4256, 4296, 4336, 4376, 4416, 4456, 4496, 4536, 4576, 4616, 4656, 4696, +4736, 4776, 4816, 4856, 4896, 4936, 4976, 5016, 5056, 5096, 5136, 5176, 5216, 5256, 5296, 5336, +5376, 5416, 5456, 5496, 5536, 5576, 5616, 5656, 5696, 5736, 5776, 5816, 5856, 5896, 5936, 5976, +6016, 6056, 6096, 6136, 6176, 6216, 6256, 6296, 6336, 6376, 6416, 6456, 6496, 6536, 6576, 6616, +6656, 6696, 6736, 6776, 6816, 6856, 6896, 6936, 6976, 7016, 7056, 7096, 7136, 7176, 7216, 7256, +7296, 7336, 7376, 7416, 7456, 7496, 7536, 7576, 7616, 7656, 7696, 7736, 7776, 7816, 7856, 7896, +7936, 7976, 8016, 8056, 8096, 8136, 8176, 8216, 8256, 8296, 8336, 8376, 8416, 8456, 8496, 8536, +8576, 8616, 8656, 8696, 8736, 8776, 8816, 8856, 8896, 8936, 8976, 9016, 9056, 9096, 9136, 9176, +9216, 9256, 9296, 9336, 9376, 9416, 9456, 9496, 9536, 9576, 9616, 9656, 9696, 9736, 9776, 9816, +9856, 9896, 9936, 9976, 10016, 10056, 10096, 10136, 10176, 10216, 10256, 10296, 10336, 10376, 10416, 10456, +10496, 10536, 10576, 10616, 10656, 10696, 10736, 10776, 10816, 10856, 10896, 10936, 10976, 11016, 11056, 11096, +11136, 11176, 11216, 11256, 11296, 11336, 11376, 11416, 11456, 11496, 11536, 11576, 11616, 11656, 11696, 11736, +11776, 11816, 11856, 11896, 11936, 11976, 12016, 12056, 12096, 12136, 12176, 12216, 12256, 12296, 12336, 12376, +12416, 12456, 12496, 12536, 12576, 12616, 12656, 12696, 12736, 12776, 12816, 12856, 12896, 12936, 12976, 13016, +13056, 13096, 13136, 13176, 13216, 13256, 13296, 13336, 13376, 13416, 13456, 13496, 13536, 13576, 13616, 13656, +13696, 13736, 13776, 13816, 13856, 13896, 13936, 13976, 14016, 14056, 14096, 14136, 14176, 14216, 14256, 14296, +14336, 14376, 14416, 14456, 14496, 14536, 14576, 14616, 14656, 14696, 14736, 14776, 14816, 14856, 14896, 14936, +14976, 15016, 15056, 15096, 15136, 15176, 15216, 15256, 15296, 15336, 15376, 15416, 15456, 15496, 15536, 15576, +15616, 15656, 15696, 15736, 15776, 15816, 15856, 15896, 15936, 15976, 16016, 16056, 16096, 16136, 16176, 16216, +16256, 16296, 16336, 16376, 16416, 16456, 16496, 16536, 16576, 16616, 16656, 16696, 16736, 16776, 16816, 16856, +16896, 16936, 16976, 17016, 17056, 17096, 17136, 17176, 17216, 17256, 17296, 17336, 17376, 17416, 17456, 17496, +17536, 17576, 17616, 17656, 17696, 17736, 17776, 17816, 17856, 17896, 17936, 17976, 18016, 18056, 18096, 18136, +18176, 18216, 18256, 18296, 18336, 18376, 18416, 18456, 18496, 18536, 18576, 18616, 18656, 18696, 18736, 18776, +18816, 18856, 18896, 18936, 18976, 19016, 19056, 19096, 19136, 19176, 19216, 19256, 19296, 19336, 19376, 19416, +19456, 19496, 19536, 19576, 19616, 19656, 19696, 19736, 19776, 19816, 19856, 19896, 19936, 19976, 20016, 20056, +20096, 20136, 20176, 20216, 20256, 20296, 20336, 20376, 20416, 20456, 20496, 20536, 20576, 20616, 20656, 20696, +20736, 20776, 20816, 20856, 20896, 20936, 20976, 21016, 21056, 21096, 21136, 21176, 21216, 21256, 21296, 21336, +21376, 21416, 21456, 21496, 21536, 21576, 21616, 21656, 21696, 21736, 21776, 21816, 21856, 21896, 21936, 21976, +22016, 22056, 22096, 22136, 22176, 22216, 22256, 22296, 22336, 22376, 22416, 22456, 22496, 22536, 22576, 22616, +22656, 22696, 22736, 22776, 22816, 22856, 22896, 22936, 22976, 23016, 23056, 23096, 23136, 23176, 23216, 23256, +23296, 23336, 23376, 23416, 23456, 23496, 23536, 23576, 23616, 23656, 23696, 23736, 23776, 23816, 23856, 23896, +23936, 23976, 24016, 24056, 24096, 24136, 24176, 24216, 24256, 24296, 24336, 24376, 24416, 24456, 24496, 24536, +24576, 24616, 24656, 24696, 24736, 24776, 24816, 24856, 24896, 24936, 24976, 25016, 25056, 25096, 25136, 25176, +25216, 25256, 25296, 25336, 25376, 25416, 25456, 25496, 25536, 25576, 25616, 25656, 25696, 25736, 25776, 25816, +25856, 25896, 25936, 25976, 26016, 26056, 26096, 26136, 26176, 26216, 26256, 26296, 26336, 26376, 26416, 26456, +26496, 26536, 26576, 26616, 26656, 26696, 26736, 26776, 26816, 26856, 26896, 26936, 26976, 27016, 27056, 27096, +27136, 27176, 27216, 27256, 27296, 27336, 27376, 27416, 27456, 27496, 27536, 27576, 27616, 27656, 27696, 27736, +27776, 27816, 27856, 27896, 27936, 27976, 28016, 28056, 28096, 28136, 28176, 28216, 28256, 28296, 28336, 28376, +28416, 28456, 28496, 28536, 28576, 28616, 28656, 28696, 28736, 28776, 28816, 28856, 28896, 28936, 28976, 29016, +29056, 29096, 29136, 29176, 29216, 29256, 29296, 29336, 29376, 29416, 29456, 29496, 29536, 29576, 29616, 29656, +29696, 29736, 29776, 29816, 29856, 29896, 29936, 29976, 30016, 30056, 30096, 30136, 30176, 30216, 30256, 30296, +30336, 30376, 30416, 30456, 30496, 30536, 30576, 30616, 30656, 30696, 30736, 30776, 30816, 30856, 30896, 30936, +30976, 31016, 31056, 31096, 31136, 31176, 31216, 31256, 31296, 31336, 31376, 31416, 31456, 31496, 31536, 31576, +31616, 31656, 31696, 31736, 31776, 31816, 31856, 31896, 31936, 31976, 32016, 32056, 32096, 32136, 32176, 32216, +32256, 32296, 32336, 32376, 32416, 32456, 32496, 32536, 32576, 32616, 32656, 32696, 32736, 32776, 32816, 32856, +32896, 32936, 32976, 33016, 33056, 33096, 33136, 33176, 33216, 33256, 33296, 33336, 33376, 33416, 33456, 33496, +33536, 33576, 33616, 33656, 33696, 33736, 33776, 33816, 33856, 33896, 33936, 33976, 34016, 34056, 34096, 34136, +34176, 34216, 34256, 34296, 34336, 34376, 34416, 34456, 34496, 34536, 34576, 34616, 34656, 34696, 34736, 34776, +34816, 34856, 34896, 34936, 34976, 35016, 35056, 35096, 35136, 35176, 35216, 35256, 35296, 35336, 35376, 35416, +35456, 35496, 35536, 35576, 35616, 35656, 35696, 35736, 35776, 35816, 35856, 35896, 35936, 35976, 36016, 36056, +36096, 36136, 36176, 36216, 36256, 36296, 36336, 36376, 36416, 36456, 36496, 36536, 36576, 36616, 36656, 36696, +36736, 36776, 36816, 36856, 36896, 36936, 36976, 37016, 37056, 37096, 37136, 37176, 37216, 37256, 37296, 37336, +37376, 37416, 37456, 37496, 37536, 37576, 37616, 37656, 37696, 37736, 37776, 37816, 37856, 37896, 37936, 37976, +38016, 38056, 38096, 38136, 38176, 38216, 38256, 38296, 38336, 38376, 38416, 38456, 38496, 38536, 38576, 38616, +38656, 38696, 38736, 38776, 38816, 38856, 38896, 38936, 38976, 39016, 39056, 39096, 39136, 39176, 39216, 39256, +39296, 39336, 39376, 39416, 39456, 39496, 39536, 39576, 39616, 39656, 39696, 39736, 39776, 39816, 39856, 39896, +39936, 39976, 40016, 40056, 40096, 40136, 40176, 40216, 40256, 40296, 40336, 40376, 40416, 40456, 40496, 40536, +40576, 40616, 40656, 40696, 40736, 40776, 40816, 40856, 40896, 40936, 40976, 41016, 41056, 41096, 41136, 41176, +41216, 41256, 41296, 41336, 41376, 41416, 41456, 41496, 41536, 41576, 41616, 41656, 41696, 41736, 41776, 41816, +41856, 41896, 41936, 41976, 42016, 42056, 42096, 42136, 42176, 42216, 42256, 42296, 42336, 42376, 42416, 42456, +42496, 42536, 42576, 42616, 42656, 42696, 42736, 42776, 42816, 42856, 42896, 42936, 42976, 43016, 43056, 43096, +43136, 43176, 43216, 43256, 43296, 43336, 43376, 43416, 43456, 43496, 43536, 43576, 43616, 43656, 43696, 43736, +43776, 43816, 43856, 43896, 43936, 43976, 44016, 44056, 44096, 44136, 44176, 44216, 44256, 44296, 44336, 44376, +44416, 44456, 44496, 44536, 44576, 44616, 44656, 44696, 44736, 44776, 44816, 44856, 44896, 44936, 44976, 45016, +45056, 45096, 45136, 45176, 45216, 45256, 45296, 45336, 45376, 45416, 45456, 45496, 45536, 45576, 45616, 45656, +45696, 45736, 45776, 45816, 45856, 45896, 45936, 45976, 46016, 46056, 46096, 46136, 46176, 46216, 46256, 46296, +46336, 46376, 46416, 46456, 46496, 46536, 46576, 46616, 46656, 46696, 46736, 46776, 46816, 46856, 46896, 46936, +46976, 47016, 47056, 47096, 47136, 47176, 47216, 47256, 47296, 47336, 47376, 47416, 47456, 47496, 47536, 47576, +47616, 47656, 47696, 47736, 47776, 47816, 47856, 47896, 47936, 47976, 48016, 48056, 48096, 48136, 48176, 48216, +48256, 48296, 48336, 48376, 48416, 48456, 48496, 48536, 48576, 48616, 48656, 48696, 48736, 48776, 48816, 48856, +48896, 48936, 48976, 49016, 49056, 49096, 49136, 49176, 49216, 49256, 49296, 49336, 49376, 49416, 49456, 49496, +49536, 49576, 49616, 49656, 49696, 49736, 49776, 49816, 49856, 49896, 49936, 49976, 50016, 50056, 50096, 50136, +50176, 50216, 50256, 50296, 50336, 50376, 50416, 50456, 50496, 50536, 50576, 50616, 50656, 50696, 50736, 50776, +50816, 50856, 50896, 50936, 50976, 51016, 51056, 51096, 51136, 51176, 51216, 51256, 51296, 51336, 51376, 51416, +51456, 51496, 51536, 51576, 51616, 51656, 51696, 51736, 51776, 51816, 51856, 51896, 51936, 51976, 52016, 52056, +52096, 52136, 52176, 52216, 52256, 52296, 52336, 52376, 52416, 52456, 52496, 52536, 52576, 52616, 52656, 52696, +52736, 52776, 52816, 52856, 52896, 52936, 52976, 53016, 53056, 53096, 53136, 53176, 53216, 53256, 53296, 53336, +53376, 53416, 53456, 53496, 53536, 53576, 53616, 53656, 53696, 53736, 53776, 53816, 53856, 53896, 53936, 53976, +54016, 54056, 54096, 54136, 54176, 54216, 54256, 54296, 54336, 54376, 54416, 54456, 54496, 54536, 54576, 54616, +54656, 54696, 54736, 54776, 54816, 54856, 54896, 54936, 54976, 55016, 55056, 55096, 55136, 55176, 55216, 55256, +57344, 57384, 57424, 57464, 57504, 57544, 57584, 57624, 57664, 57704, 57744, 57784, 57824, 57864, 57904, 57944, +57984, 58024, 58064, 58104, 58144, 58184, 58224, 58264, 58304, 58344, 58384, 58424, 58464, 58504, 58544, 58584, +58624, 58664, 58704, 58744, 58784, 58824, 58864, 58904, 58944, 58984, 59024, 59064, 59104, 59144, 59184, 59224, +59264, 59304, 59344, 59384, 59424, 59464, 59504, 59544, 59584, 59624, 59664, 59704, 59744, 59784, 59824, 59864, +59904, 59944, 59984, 60024, 60064, 60104, 60144, 60184, 60224, 60264, 60304, 60344, 60384, 60424, 60464, 60504, +60544, 60584, 60624, 60664, 60704, 60744, 60784, 60824, 60864, 60904, 60944, 60984, 61024, 61064, 61104, 61144, +61184, 61224, 61264, 61304, 61344, 61384, 61424, 61464, 61504, 61544, 61584, 61624, 61664, 61704, 61744, 61784, +61824, 61864, 61904, 61944, 61984, 62024, 62064, 62104, 62144, 62184, 62224, 62264, 62304, 62344, 62384, 62424, +62464, 62504, 62544, 62584, 62624, 62664, 62704, 62744, 62784, 62824, 62864, 62904, 62944, 62984, 63024, 63064, +63104, 63144, 63184, 63224, 63264, 63304, 63344, 63384, 63424, 63464, 63504, 63544, 63584, 63624, 63664, 63704, +63744, 63784, 63824, 63864, 63904, 63944, 63984, 64024, 64064, 64104, 64144, 64184, 64224, 64264, 64304, 64344, +64384, 64424, 64464, 64504, 64544, 64584, 64624, 64664, 64704, 64744, 64784, 64824, 64864, 64904, 64944, 64984, +65024, 65064, 65104, 65144, 65184, 65224, 65264, 65304, 65344, 65384, 65424, 65464, 65504 + }); + + testBytes = theseBytes(new int[]{ +0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, +8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, +16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, +24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, +32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, +40, 0, 41, 0, 42, 0, 43, 0, 44, 0, 45, 0, 46, 0, 47, 0, +48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0, 54, 0, 55, 0, +56, 0, 57, 0, 58, 0, 59, 0, 60, 0, 61, 0, 62, 0, 63, 0, +64, 0, 65, 0, 66, 0, 67, 0, 68, 0, 69, 0, 70, 0, 71, 0, +72, 0, 73, 0, 74, 0, 75, 0, 76, 0, 77, 0, 78, 0, 79, 0, +80, 0, 81, 0, 82, 0, 83, 0, 84, 0, 85, 0, 86, 0, 87, 0, +88, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, +96, 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0, 103, 0, +104, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, 110, 0, 111, 0, +112, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, 0, +120, 0, 121, 0, 122, 0, 123, 0, 124, 0, 125, 0, 126, 0, 127, 0, +128, 0, 129, 0, 130, 0, 131, 0, 132, 0, 133, 0, 134, 0, 135, 0, +136, 0, 137, 0, 138, 0, 139, 0, 140, 0, 141, 0, 142, 0, 143, 0, +144, 0, 145, 0, 146, 0, 147, 0, 148, 0, 149, 0, 150, 0, 151, 0, +152, 0, 153, 0, 154, 0, 155, 0, 156, 0, 157, 0, 158, 0, 159, 0, +160, 0, 161, 0, 162, 0, 163, 0, 164, 0, 165, 0, 166, 0, 167, 0, +168, 0, 169, 0, 170, 0, 171, 0, 172, 0, 173, 0, 174, 0, 175, 0, +176, 0, 177, 0, 178, 0, 179, 0, 180, 0, 181, 0, 182, 0, 183, 0, +184, 0, 185, 0, 186, 0, 187, 0, 188, 0, 189, 0, 190, 0, 191, 0, +192, 0, 193, 0, 194, 0, 195, 0, 196, 0, 197, 0, 198, 0, 199, 0, +200, 0, 201, 0, 202, 0, 203, 0, 204, 0, 205, 0, 206, 0, 207, 0, +208, 0, 209, 0, 210, 0, 211, 0, 212, 0, 213, 0, 214, 0, 215, 0, +216, 0, 217, 0, 218, 0, 219, 0, 220, 0, 221, 0, 222, 0, 223, 0, +224, 0, 225, 0, 226, 0, 227, 0, 228, 0, 229, 0, 230, 0, 231, 0, +232, 0, 233, 0, 234, 0, 235, 0, 236, 0, 237, 0, 238, 0, 239, 0, +240, 0, 241, 0, 242, 0, 243, 0, 244, 0, 245, 0, 246, 0, 247, 0, +248, 0, 249, 0, 250, 0, 251, 0, 252, 0, 253, 0, 254, 0, 255, 0, +0, 1, 40, 1, 80, 1, 120, 1, 160, 1, 200, 1, 240, 1, 24, 2, +64, 2, 104, 2, 144, 2, 184, 2, 224, 2, 8, 3, 48, 3, 88, 3, +128, 3, 168, 3, 208, 3, 248, 3, 32, 4, 72, 4, 112, 4, 152, 4, +192, 4, 232, 4, 16, 5, 56, 5, 96, 5, 136, 5, 176, 5, 216, 5, +0, 6, 40, 6, 80, 6, 120, 6, 160, 6, 200, 6, 240, 6, 24, 7, +64, 7, 104, 7, 144, 7, 184, 7, 224, 7, 8, 8, 48, 8, 88, 8, +128, 8, 168, 8, 208, 8, 248, 8, 32, 9, 72, 9, 112, 9, 152, 9, +192, 9, 232, 9, 16, 10, 56, 10, 96, 10, 136, 10, 176, 10, 216, 10, +0, 11, 40, 11, 80, 11, 120, 11, 160, 11, 200, 11, 240, 11, 24, 12, +64, 12, 104, 12, 144, 12, 184, 12, 224, 12, 8, 13, 48, 13, 88, 13, +128, 13, 168, 13, 208, 13, 248, 13, 32, 14, 72, 14, 112, 14, 152, 14, +192, 14, 232, 14, 16, 15, 56, 15, 96, 15, 136, 15, 176, 15, 216, 15, +0, 16, 40, 16, 80, 16, 120, 16, 160, 16, 200, 16, 240, 16, 24, 17, +64, 17, 104, 17, 144, 17, 184, 17, 224, 17, 8, 18, 48, 18, 88, 18, +128, 18, 168, 18, 208, 18, 248, 18, 32, 19, 72, 19, 112, 19, 152, 19, +192, 19, 232, 19, 16, 20, 56, 20, 96, 20, 136, 20, 176, 20, 216, 20, +0, 21, 40, 21, 80, 21, 120, 21, 160, 21, 200, 21, 240, 21, 24, 22, +64, 22, 104, 22, 144, 22, 184, 22, 224, 22, 8, 23, 48, 23, 88, 23, +128, 23, 168, 23, 208, 23, 248, 23, 32, 24, 72, 24, 112, 24, 152, 24, +192, 24, 232, 24, 16, 25, 56, 25, 96, 25, 136, 25, 176, 25, 216, 25, +0, 26, 40, 26, 80, 26, 120, 26, 160, 26, 200, 26, 240, 26, 24, 27, +64, 27, 104, 27, 144, 27, 184, 27, 224, 27, 8, 28, 48, 28, 88, 28, +128, 28, 168, 28, 208, 28, 248, 28, 32, 29, 72, 29, 112, 29, 152, 29, +192, 29, 232, 29, 16, 30, 56, 30, 96, 30, 136, 30, 176, 30, 216, 30, +0, 31, 40, 31, 80, 31, 120, 31, 160, 31, 200, 31, 240, 31, 24, 32, +64, 32, 104, 32, 144, 32, 184, 32, 224, 32, 8, 33, 48, 33, 88, 33, +128, 33, 168, 33, 208, 33, 248, 33, 32, 34, 72, 34, 112, 34, 152, 34, +192, 34, 232, 34, 16, 35, 56, 35, 96, 35, 136, 35, 176, 35, 216, 35, +0, 36, 40, 36, 80, 36, 120, 36, 160, 36, 200, 36, 240, 36, 24, 37, +64, 37, 104, 37, 144, 37, 184, 37, 224, 37, 8, 38, 48, 38, 88, 38, +128, 38, 168, 38, 208, 38, 248, 38, 32, 39, 72, 39, 112, 39, 152, 39, +192, 39, 232, 39, 16, 40, 56, 40, 96, 40, 136, 40, 176, 40, 216, 40, +0, 41, 40, 41, 80, 41, 120, 41, 160, 41, 200, 41, 240, 41, 24, 42, +64, 42, 104, 42, 144, 42, 184, 42, 224, 42, 8, 43, 48, 43, 88, 43, +128, 43, 168, 43, 208, 43, 248, 43, 32, 44, 72, 44, 112, 44, 152, 44, +192, 44, 232, 44, 16, 45, 56, 45, 96, 45, 136, 45, 176, 45, 216, 45, +0, 46, 40, 46, 80, 46, 120, 46, 160, 46, 200, 46, 240, 46, 24, 47, +64, 47, 104, 47, 144, 47, 184, 47, 224, 47, 8, 48, 48, 48, 88, 48, +128, 48, 168, 48, 208, 48, 248, 48, 32, 49, 72, 49, 112, 49, 152, 49, +192, 49, 232, 49, 16, 50, 56, 50, 96, 50, 136, 50, 176, 50, 216, 50, +0, 51, 40, 51, 80, 51, 120, 51, 160, 51, 200, 51, 240, 51, 24, 52, +64, 52, 104, 52, 144, 52, 184, 52, 224, 52, 8, 53, 48, 53, 88, 53, +128, 53, 168, 53, 208, 53, 248, 53, 32, 54, 72, 54, 112, 54, 152, 54, +192, 54, 232, 54, 16, 55, 56, 55, 96, 55, 136, 55, 176, 55, 216, 55, +0, 56, 40, 56, 80, 56, 120, 56, 160, 56, 200, 56, 240, 56, 24, 57, +64, 57, 104, 57, 144, 57, 184, 57, 224, 57, 8, 58, 48, 58, 88, 58, +128, 58, 168, 58, 208, 58, 248, 58, 32, 59, 72, 59, 112, 59, 152, 59, +192, 59, 232, 59, 16, 60, 56, 60, 96, 60, 136, 60, 176, 60, 216, 60, +0, 61, 40, 61, 80, 61, 120, 61, 160, 61, 200, 61, 240, 61, 24, 62, +64, 62, 104, 62, 144, 62, 184, 62, 224, 62, 8, 63, 48, 63, 88, 63, +128, 63, 168, 63, 208, 63, 248, 63, 32, 64, 72, 64, 112, 64, 152, 64, +192, 64, 232, 64, 16, 65, 56, 65, 96, 65, 136, 65, 176, 65, 216, 65, +0, 66, 40, 66, 80, 66, 120, 66, 160, 66, 200, 66, 240, 66, 24, 67, +64, 67, 104, 67, 144, 67, 184, 67, 224, 67, 8, 68, 48, 68, 88, 68, +128, 68, 168, 68, 208, 68, 248, 68, 32, 69, 72, 69, 112, 69, 152, 69, +192, 69, 232, 69, 16, 70, 56, 70, 96, 70, 136, 70, 176, 70, 216, 70, +0, 71, 40, 71, 80, 71, 120, 71, 160, 71, 200, 71, 240, 71, 24, 72, +64, 72, 104, 72, 144, 72, 184, 72, 224, 72, 8, 73, 48, 73, 88, 73, +128, 73, 168, 73, 208, 73, 248, 73, 32, 74, 72, 74, 112, 74, 152, 74, +192, 74, 232, 74, 16, 75, 56, 75, 96, 75, 136, 75, 176, 75, 216, 75, +0, 76, 40, 76, 80, 76, 120, 76, 160, 76, 200, 76, 240, 76, 24, 77, +64, 77, 104, 77, 144, 77, 184, 77, 224, 77, 8, 78, 48, 78, 88, 78, +128, 78, 168, 78, 208, 78, 248, 78, 32, 79, 72, 79, 112, 79, 152, 79, +192, 79, 232, 79, 16, 80, 56, 80, 96, 80, 136, 80, 176, 80, 216, 80, +0, 81, 40, 81, 80, 81, 120, 81, 160, 81, 200, 81, 240, 81, 24, 82, +64, 82, 104, 82, 144, 82, 184, 82, 224, 82, 8, 83, 48, 83, 88, 83, +128, 83, 168, 83, 208, 83, 248, 83, 32, 84, 72, 84, 112, 84, 152, 84, +192, 84, 232, 84, 16, 85, 56, 85, 96, 85, 136, 85, 176, 85, 216, 85, +0, 86, 40, 86, 80, 86, 120, 86, 160, 86, 200, 86, 240, 86, 24, 87, +64, 87, 104, 87, 144, 87, 184, 87, 224, 87, 8, 88, 48, 88, 88, 88, +128, 88, 168, 88, 208, 88, 248, 88, 32, 89, 72, 89, 112, 89, 152, 89, +192, 89, 232, 89, 16, 90, 56, 90, 96, 90, 136, 90, 176, 90, 216, 90, +0, 91, 40, 91, 80, 91, 120, 91, 160, 91, 200, 91, 240, 91, 24, 92, +64, 92, 104, 92, 144, 92, 184, 92, 224, 92, 8, 93, 48, 93, 88, 93, +128, 93, 168, 93, 208, 93, 248, 93, 32, 94, 72, 94, 112, 94, 152, 94, +192, 94, 232, 94, 16, 95, 56, 95, 96, 95, 136, 95, 176, 95, 216, 95, +0, 96, 40, 96, 80, 96, 120, 96, 160, 96, 200, 96, 240, 96, 24, 97, +64, 97, 104, 97, 144, 97, 184, 97, 224, 97, 8, 98, 48, 98, 88, 98, +128, 98, 168, 98, 208, 98, 248, 98, 32, 99, 72, 99, 112, 99, 152, 99, +192, 99, 232, 99, 16, 100, 56, 100, 96, 100, 136, 100, 176, 100, 216, 100, +0, 101, 40, 101, 80, 101, 120, 101, 160, 101, 200, 101, 240, 101, 24, 102, +64, 102, 104, 102, 144, 102, 184, 102, 224, 102, 8, 103, 48, 103, 88, 103, +128, 103, 168, 103, 208, 103, 248, 103, 32, 104, 72, 104, 112, 104, 152, 104, +192, 104, 232, 104, 16, 105, 56, 105, 96, 105, 136, 105, 176, 105, 216, 105, +0, 106, 40, 106, 80, 106, 120, 106, 160, 106, 200, 106, 240, 106, 24, 107, +64, 107, 104, 107, 144, 107, 184, 107, 224, 107, 8, 108, 48, 108, 88, 108, +128, 108, 168, 108, 208, 108, 248, 108, 32, 109, 72, 109, 112, 109, 152, 109, +192, 109, 232, 109, 16, 110, 56, 110, 96, 110, 136, 110, 176, 110, 216, 110, +0, 111, 40, 111, 80, 111, 120, 111, 160, 111, 200, 111, 240, 111, 24, 112, +64, 112, 104, 112, 144, 112, 184, 112, 224, 112, 8, 113, 48, 113, 88, 113, +128, 113, 168, 113, 208, 113, 248, 113, 32, 114, 72, 114, 112, 114, 152, 114, +192, 114, 232, 114, 16, 115, 56, 115, 96, 115, 136, 115, 176, 115, 216, 115, +0, 116, 40, 116, 80, 116, 120, 116, 160, 116, 200, 116, 240, 116, 24, 117, +64, 117, 104, 117, 144, 117, 184, 117, 224, 117, 8, 118, 48, 118, 88, 118, +128, 118, 168, 118, 208, 118, 248, 118, 32, 119, 72, 119, 112, 119, 152, 119, +192, 119, 232, 119, 16, 120, 56, 120, 96, 120, 136, 120, 176, 120, 216, 120, +0, 121, 40, 121, 80, 121, 120, 121, 160, 121, 200, 121, 240, 121, 24, 122, +64, 122, 104, 122, 144, 122, 184, 122, 224, 122, 8, 123, 48, 123, 88, 123, +128, 123, 168, 123, 208, 123, 248, 123, 32, 124, 72, 124, 112, 124, 152, 124, +192, 124, 232, 124, 16, 125, 56, 125, 96, 125, 136, 125, 176, 125, 216, 125, +0, 126, 40, 126, 80, 126, 120, 126, 160, 126, 200, 126, 240, 126, 24, 127, +64, 127, 104, 127, 144, 127, 184, 127, 224, 127, 8, 128, 48, 128, 88, 128, +128, 128, 168, 128, 208, 128, 248, 128, 32, 129, 72, 129, 112, 129, 152, 129, +192, 129, 232, 129, 16, 130, 56, 130, 96, 130, 136, 130, 176, 130, 216, 130, +0, 131, 40, 131, 80, 131, 120, 131, 160, 131, 200, 131, 240, 131, 24, 132, +64, 132, 104, 132, 144, 132, 184, 132, 224, 132, 8, 133, 48, 133, 88, 133, +128, 133, 168, 133, 208, 133, 248, 133, 32, 134, 72, 134, 112, 134, 152, 134, +192, 134, 232, 134, 16, 135, 56, 135, 96, 135, 136, 135, 176, 135, 216, 135, +0, 136, 40, 136, 80, 136, 120, 136, 160, 136, 200, 136, 240, 136, 24, 137, +64, 137, 104, 137, 144, 137, 184, 137, 224, 137, 8, 138, 48, 138, 88, 138, +128, 138, 168, 138, 208, 138, 248, 138, 32, 139, 72, 139, 112, 139, 152, 139, +192, 139, 232, 139, 16, 140, 56, 140, 96, 140, 136, 140, 176, 140, 216, 140, +0, 141, 40, 141, 80, 141, 120, 141, 160, 141, 200, 141, 240, 141, 24, 142, +64, 142, 104, 142, 144, 142, 184, 142, 224, 142, 8, 143, 48, 143, 88, 143, +128, 143, 168, 143, 208, 143, 248, 143, 32, 144, 72, 144, 112, 144, 152, 144, +192, 144, 232, 144, 16, 145, 56, 145, 96, 145, 136, 145, 176, 145, 216, 145, +0, 146, 40, 146, 80, 146, 120, 146, 160, 146, 200, 146, 240, 146, 24, 147, +64, 147, 104, 147, 144, 147, 184, 147, 224, 147, 8, 148, 48, 148, 88, 148, +128, 148, 168, 148, 208, 148, 248, 148, 32, 149, 72, 149, 112, 149, 152, 149, +192, 149, 232, 149, 16, 150, 56, 150, 96, 150, 136, 150, 176, 150, 216, 150, +0, 151, 40, 151, 80, 151, 120, 151, 160, 151, 200, 151, 240, 151, 24, 152, +64, 152, 104, 152, 144, 152, 184, 152, 224, 152, 8, 153, 48, 153, 88, 153, +128, 153, 168, 153, 208, 153, 248, 153, 32, 154, 72, 154, 112, 154, 152, 154, +192, 154, 232, 154, 16, 155, 56, 155, 96, 155, 136, 155, 176, 155, 216, 155, +0, 156, 40, 156, 80, 156, 120, 156, 160, 156, 200, 156, 240, 156, 24, 157, +64, 157, 104, 157, 144, 157, 184, 157, 224, 157, 8, 158, 48, 158, 88, 158, +128, 158, 168, 158, 208, 158, 248, 158, 32, 159, 72, 159, 112, 159, 152, 159, +192, 159, 232, 159, 16, 160, 56, 160, 96, 160, 136, 160, 176, 160, 216, 160, +0, 161, 40, 161, 80, 161, 120, 161, 160, 161, 200, 161, 240, 161, 24, 162, +64, 162, 104, 162, 144, 162, 184, 162, 224, 162, 8, 163, 48, 163, 88, 163, +128, 163, 168, 163, 208, 163, 248, 163, 32, 164, 72, 164, 112, 164, 152, 164, +192, 164, 232, 164, 16, 165, 56, 165, 96, 165, 136, 165, 176, 165, 216, 165, +0, 166, 40, 166, 80, 166, 120, 166, 160, 166, 200, 166, 240, 166, 24, 167, +64, 167, 104, 167, 144, 167, 184, 167, 224, 167, 8, 168, 48, 168, 88, 168, +128, 168, 168, 168, 208, 168, 248, 168, 32, 169, 72, 169, 112, 169, 152, 169, +192, 169, 232, 169, 16, 170, 56, 170, 96, 170, 136, 170, 176, 170, 216, 170, +0, 171, 40, 171, 80, 171, 120, 171, 160, 171, 200, 171, 240, 171, 24, 172, +64, 172, 104, 172, 144, 172, 184, 172, 224, 172, 8, 173, 48, 173, 88, 173, +128, 173, 168, 173, 208, 173, 248, 173, 32, 174, 72, 174, 112, 174, 152, 174, +192, 174, 232, 174, 16, 175, 56, 175, 96, 175, 136, 175, 176, 175, 216, 175, +0, 176, 40, 176, 80, 176, 120, 176, 160, 176, 200, 176, 240, 176, 24, 177, +64, 177, 104, 177, 144, 177, 184, 177, 224, 177, 8, 178, 48, 178, 88, 178, +128, 178, 168, 178, 208, 178, 248, 178, 32, 179, 72, 179, 112, 179, 152, 179, +192, 179, 232, 179, 16, 180, 56, 180, 96, 180, 136, 180, 176, 180, 216, 180, +0, 181, 40, 181, 80, 181, 120, 181, 160, 181, 200, 181, 240, 181, 24, 182, +64, 182, 104, 182, 144, 182, 184, 182, 224, 182, 8, 183, 48, 183, 88, 183, +128, 183, 168, 183, 208, 183, 248, 183, 32, 184, 72, 184, 112, 184, 152, 184, +192, 184, 232, 184, 16, 185, 56, 185, 96, 185, 136, 185, 176, 185, 216, 185, +0, 186, 40, 186, 80, 186, 120, 186, 160, 186, 200, 186, 240, 186, 24, 187, +64, 187, 104, 187, 144, 187, 184, 187, 224, 187, 8, 188, 48, 188, 88, 188, +128, 188, 168, 188, 208, 188, 248, 188, 32, 189, 72, 189, 112, 189, 152, 189, +192, 189, 232, 189, 16, 190, 56, 190, 96, 190, 136, 190, 176, 190, 216, 190, +0, 191, 40, 191, 80, 191, 120, 191, 160, 191, 200, 191, 240, 191, 24, 192, +64, 192, 104, 192, 144, 192, 184, 192, 224, 192, 8, 193, 48, 193, 88, 193, +128, 193, 168, 193, 208, 193, 248, 193, 32, 194, 72, 194, 112, 194, 152, 194, +192, 194, 232, 194, 16, 195, 56, 195, 96, 195, 136, 195, 176, 195, 216, 195, +0, 196, 40, 196, 80, 196, 120, 196, 160, 196, 200, 196, 240, 196, 24, 197, +64, 197, 104, 197, 144, 197, 184, 197, 224, 197, 8, 198, 48, 198, 88, 198, +128, 198, 168, 198, 208, 198, 248, 198, 32, 199, 72, 199, 112, 199, 152, 199, +192, 199, 232, 199, 16, 200, 56, 200, 96, 200, 136, 200, 176, 200, 216, 200, +0, 201, 40, 201, 80, 201, 120, 201, 160, 201, 200, 201, 240, 201, 24, 202, +64, 202, 104, 202, 144, 202, 184, 202, 224, 202, 8, 203, 48, 203, 88, 203, +128, 203, 168, 203, 208, 203, 248, 203, 32, 204, 72, 204, 112, 204, 152, 204, +192, 204, 232, 204, 16, 205, 56, 205, 96, 205, 136, 205, 176, 205, 216, 205, +0, 206, 40, 206, 80, 206, 120, 206, 160, 206, 200, 206, 240, 206, 24, 207, +64, 207, 104, 207, 144, 207, 184, 207, 224, 207, 8, 208, 48, 208, 88, 208, +128, 208, 168, 208, 208, 208, 248, 208, 32, 209, 72, 209, 112, 209, 152, 209, +192, 209, 232, 209, 16, 210, 56, 210, 96, 210, 136, 210, 176, 210, 216, 210, +0, 211, 40, 211, 80, 211, 120, 211, 160, 211, 200, 211, 240, 211, 24, 212, +64, 212, 104, 212, 144, 212, 184, 212, 224, 212, 8, 213, 48, 213, 88, 213, +128, 213, 168, 213, 208, 213, 248, 213, 32, 214, 72, 214, 112, 214, 152, 214, +192, 214, 232, 214, 16, 215, 56, 215, 96, 215, 136, 215, 176, 215, 216, 215, +0, 224, 40, 224, 80, 224, 120, 224, 160, 224, 200, 224, 240, 224, 24, 225, +64, 225, 104, 225, 144, 225, 184, 225, 224, 225, 8, 226, 48, 226, 88, 226, +128, 226, 168, 226, 208, 226, 248, 226, 32, 227, 72, 227, 112, 227, 152, 227, +192, 227, 232, 227, 16, 228, 56, 228, 96, 228, 136, 228, 176, 228, 216, 228, +0, 229, 40, 229, 80, 229, 120, 229, 160, 229, 200, 229, 240, 229, 24, 230, +64, 230, 104, 230, 144, 230, 184, 230, 224, 230, 8, 231, 48, 231, 88, 231, +128, 231, 168, 231, 208, 231, 248, 231, 32, 232, 72, 232, 112, 232, 152, 232, +192, 232, 232, 232, 16, 233, 56, 233, 96, 233, 136, 233, 176, 233, 216, 233, +0, 234, 40, 234, 80, 234, 120, 234, 160, 234, 200, 234, 240, 234, 24, 235, +64, 235, 104, 235, 144, 235, 184, 235, 224, 235, 8, 236, 48, 236, 88, 236, +128, 236, 168, 236, 208, 236, 248, 236, 32, 237, 72, 237, 112, 237, 152, 237, +192, 237, 232, 237, 16, 238, 56, 238, 96, 238, 136, 238, 176, 238, 216, 238, +0, 239, 40, 239, 80, 239, 120, 239, 160, 239, 200, 239, 240, 239, 24, 240, +64, 240, 104, 240, 144, 240, 184, 240, 224, 240, 8, 241, 48, 241, 88, 241, +128, 241, 168, 241, 208, 241, 248, 241, 32, 242, 72, 242, 112, 242, 152, 242, +192, 242, 232, 242, 16, 243, 56, 243, 96, 243, 136, 243, 176, 243, 216, 243, +0, 244, 40, 244, 80, 244, 120, 244, 160, 244, 200, 244, 240, 244, 24, 245, +64, 245, 104, 245, 144, 245, 184, 245, 224, 245, 8, 246, 48, 246, 88, 246, +128, 246, 168, 246, 208, 246, 248, 246, 32, 247, 72, 247, 112, 247, 152, 247, +192, 247, 232, 247, 16, 248, 56, 248, 96, 248, 136, 248, 176, 248, 216, 248, +0, 249, 40, 249, 80, 249, 120, 249, 160, 249, 200, 249, 240, 249, 24, 250, +64, 250, 104, 250, 144, 250, 184, 250, 224, 250, 8, 251, 48, 251, 88, 251, +128, 251, 168, 251, 208, 251, 248, 251, 32, 252, 72, 252, 112, 252, 152, 252, +192, 252, 232, 252, 16, 253, 56, 253, 96, 253, 136, 253, 176, 253, 216, 253, +0, 254, 40, 254, 80, 254, 120, 254, 160, 254, 200, 254, 240, 254, 24, 255, +64, 255, 104, 255, 144, 255, 184, 255, 224, 255 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16_Android.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16_Android.java new file mode 100644 index 0000000..ac351d1 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_16_Android.java @@ -0,0 +1,388 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.UTF_16.class) + +public class Charset_MultiByte_UTF_16_Android extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "UTF-16"; + + testChars = theseChars(new int[]{ +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, +176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, +192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, +208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, +224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, +240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, +256, 296, 336, 376, 416, 456, 496, 536, 576, 616, 656, 696, 736, 776, 816, 856, +896, 936, 976, 1016, 1056, 1096, 1136, 1176, 1216, 1256, 1296, 1336, 1376, 1416, 1456, 1496, +1536, 1576, 1616, 1656, 1696, 1736, 1776, 1816, 1856, 1896, 1936, 1976, 2016, 2056, 2096, 2136, +2176, 2216, 2256, 2296, 2336, 2376, 2416, 2456, 2496, 2536, 2576, 2616, 2656, 2696, 2736, 2776, +2816, 2856, 2896, 2936, 2976, 3016, 3056, 3096, 3136, 3176, 3216, 3256, 3296, 3336, 3376, 3416, +3456, 3496, 3536, 3576, 3616, 3656, 3696, 3736, 3776, 3816, 3856, 3896, 3936, 3976, 4016, 4056, +4096, 4136, 4176, 4216, 4256, 4296, 4336, 4376, 4416, 4456, 4496, 4536, 4576, 4616, 4656, 4696, +4736, 4776, 4816, 4856, 4896, 4936, 4976, 5016, 5056, 5096, 5136, 5176, 5216, 5256, 5296, 5336, +5376, 5416, 5456, 5496, 5536, 5576, 5616, 5656, 5696, 5736, 5776, 5816, 5856, 5896, 5936, 5976, +6016, 6056, 6096, 6136, 6176, 6216, 6256, 6296, 6336, 6376, 6416, 6456, 6496, 6536, 6576, 6616, +6656, 6696, 6736, 6776, 6816, 6856, 6896, 6936, 6976, 7016, 7056, 7096, 7136, 7176, 7216, 7256, +7296, 7336, 7376, 7416, 7456, 7496, 7536, 7576, 7616, 7656, 7696, 7736, 7776, 7816, 7856, 7896, +7936, 7976, 8016, 8056, 8096, 8136, 8176, 8216, 8256, 8296, 8336, 8376, 8416, 8456, 8496, 8536, +8576, 8616, 8656, 8696, 8736, 8776, 8816, 8856, 8896, 8936, 8976, 9016, 9056, 9096, 9136, 9176, +9216, 9256, 9296, 9336, 9376, 9416, 9456, 9496, 9536, 9576, 9616, 9656, 9696, 9736, 9776, 9816, +9856, 9896, 9936, 9976, 10016, 10056, 10096, 10136, 10176, 10216, 10256, 10296, 10336, 10376, 10416, 10456, +10496, 10536, 10576, 10616, 10656, 10696, 10736, 10776, 10816, 10856, 10896, 10936, 10976, 11016, 11056, 11096, +11136, 11176, 11216, 11256, 11296, 11336, 11376, 11416, 11456, 11496, 11536, 11576, 11616, 11656, 11696, 11736, +11776, 11816, 11856, 11896, 11936, 11976, 12016, 12056, 12096, 12136, 12176, 12216, 12256, 12296, 12336, 12376, +12416, 12456, 12496, 12536, 12576, 12616, 12656, 12696, 12736, 12776, 12816, 12856, 12896, 12936, 12976, 13016, +13056, 13096, 13136, 13176, 13216, 13256, 13296, 13336, 13376, 13416, 13456, 13496, 13536, 13576, 13616, 13656, +13696, 13736, 13776, 13816, 13856, 13896, 13936, 13976, 14016, 14056, 14096, 14136, 14176, 14216, 14256, 14296, +14336, 14376, 14416, 14456, 14496, 14536, 14576, 14616, 14656, 14696, 14736, 14776, 14816, 14856, 14896, 14936, +14976, 15016, 15056, 15096, 15136, 15176, 15216, 15256, 15296, 15336, 15376, 15416, 15456, 15496, 15536, 15576, +15616, 15656, 15696, 15736, 15776, 15816, 15856, 15896, 15936, 15976, 16016, 16056, 16096, 16136, 16176, 16216, +16256, 16296, 16336, 16376, 16416, 16456, 16496, 16536, 16576, 16616, 16656, 16696, 16736, 16776, 16816, 16856, +16896, 16936, 16976, 17016, 17056, 17096, 17136, 17176, 17216, 17256, 17296, 17336, 17376, 17416, 17456, 17496, +17536, 17576, 17616, 17656, 17696, 17736, 17776, 17816, 17856, 17896, 17936, 17976, 18016, 18056, 18096, 18136, +18176, 18216, 18256, 18296, 18336, 18376, 18416, 18456, 18496, 18536, 18576, 18616, 18656, 18696, 18736, 18776, +18816, 18856, 18896, 18936, 18976, 19016, 19056, 19096, 19136, 19176, 19216, 19256, 19296, 19336, 19376, 19416, +19456, 19496, 19536, 19576, 19616, 19656, 19696, 19736, 19776, 19816, 19856, 19896, 19936, 19976, 20016, 20056, +20096, 20136, 20176, 20216, 20256, 20296, 20336, 20376, 20416, 20456, 20496, 20536, 20576, 20616, 20656, 20696, +20736, 20776, 20816, 20856, 20896, 20936, 20976, 21016, 21056, 21096, 21136, 21176, 21216, 21256, 21296, 21336, +21376, 21416, 21456, 21496, 21536, 21576, 21616, 21656, 21696, 21736, 21776, 21816, 21856, 21896, 21936, 21976, +22016, 22056, 22096, 22136, 22176, 22216, 22256, 22296, 22336, 22376, 22416, 22456, 22496, 22536, 22576, 22616, +22656, 22696, 22736, 22776, 22816, 22856, 22896, 22936, 22976, 23016, 23056, 23096, 23136, 23176, 23216, 23256, +23296, 23336, 23376, 23416, 23456, 23496, 23536, 23576, 23616, 23656, 23696, 23736, 23776, 23816, 23856, 23896, +23936, 23976, 24016, 24056, 24096, 24136, 24176, 24216, 24256, 24296, 24336, 24376, 24416, 24456, 24496, 24536, +24576, 24616, 24656, 24696, 24736, 24776, 24816, 24856, 24896, 24936, 24976, 25016, 25056, 25096, 25136, 25176, +25216, 25256, 25296, 25336, 25376, 25416, 25456, 25496, 25536, 25576, 25616, 25656, 25696, 25736, 25776, 25816, +25856, 25896, 25936, 25976, 26016, 26056, 26096, 26136, 26176, 26216, 26256, 26296, 26336, 26376, 26416, 26456, +26496, 26536, 26576, 26616, 26656, 26696, 26736, 26776, 26816, 26856, 26896, 26936, 26976, 27016, 27056, 27096, +27136, 27176, 27216, 27256, 27296, 27336, 27376, 27416, 27456, 27496, 27536, 27576, 27616, 27656, 27696, 27736, +27776, 27816, 27856, 27896, 27936, 27976, 28016, 28056, 28096, 28136, 28176, 28216, 28256, 28296, 28336, 28376, +28416, 28456, 28496, 28536, 28576, 28616, 28656, 28696, 28736, 28776, 28816, 28856, 28896, 28936, 28976, 29016, +29056, 29096, 29136, 29176, 29216, 29256, 29296, 29336, 29376, 29416, 29456, 29496, 29536, 29576, 29616, 29656, +29696, 29736, 29776, 29816, 29856, 29896, 29936, 29976, 30016, 30056, 30096, 30136, 30176, 30216, 30256, 30296, +30336, 30376, 30416, 30456, 30496, 30536, 30576, 30616, 30656, 30696, 30736, 30776, 30816, 30856, 30896, 30936, +30976, 31016, 31056, 31096, 31136, 31176, 31216, 31256, 31296, 31336, 31376, 31416, 31456, 31496, 31536, 31576, +31616, 31656, 31696, 31736, 31776, 31816, 31856, 31896, 31936, 31976, 32016, 32056, 32096, 32136, 32176, 32216, +32256, 32296, 32336, 32376, 32416, 32456, 32496, 32536, 32576, 32616, 32656, 32696, 32736, 32776, 32816, 32856, +32896, 32936, 32976, 33016, 33056, 33096, 33136, 33176, 33216, 33256, 33296, 33336, 33376, 33416, 33456, 33496, +33536, 33576, 33616, 33656, 33696, 33736, 33776, 33816, 33856, 33896, 33936, 33976, 34016, 34056, 34096, 34136, +34176, 34216, 34256, 34296, 34336, 34376, 34416, 34456, 34496, 34536, 34576, 34616, 34656, 34696, 34736, 34776, +34816, 34856, 34896, 34936, 34976, 35016, 35056, 35096, 35136, 35176, 35216, 35256, 35296, 35336, 35376, 35416, +35456, 35496, 35536, 35576, 35616, 35656, 35696, 35736, 35776, 35816, 35856, 35896, 35936, 35976, 36016, 36056, +36096, 36136, 36176, 36216, 36256, 36296, 36336, 36376, 36416, 36456, 36496, 36536, 36576, 36616, 36656, 36696, +36736, 36776, 36816, 36856, 36896, 36936, 36976, 37016, 37056, 37096, 37136, 37176, 37216, 37256, 37296, 37336, +37376, 37416, 37456, 37496, 37536, 37576, 37616, 37656, 37696, 37736, 37776, 37816, 37856, 37896, 37936, 37976, +38016, 38056, 38096, 38136, 38176, 38216, 38256, 38296, 38336, 38376, 38416, 38456, 38496, 38536, 38576, 38616, +38656, 38696, 38736, 38776, 38816, 38856, 38896, 38936, 38976, 39016, 39056, 39096, 39136, 39176, 39216, 39256, +39296, 39336, 39376, 39416, 39456, 39496, 39536, 39576, 39616, 39656, 39696, 39736, 39776, 39816, 39856, 39896, +39936, 39976, 40016, 40056, 40096, 40136, 40176, 40216, 40256, 40296, 40336, 40376, 40416, 40456, 40496, 40536, +40576, 40616, 40656, 40696, 40736, 40776, 40816, 40856, 40896, 40936, 40976, 41016, 41056, 41096, 41136, 41176, +41216, 41256, 41296, 41336, 41376, 41416, 41456, 41496, 41536, 41576, 41616, 41656, 41696, 41736, 41776, 41816, +41856, 41896, 41936, 41976, 42016, 42056, 42096, 42136, 42176, 42216, 42256, 42296, 42336, 42376, 42416, 42456, +42496, 42536, 42576, 42616, 42656, 42696, 42736, 42776, 42816, 42856, 42896, 42936, 42976, 43016, 43056, 43096, +43136, 43176, 43216, 43256, 43296, 43336, 43376, 43416, 43456, 43496, 43536, 43576, 43616, 43656, 43696, 43736, +43776, 43816, 43856, 43896, 43936, 43976, 44016, 44056, 44096, 44136, 44176, 44216, 44256, 44296, 44336, 44376, +44416, 44456, 44496, 44536, 44576, 44616, 44656, 44696, 44736, 44776, 44816, 44856, 44896, 44936, 44976, 45016, +45056, 45096, 45136, 45176, 45216, 45256, 45296, 45336, 45376, 45416, 45456, 45496, 45536, 45576, 45616, 45656, +45696, 45736, 45776, 45816, 45856, 45896, 45936, 45976, 46016, 46056, 46096, 46136, 46176, 46216, 46256, 46296, +46336, 46376, 46416, 46456, 46496, 46536, 46576, 46616, 46656, 46696, 46736, 46776, 46816, 46856, 46896, 46936, +46976, 47016, 47056, 47096, 47136, 47176, 47216, 47256, 47296, 47336, 47376, 47416, 47456, 47496, 47536, 47576, +47616, 47656, 47696, 47736, 47776, 47816, 47856, 47896, 47936, 47976, 48016, 48056, 48096, 48136, 48176, 48216, +48256, 48296, 48336, 48376, 48416, 48456, 48496, 48536, 48576, 48616, 48656, 48696, 48736, 48776, 48816, 48856, +48896, 48936, 48976, 49016, 49056, 49096, 49136, 49176, 49216, 49256, 49296, 49336, 49376, 49416, 49456, 49496, +49536, 49576, 49616, 49656, 49696, 49736, 49776, 49816, 49856, 49896, 49936, 49976, 50016, 50056, 50096, 50136, +50176, 50216, 50256, 50296, 50336, 50376, 50416, 50456, 50496, 50536, 50576, 50616, 50656, 50696, 50736, 50776, +50816, 50856, 50896, 50936, 50976, 51016, 51056, 51096, 51136, 51176, 51216, 51256, 51296, 51336, 51376, 51416, +51456, 51496, 51536, 51576, 51616, 51656, 51696, 51736, 51776, 51816, 51856, 51896, 51936, 51976, 52016, 52056, +52096, 52136, 52176, 52216, 52256, 52296, 52336, 52376, 52416, 52456, 52496, 52536, 52576, 52616, 52656, 52696, +52736, 52776, 52816, 52856, 52896, 52936, 52976, 53016, 53056, 53096, 53136, 53176, 53216, 53256, 53296, 53336, +53376, 53416, 53456, 53496, 53536, 53576, 53616, 53656, 53696, 53736, 53776, 53816, 53856, 53896, 53936, 53976, +54016, 54056, 54096, 54136, 54176, 54216, 54256, 54296, 54336, 54376, 54416, 54456, 54496, 54536, 54576, 54616, +54656, 54696, 54736, 54776, 54816, 54856, 54896, 54936, 54976, 55016, 55056, 55096, 55136, 55176, 55216, 55256, +57344, 57384, 57424, 57464, 57504, 57544, 57584, 57624, 57664, 57704, 57744, 57784, 57824, 57864, 57904, 57944, +57984, 58024, 58064, 58104, 58144, 58184, 58224, 58264, 58304, 58344, 58384, 58424, 58464, 58504, 58544, 58584, +58624, 58664, 58704, 58744, 58784, 58824, 58864, 58904, 58944, 58984, 59024, 59064, 59104, 59144, 59184, 59224, +59264, 59304, 59344, 59384, 59424, 59464, 59504, 59544, 59584, 59624, 59664, 59704, 59744, 59784, 59824, 59864, +59904, 59944, 59984, 60024, 60064, 60104, 60144, 60184, 60224, 60264, 60304, 60344, 60384, 60424, 60464, 60504, +60544, 60584, 60624, 60664, 60704, 60744, 60784, 60824, 60864, 60904, 60944, 60984, 61024, 61064, 61104, 61144, +61184, 61224, 61264, 61304, 61344, 61384, 61424, 61464, 61504, 61544, 61584, 61624, 61664, 61704, 61744, 61784, +61824, 61864, 61904, 61944, 61984, 62024, 62064, 62104, 62144, 62184, 62224, 62264, 62304, 62344, 62384, 62424, +62464, 62504, 62544, 62584, 62624, 62664, 62704, 62744, 62784, 62824, 62864, 62904, 62944, 62984, 63024, 63064, +63104, 63144, 63184, 63224, 63264, 63304, 63344, 63384, 63424, 63464, 63504, 63544, 63584, 63624, 63664, 63704, +63744, 63784, 63824, 63864, 63904, 63944, 63984, 64024, 64064, 64104, 64144, 64184, 64224, 64264, 64304, 64344, +64384, 64424, 64464, 64504, 64544, 64584, 64624, 64664, 64704, 64744, 64784, 64824, 64864, 64904, 64944, 64984, +65024, 65064, 65104, 65144, 65184, 65224, 65264, 65304, 65344, 65384, 65424, 65464, 65504 + }); + + testBytes = theseBytes(new int[]{ +255, 254, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, +39, 0, 40, 0, 41, 0, 42, 0, 43, 0, 44, 0, 45, 0, 46, 0, +47, 0, 48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0, 54, 0, +55, 0, 56, 0, 57, 0, 58, 0, 59, 0, 60, 0, 61, 0, 62, 0, +63, 0, 64, 0, 65, 0, 66, 0, 67, 0, 68, 0, 69, 0, 70, 0, +71, 0, 72, 0, 73, 0, 74, 0, 75, 0, 76, 0, 77, 0, 78, 0, +79, 0, 80, 0, 81, 0, 82, 0, 83, 0, 84, 0, 85, 0, 86, 0, +87, 0, 88, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, +95, 0, 96, 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0, +103, 0, 104, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, 110, 0, +111, 0, 112, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, +119, 0, 120, 0, 121, 0, 122, 0, 123, 0, 124, 0, 125, 0, 126, 0, +127, 0, 128, 0, 129, 0, 130, 0, 131, 0, 132, 0, 133, 0, 134, 0, +135, 0, 136, 0, 137, 0, 138, 0, 139, 0, 140, 0, 141, 0, 142, 0, +143, 0, 144, 0, 145, 0, 146, 0, 147, 0, 148, 0, 149, 0, 150, 0, +151, 0, 152, 0, 153, 0, 154, 0, 155, 0, 156, 0, 157, 0, 158, 0, +159, 0, 160, 0, 161, 0, 162, 0, 163, 0, 164, 0, 165, 0, 166, 0, +167, 0, 168, 0, 169, 0, 170, 0, 171, 0, 172, 0, 173, 0, 174, 0, +175, 0, 176, 0, 177, 0, 178, 0, 179, 0, 180, 0, 181, 0, 182, 0, +183, 0, 184, 0, 185, 0, 186, 0, 187, 0, 188, 0, 189, 0, 190, 0, +191, 0, 192, 0, 193, 0, 194, 0, 195, 0, 196, 0, 197, 0, 198, 0, +199, 0, 200, 0, 201, 0, 202, 0, 203, 0, 204, 0, 205, 0, 206, 0, +207, 0, 208, 0, 209, 0, 210, 0, 211, 0, 212, 0, 213, 0, 214, 0, +215, 0, 216, 0, 217, 0, 218, 0, 219, 0, 220, 0, 221, 0, 222, 0, +223, 0, 224, 0, 225, 0, 226, 0, 227, 0, 228, 0, 229, 0, 230, 0, +231, 0, 232, 0, 233, 0, 234, 0, 235, 0, 236, 0, 237, 0, 238, 0, +239, 0, 240, 0, 241, 0, 242, 0, 243, 0, 244, 0, 245, 0, 246, 0, +247, 0, 248, 0, 249, 0, 250, 0, 251, 0, 252, 0, 253, 0, 254, 0, +255, 0, 0, 1, 40, 1, 80, 1, 120, 1, 160, 1, 200, 1, 240, 1, +24, 2, 64, 2, 104, 2, 144, 2, 184, 2, 224, 2, 8, 3, 48, 3, +88, 3, 128, 3, 168, 3, 208, 3, 248, 3, 32, 4, 72, 4, 112, 4, +152, 4, 192, 4, 232, 4, 16, 5, 56, 5, 96, 5, 136, 5, 176, 5, +216, 5, 0, 6, 40, 6, 80, 6, 120, 6, 160, 6, 200, 6, 240, 6, +24, 7, 64, 7, 104, 7, 144, 7, 184, 7, 224, 7, 8, 8, 48, 8, +88, 8, 128, 8, 168, 8, 208, 8, 248, 8, 32, 9, 72, 9, 112, 9, +152, 9, 192, 9, 232, 9, 16, 10, 56, 10, 96, 10, 136, 10, 176, 10, +216, 10, 0, 11, 40, 11, 80, 11, 120, 11, 160, 11, 200, 11, 240, 11, +24, 12, 64, 12, 104, 12, 144, 12, 184, 12, 224, 12, 8, 13, 48, 13, +88, 13, 128, 13, 168, 13, 208, 13, 248, 13, 32, 14, 72, 14, 112, 14, +152, 14, 192, 14, 232, 14, 16, 15, 56, 15, 96, 15, 136, 15, 176, 15, +216, 15, 0, 16, 40, 16, 80, 16, 120, 16, 160, 16, 200, 16, 240, 16, +24, 17, 64, 17, 104, 17, 144, 17, 184, 17, 224, 17, 8, 18, 48, 18, +88, 18, 128, 18, 168, 18, 208, 18, 248, 18, 32, 19, 72, 19, 112, 19, +152, 19, 192, 19, 232, 19, 16, 20, 56, 20, 96, 20, 136, 20, 176, 20, +216, 20, 0, 21, 40, 21, 80, 21, 120, 21, 160, 21, 200, 21, 240, 21, +24, 22, 64, 22, 104, 22, 144, 22, 184, 22, 224, 22, 8, 23, 48, 23, +88, 23, 128, 23, 168, 23, 208, 23, 248, 23, 32, 24, 72, 24, 112, 24, +152, 24, 192, 24, 232, 24, 16, 25, 56, 25, 96, 25, 136, 25, 176, 25, +216, 25, 0, 26, 40, 26, 80, 26, 120, 26, 160, 26, 200, 26, 240, 26, +24, 27, 64, 27, 104, 27, 144, 27, 184, 27, 224, 27, 8, 28, 48, 28, +88, 28, 128, 28, 168, 28, 208, 28, 248, 28, 32, 29, 72, 29, 112, 29, +152, 29, 192, 29, 232, 29, 16, 30, 56, 30, 96, 30, 136, 30, 176, 30, +216, 30, 0, 31, 40, 31, 80, 31, 120, 31, 160, 31, 200, 31, 240, 31, +24, 32, 64, 32, 104, 32, 144, 32, 184, 32, 224, 32, 8, 33, 48, 33, +88, 33, 128, 33, 168, 33, 208, 33, 248, 33, 32, 34, 72, 34, 112, 34, +152, 34, 192, 34, 232, 34, 16, 35, 56, 35, 96, 35, 136, 35, 176, 35, +216, 35, 0, 36, 40, 36, 80, 36, 120, 36, 160, 36, 200, 36, 240, 36, +24, 37, 64, 37, 104, 37, 144, 37, 184, 37, 224, 37, 8, 38, 48, 38, +88, 38, 128, 38, 168, 38, 208, 38, 248, 38, 32, 39, 72, 39, 112, 39, +152, 39, 192, 39, 232, 39, 16, 40, 56, 40, 96, 40, 136, 40, 176, 40, +216, 40, 0, 41, 40, 41, 80, 41, 120, 41, 160, 41, 200, 41, 240, 41, +24, 42, 64, 42, 104, 42, 144, 42, 184, 42, 224, 42, 8, 43, 48, 43, +88, 43, 128, 43, 168, 43, 208, 43, 248, 43, 32, 44, 72, 44, 112, 44, +152, 44, 192, 44, 232, 44, 16, 45, 56, 45, 96, 45, 136, 45, 176, 45, +216, 45, 0, 46, 40, 46, 80, 46, 120, 46, 160, 46, 200, 46, 240, 46, +24, 47, 64, 47, 104, 47, 144, 47, 184, 47, 224, 47, 8, 48, 48, 48, +88, 48, 128, 48, 168, 48, 208, 48, 248, 48, 32, 49, 72, 49, 112, 49, +152, 49, 192, 49, 232, 49, 16, 50, 56, 50, 96, 50, 136, 50, 176, 50, +216, 50, 0, 51, 40, 51, 80, 51, 120, 51, 160, 51, 200, 51, 240, 51, +24, 52, 64, 52, 104, 52, 144, 52, 184, 52, 224, 52, 8, 53, 48, 53, +88, 53, 128, 53, 168, 53, 208, 53, 248, 53, 32, 54, 72, 54, 112, 54, +152, 54, 192, 54, 232, 54, 16, 55, 56, 55, 96, 55, 136, 55, 176, 55, +216, 55, 0, 56, 40, 56, 80, 56, 120, 56, 160, 56, 200, 56, 240, 56, +24, 57, 64, 57, 104, 57, 144, 57, 184, 57, 224, 57, 8, 58, 48, 58, +88, 58, 128, 58, 168, 58, 208, 58, 248, 58, 32, 59, 72, 59, 112, 59, +152, 59, 192, 59, 232, 59, 16, 60, 56, 60, 96, 60, 136, 60, 176, 60, +216, 60, 0, 61, 40, 61, 80, 61, 120, 61, 160, 61, 200, 61, 240, 61, +24, 62, 64, 62, 104, 62, 144, 62, 184, 62, 224, 62, 8, 63, 48, 63, +88, 63, 128, 63, 168, 63, 208, 63, 248, 63, 32, 64, 72, 64, 112, 64, +152, 64, 192, 64, 232, 64, 16, 65, 56, 65, 96, 65, 136, 65, 176, 65, +216, 65, 0, 66, 40, 66, 80, 66, 120, 66, 160, 66, 200, 66, 240, 66, +24, 67, 64, 67, 104, 67, 144, 67, 184, 67, 224, 67, 8, 68, 48, 68, +88, 68, 128, 68, 168, 68, 208, 68, 248, 68, 32, 69, 72, 69, 112, 69, +152, 69, 192, 69, 232, 69, 16, 70, 56, 70, 96, 70, 136, 70, 176, 70, +216, 70, 0, 71, 40, 71, 80, 71, 120, 71, 160, 71, 200, 71, 240, 71, +24, 72, 64, 72, 104, 72, 144, 72, 184, 72, 224, 72, 8, 73, 48, 73, +88, 73, 128, 73, 168, 73, 208, 73, 248, 73, 32, 74, 72, 74, 112, 74, +152, 74, 192, 74, 232, 74, 16, 75, 56, 75, 96, 75, 136, 75, 176, 75, +216, 75, 0, 76, 40, 76, 80, 76, 120, 76, 160, 76, 200, 76, 240, 76, +24, 77, 64, 77, 104, 77, 144, 77, 184, 77, 224, 77, 8, 78, 48, 78, +88, 78, 128, 78, 168, 78, 208, 78, 248, 78, 32, 79, 72, 79, 112, 79, +152, 79, 192, 79, 232, 79, 16, 80, 56, 80, 96, 80, 136, 80, 176, 80, +216, 80, 0, 81, 40, 81, 80, 81, 120, 81, 160, 81, 200, 81, 240, 81, +24, 82, 64, 82, 104, 82, 144, 82, 184, 82, 224, 82, 8, 83, 48, 83, +88, 83, 128, 83, 168, 83, 208, 83, 248, 83, 32, 84, 72, 84, 112, 84, +152, 84, 192, 84, 232, 84, 16, 85, 56, 85, 96, 85, 136, 85, 176, 85, +216, 85, 0, 86, 40, 86, 80, 86, 120, 86, 160, 86, 200, 86, 240, 86, +24, 87, 64, 87, 104, 87, 144, 87, 184, 87, 224, 87, 8, 88, 48, 88, +88, 88, 128, 88, 168, 88, 208, 88, 248, 88, 32, 89, 72, 89, 112, 89, +152, 89, 192, 89, 232, 89, 16, 90, 56, 90, 96, 90, 136, 90, 176, 90, +216, 90, 0, 91, 40, 91, 80, 91, 120, 91, 160, 91, 200, 91, 240, 91, +24, 92, 64, 92, 104, 92, 144, 92, 184, 92, 224, 92, 8, 93, 48, 93, +88, 93, 128, 93, 168, 93, 208, 93, 248, 93, 32, 94, 72, 94, 112, 94, +152, 94, 192, 94, 232, 94, 16, 95, 56, 95, 96, 95, 136, 95, 176, 95, +216, 95, 0, 96, 40, 96, 80, 96, 120, 96, 160, 96, 200, 96, 240, 96, +24, 97, 64, 97, 104, 97, 144, 97, 184, 97, 224, 97, 8, 98, 48, 98, +88, 98, 128, 98, 168, 98, 208, 98, 248, 98, 32, 99, 72, 99, 112, 99, +152, 99, 192, 99, 232, 99, 16, 100, 56, 100, 96, 100, 136, 100, 176, 100, +216, 100, 0, 101, 40, 101, 80, 101, 120, 101, 160, 101, 200, 101, 240, 101, +24, 102, 64, 102, 104, 102, 144, 102, 184, 102, 224, 102, 8, 103, 48, 103, +88, 103, 128, 103, 168, 103, 208, 103, 248, 103, 32, 104, 72, 104, 112, 104, +152, 104, 192, 104, 232, 104, 16, 105, 56, 105, 96, 105, 136, 105, 176, 105, +216, 105, 0, 106, 40, 106, 80, 106, 120, 106, 160, 106, 200, 106, 240, 106, +24, 107, 64, 107, 104, 107, 144, 107, 184, 107, 224, 107, 8, 108, 48, 108, +88, 108, 128, 108, 168, 108, 208, 108, 248, 108, 32, 109, 72, 109, 112, 109, +152, 109, 192, 109, 232, 109, 16, 110, 56, 110, 96, 110, 136, 110, 176, 110, +216, 110, 0, 111, 40, 111, 80, 111, 120, 111, 160, 111, 200, 111, 240, 111, +24, 112, 64, 112, 104, 112, 144, 112, 184, 112, 224, 112, 8, 113, 48, 113, +88, 113, 128, 113, 168, 113, 208, 113, 248, 113, 32, 114, 72, 114, 112, 114, +152, 114, 192, 114, 232, 114, 16, 115, 56, 115, 96, 115, 136, 115, 176, 115, +216, 115, 0, 116, 40, 116, 80, 116, 120, 116, 160, 116, 200, 116, 240, 116, +24, 117, 64, 117, 104, 117, 144, 117, 184, 117, 224, 117, 8, 118, 48, 118, +88, 118, 128, 118, 168, 118, 208, 118, 248, 118, 32, 119, 72, 119, 112, 119, +152, 119, 192, 119, 232, 119, 16, 120, 56, 120, 96, 120, 136, 120, 176, 120, +216, 120, 0, 121, 40, 121, 80, 121, 120, 121, 160, 121, 200, 121, 240, 121, +24, 122, 64, 122, 104, 122, 144, 122, 184, 122, 224, 122, 8, 123, 48, 123, +88, 123, 128, 123, 168, 123, 208, 123, 248, 123, 32, 124, 72, 124, 112, 124, +152, 124, 192, 124, 232, 124, 16, 125, 56, 125, 96, 125, 136, 125, 176, 125, +216, 125, 0, 126, 40, 126, 80, 126, 120, 126, 160, 126, 200, 126, 240, 126, +24, 127, 64, 127, 104, 127, 144, 127, 184, 127, 224, 127, 8, 128, 48, 128, +88, 128, 128, 128, 168, 128, 208, 128, 248, 128, 32, 129, 72, 129, 112, 129, +152, 129, 192, 129, 232, 129, 16, 130, 56, 130, 96, 130, 136, 130, 176, 130, +216, 130, 0, 131, 40, 131, 80, 131, 120, 131, 160, 131, 200, 131, 240, 131, +24, 132, 64, 132, 104, 132, 144, 132, 184, 132, 224, 132, 8, 133, 48, 133, +88, 133, 128, 133, 168, 133, 208, 133, 248, 133, 32, 134, 72, 134, 112, 134, +152, 134, 192, 134, 232, 134, 16, 135, 56, 135, 96, 135, 136, 135, 176, 135, +216, 135, 0, 136, 40, 136, 80, 136, 120, 136, 160, 136, 200, 136, 240, 136, +24, 137, 64, 137, 104, 137, 144, 137, 184, 137, 224, 137, 8, 138, 48, 138, +88, 138, 128, 138, 168, 138, 208, 138, 248, 138, 32, 139, 72, 139, 112, 139, +152, 139, 192, 139, 232, 139, 16, 140, 56, 140, 96, 140, 136, 140, 176, 140, +216, 140, 0, 141, 40, 141, 80, 141, 120, 141, 160, 141, 200, 141, 240, 141, +24, 142, 64, 142, 104, 142, 144, 142, 184, 142, 224, 142, 8, 143, 48, 143, +88, 143, 128, 143, 168, 143, 208, 143, 248, 143, 32, 144, 72, 144, 112, 144, +152, 144, 192, 144, 232, 144, 16, 145, 56, 145, 96, 145, 136, 145, 176, 145, +216, 145, 0, 146, 40, 146, 80, 146, 120, 146, 160, 146, 200, 146, 240, 146, +24, 147, 64, 147, 104, 147, 144, 147, 184, 147, 224, 147, 8, 148, 48, 148, +88, 148, 128, 148, 168, 148, 208, 148, 248, 148, 32, 149, 72, 149, 112, 149, +152, 149, 192, 149, 232, 149, 16, 150, 56, 150, 96, 150, 136, 150, 176, 150, +216, 150, 0, 151, 40, 151, 80, 151, 120, 151, 160, 151, 200, 151, 240, 151, +24, 152, 64, 152, 104, 152, 144, 152, 184, 152, 224, 152, 8, 153, 48, 153, +88, 153, 128, 153, 168, 153, 208, 153, 248, 153, 32, 154, 72, 154, 112, 154, +152, 154, 192, 154, 232, 154, 16, 155, 56, 155, 96, 155, 136, 155, 176, 155, +216, 155, 0, 156, 40, 156, 80, 156, 120, 156, 160, 156, 200, 156, 240, 156, +24, 157, 64, 157, 104, 157, 144, 157, 184, 157, 224, 157, 8, 158, 48, 158, +88, 158, 128, 158, 168, 158, 208, 158, 248, 158, 32, 159, 72, 159, 112, 159, +152, 159, 192, 159, 232, 159, 16, 160, 56, 160, 96, 160, 136, 160, 176, 160, +216, 160, 0, 161, 40, 161, 80, 161, 120, 161, 160, 161, 200, 161, 240, 161, +24, 162, 64, 162, 104, 162, 144, 162, 184, 162, 224, 162, 8, 163, 48, 163, +88, 163, 128, 163, 168, 163, 208, 163, 248, 163, 32, 164, 72, 164, 112, 164, +152, 164, 192, 164, 232, 164, 16, 165, 56, 165, 96, 165, 136, 165, 176, 165, +216, 165, 0, 166, 40, 166, 80, 166, 120, 166, 160, 166, 200, 166, 240, 166, +24, 167, 64, 167, 104, 167, 144, 167, 184, 167, 224, 167, 8, 168, 48, 168, +88, 168, 128, 168, 168, 168, 208, 168, 248, 168, 32, 169, 72, 169, 112, 169, +152, 169, 192, 169, 232, 169, 16, 170, 56, 170, 96, 170, 136, 170, 176, 170, +216, 170, 0, 171, 40, 171, 80, 171, 120, 171, 160, 171, 200, 171, 240, 171, +24, 172, 64, 172, 104, 172, 144, 172, 184, 172, 224, 172, 8, 173, 48, 173, +88, 173, 128, 173, 168, 173, 208, 173, 248, 173, 32, 174, 72, 174, 112, 174, +152, 174, 192, 174, 232, 174, 16, 175, 56, 175, 96, 175, 136, 175, 176, 175, +216, 175, 0, 176, 40, 176, 80, 176, 120, 176, 160, 176, 200, 176, 240, 176, +24, 177, 64, 177, 104, 177, 144, 177, 184, 177, 224, 177, 8, 178, 48, 178, +88, 178, 128, 178, 168, 178, 208, 178, 248, 178, 32, 179, 72, 179, 112, 179, +152, 179, 192, 179, 232, 179, 16, 180, 56, 180, 96, 180, 136, 180, 176, 180, +216, 180, 0, 181, 40, 181, 80, 181, 120, 181, 160, 181, 200, 181, 240, 181, +24, 182, 64, 182, 104, 182, 144, 182, 184, 182, 224, 182, 8, 183, 48, 183, +88, 183, 128, 183, 168, 183, 208, 183, 248, 183, 32, 184, 72, 184, 112, 184, +152, 184, 192, 184, 232, 184, 16, 185, 56, 185, 96, 185, 136, 185, 176, 185, +216, 185, 0, 186, 40, 186, 80, 186, 120, 186, 160, 186, 200, 186, 240, 186, +24, 187, 64, 187, 104, 187, 144, 187, 184, 187, 224, 187, 8, 188, 48, 188, +88, 188, 128, 188, 168, 188, 208, 188, 248, 188, 32, 189, 72, 189, 112, 189, +152, 189, 192, 189, 232, 189, 16, 190, 56, 190, 96, 190, 136, 190, 176, 190, +216, 190, 0, 191, 40, 191, 80, 191, 120, 191, 160, 191, 200, 191, 240, 191, +24, 192, 64, 192, 104, 192, 144, 192, 184, 192, 224, 192, 8, 193, 48, 193, +88, 193, 128, 193, 168, 193, 208, 193, 248, 193, 32, 194, 72, 194, 112, 194, +152, 194, 192, 194, 232, 194, 16, 195, 56, 195, 96, 195, 136, 195, 176, 195, +216, 195, 0, 196, 40, 196, 80, 196, 120, 196, 160, 196, 200, 196, 240, 196, +24, 197, 64, 197, 104, 197, 144, 197, 184, 197, 224, 197, 8, 198, 48, 198, +88, 198, 128, 198, 168, 198, 208, 198, 248, 198, 32, 199, 72, 199, 112, 199, +152, 199, 192, 199, 232, 199, 16, 200, 56, 200, 96, 200, 136, 200, 176, 200, +216, 200, 0, 201, 40, 201, 80, 201, 120, 201, 160, 201, 200, 201, 240, 201, +24, 202, 64, 202, 104, 202, 144, 202, 184, 202, 224, 202, 8, 203, 48, 203, +88, 203, 128, 203, 168, 203, 208, 203, 248, 203, 32, 204, 72, 204, 112, 204, +152, 204, 192, 204, 232, 204, 16, 205, 56, 205, 96, 205, 136, 205, 176, 205, +216, 205, 0, 206, 40, 206, 80, 206, 120, 206, 160, 206, 200, 206, 240, 206, +24, 207, 64, 207, 104, 207, 144, 207, 184, 207, 224, 207, 8, 208, 48, 208, +88, 208, 128, 208, 168, 208, 208, 208, 248, 208, 32, 209, 72, 209, 112, 209, +152, 209, 192, 209, 232, 209, 16, 210, 56, 210, 96, 210, 136, 210, 176, 210, +216, 210, 0, 211, 40, 211, 80, 211, 120, 211, 160, 211, 200, 211, 240, 211, +24, 212, 64, 212, 104, 212, 144, 212, 184, 212, 224, 212, 8, 213, 48, 213, +88, 213, 128, 213, 168, 213, 208, 213, 248, 213, 32, 214, 72, 214, 112, 214, +152, 214, 192, 214, 232, 214, 16, 215, 56, 215, 96, 215, 136, 215, 176, 215, +216, 215, 0, 224, 40, 224, 80, 224, 120, 224, 160, 224, 200, 224, 240, 224, +24, 225, 64, 225, 104, 225, 144, 225, 184, 225, 224, 225, 8, 226, 48, 226, +88, 226, 128, 226, 168, 226, 208, 226, 248, 226, 32, 227, 72, 227, 112, 227, +152, 227, 192, 227, 232, 227, 16, 228, 56, 228, 96, 228, 136, 228, 176, 228, +216, 228, 0, 229, 40, 229, 80, 229, 120, 229, 160, 229, 200, 229, 240, 229, +24, 230, 64, 230, 104, 230, 144, 230, 184, 230, 224, 230, 8, 231, 48, 231, +88, 231, 128, 231, 168, 231, 208, 231, 248, 231, 32, 232, 72, 232, 112, 232, +152, 232, 192, 232, 232, 232, 16, 233, 56, 233, 96, 233, 136, 233, 176, 233, +216, 233, 0, 234, 40, 234, 80, 234, 120, 234, 160, 234, 200, 234, 240, 234, +24, 235, 64, 235, 104, 235, 144, 235, 184, 235, 224, 235, 8, 236, 48, 236, +88, 236, 128, 236, 168, 236, 208, 236, 248, 236, 32, 237, 72, 237, 112, 237, +152, 237, 192, 237, 232, 237, 16, 238, 56, 238, 96, 238, 136, 238, 176, 238, +216, 238, 0, 239, 40, 239, 80, 239, 120, 239, 160, 239, 200, 239, 240, 239, +24, 240, 64, 240, 104, 240, 144, 240, 184, 240, 224, 240, 8, 241, 48, 241, +88, 241, 128, 241, 168, 241, 208, 241, 248, 241, 32, 242, 72, 242, 112, 242, +152, 242, 192, 242, 232, 242, 16, 243, 56, 243, 96, 243, 136, 243, 176, 243, +216, 243, 0, 244, 40, 244, 80, 244, 120, 244, 160, 244, 200, 244, 240, 244, +24, 245, 64, 245, 104, 245, 144, 245, 184, 245, 224, 245, 8, 246, 48, 246, +88, 246, 128, 246, 168, 246, 208, 246, 248, 246, 32, 247, 72, 247, 112, 247, +152, 247, 192, 247, 232, 247, 16, 248, 56, 248, 96, 248, 136, 248, 176, 248, +216, 248, 0, 249, 40, 249, 80, 249, 120, 249, 160, 249, 200, 249, 240, 249, +24, 250, 64, 250, 104, 250, 144, 250, 184, 250, 224, 250, 8, 251, 48, 251, +88, 251, 128, 251, 168, 251, 208, 251, 248, 251, 32, 252, 72, 252, 112, 252, +152, 252, 192, 252, 232, 252, 16, 253, 56, 253, 96, 253, 136, 253, 176, 253, +216, 253, 0, 254, 40, 254, 80, 254, 120, 254, 160, 254, 200, 254, 240, 254, +24, 255, 64, 255, 104, 255, 144, 255, 184, 255, 224, 255 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_8.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_8.java new file mode 100644 index 0000000..986b8b7 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_UTF_8.java @@ -0,0 +1,482 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.UTF_8.class) + +public class Charset_MultiByte_UTF_8 extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "UTF-8"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, +144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, +160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, +176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, +192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, +208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, +224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, +240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, +256, 296, 336, 376, 416, 456, 496, 536, 576, 616, 656, 696, 736, 776, 816, 856, +896, 936, 976, 1016, 1056, 1096, 1136, 1176, 1216, 1256, 1296, 1336, 1376, 1416, 1456, 1496, +1536, 1576, 1616, 1656, 1696, 1736, 1776, 1816, 1856, 1896, 1936, 1976, 2016, 2056, 2096, 2136, +2176, 2216, 2256, 2296, 2336, 2376, 2416, 2456, 2496, 2536, 2576, 2616, 2656, 2696, 2736, 2776, +2816, 2856, 2896, 2936, 2976, 3016, 3056, 3096, 3136, 3176, 3216, 3256, 3296, 3336, 3376, 3416, +3456, 3496, 3536, 3576, 3616, 3656, 3696, 3736, 3776, 3816, 3856, 3896, 3936, 3976, 4016, 4056, +4096, 4136, 4176, 4216, 4256, 4296, 4336, 4376, 4416, 4456, 4496, 4536, 4576, 4616, 4656, 4696, +4736, 4776, 4816, 4856, 4896, 4936, 4976, 5016, 5056, 5096, 5136, 5176, 5216, 5256, 5296, 5336, +5376, 5416, 5456, 5496, 5536, 5576, 5616, 5656, 5696, 5736, 5776, 5816, 5856, 5896, 5936, 5976, +6016, 6056, 6096, 6136, 6176, 6216, 6256, 6296, 6336, 6376, 6416, 6456, 6496, 6536, 6576, 6616, +6656, 6696, 6736, 6776, 6816, 6856, 6896, 6936, 6976, 7016, 7056, 7096, 7136, 7176, 7216, 7256, +7296, 7336, 7376, 7416, 7456, 7496, 7536, 7576, 7616, 7656, 7696, 7736, 7776, 7816, 7856, 7896, +7936, 7976, 8016, 8056, 8096, 8136, 8176, 8216, 8256, 8296, 8336, 8376, 8416, 8456, 8496, 8536, +8576, 8616, 8656, 8696, 8736, 8776, 8816, 8856, 8896, 8936, 8976, 9016, 9056, 9096, 9136, 9176, +9216, 9256, 9296, 9336, 9376, 9416, 9456, 9496, 9536, 9576, 9616, 9656, 9696, 9736, 9776, 9816, +9856, 9896, 9936, 9976, 10016, 10056, 10096, 10136, 10176, 10216, 10256, 10296, 10336, 10376, 10416, 10456, +10496, 10536, 10576, 10616, 10656, 10696, 10736, 10776, 10816, 10856, 10896, 10936, 10976, 11016, 11056, 11096, +11136, 11176, 11216, 11256, 11296, 11336, 11376, 11416, 11456, 11496, 11536, 11576, 11616, 11656, 11696, 11736, +11776, 11816, 11856, 11896, 11936, 11976, 12016, 12056, 12096, 12136, 12176, 12216, 12256, 12296, 12336, 12376, +12416, 12456, 12496, 12536, 12576, 12616, 12656, 12696, 12736, 12776, 12816, 12856, 12896, 12936, 12976, 13016, +13056, 13096, 13136, 13176, 13216, 13256, 13296, 13336, 13376, 13416, 13456, 13496, 13536, 13576, 13616, 13656, +13696, 13736, 13776, 13816, 13856, 13896, 13936, 13976, 14016, 14056, 14096, 14136, 14176, 14216, 14256, 14296, +14336, 14376, 14416, 14456, 14496, 14536, 14576, 14616, 14656, 14696, 14736, 14776, 14816, 14856, 14896, 14936, +14976, 15016, 15056, 15096, 15136, 15176, 15216, 15256, 15296, 15336, 15376, 15416, 15456, 15496, 15536, 15576, +15616, 15656, 15696, 15736, 15776, 15816, 15856, 15896, 15936, 15976, 16016, 16056, 16096, 16136, 16176, 16216, +16256, 16296, 16336, 16376, 16416, 16456, 16496, 16536, 16576, 16616, 16656, 16696, 16736, 16776, 16816, 16856, +16896, 16936, 16976, 17016, 17056, 17096, 17136, 17176, 17216, 17256, 17296, 17336, 17376, 17416, 17456, 17496, +17536, 17576, 17616, 17656, 17696, 17736, 17776, 17816, 17856, 17896, 17936, 17976, 18016, 18056, 18096, 18136, +18176, 18216, 18256, 18296, 18336, 18376, 18416, 18456, 18496, 18536, 18576, 18616, 18656, 18696, 18736, 18776, +18816, 18856, 18896, 18936, 18976, 19016, 19056, 19096, 19136, 19176, 19216, 19256, 19296, 19336, 19376, 19416, +19456, 19496, 19536, 19576, 19616, 19656, 19696, 19736, 19776, 19816, 19856, 19896, 19936, 19976, 20016, 20056, +20096, 20136, 20176, 20216, 20256, 20296, 20336, 20376, 20416, 20456, 20496, 20536, 20576, 20616, 20656, 20696, +20736, 20776, 20816, 20856, 20896, 20936, 20976, 21016, 21056, 21096, 21136, 21176, 21216, 21256, 21296, 21336, +21376, 21416, 21456, 21496, 21536, 21576, 21616, 21656, 21696, 21736, 21776, 21816, 21856, 21896, 21936, 21976, +22016, 22056, 22096, 22136, 22176, 22216, 22256, 22296, 22336, 22376, 22416, 22456, 22496, 22536, 22576, 22616, +22656, 22696, 22736, 22776, 22816, 22856, 22896, 22936, 22976, 23016, 23056, 23096, 23136, 23176, 23216, 23256, +23296, 23336, 23376, 23416, 23456, 23496, 23536, 23576, 23616, 23656, 23696, 23736, 23776, 23816, 23856, 23896, +23936, 23976, 24016, 24056, 24096, 24136, 24176, 24216, 24256, 24296, 24336, 24376, 24416, 24456, 24496, 24536, +24576, 24616, 24656, 24696, 24736, 24776, 24816, 24856, 24896, 24936, 24976, 25016, 25056, 25096, 25136, 25176, +25216, 25256, 25296, 25336, 25376, 25416, 25456, 25496, 25536, 25576, 25616, 25656, 25696, 25736, 25776, 25816, +25856, 25896, 25936, 25976, 26016, 26056, 26096, 26136, 26176, 26216, 26256, 26296, 26336, 26376, 26416, 26456, +26496, 26536, 26576, 26616, 26656, 26696, 26736, 26776, 26816, 26856, 26896, 26936, 26976, 27016, 27056, 27096, +27136, 27176, 27216, 27256, 27296, 27336, 27376, 27416, 27456, 27496, 27536, 27576, 27616, 27656, 27696, 27736, +27776, 27816, 27856, 27896, 27936, 27976, 28016, 28056, 28096, 28136, 28176, 28216, 28256, 28296, 28336, 28376, +28416, 28456, 28496, 28536, 28576, 28616, 28656, 28696, 28736, 28776, 28816, 28856, 28896, 28936, 28976, 29016, +29056, 29096, 29136, 29176, 29216, 29256, 29296, 29336, 29376, 29416, 29456, 29496, 29536, 29576, 29616, 29656, +29696, 29736, 29776, 29816, 29856, 29896, 29936, 29976, 30016, 30056, 30096, 30136, 30176, 30216, 30256, 30296, +30336, 30376, 30416, 30456, 30496, 30536, 30576, 30616, 30656, 30696, 30736, 30776, 30816, 30856, 30896, 30936, +30976, 31016, 31056, 31096, 31136, 31176, 31216, 31256, 31296, 31336, 31376, 31416, 31456, 31496, 31536, 31576, +31616, 31656, 31696, 31736, 31776, 31816, 31856, 31896, 31936, 31976, 32016, 32056, 32096, 32136, 32176, 32216, +32256, 32296, 32336, 32376, 32416, 32456, 32496, 32536, 32576, 32616, 32656, 32696, 32736, 32776, 32816, 32856, +32896, 32936, 32976, 33016, 33056, 33096, 33136, 33176, 33216, 33256, 33296, 33336, 33376, 33416, 33456, 33496, +33536, 33576, 33616, 33656, 33696, 33736, 33776, 33816, 33856, 33896, 33936, 33976, 34016, 34056, 34096, 34136, +34176, 34216, 34256, 34296, 34336, 34376, 34416, 34456, 34496, 34536, 34576, 34616, 34656, 34696, 34736, 34776, +34816, 34856, 34896, 34936, 34976, 35016, 35056, 35096, 35136, 35176, 35216, 35256, 35296, 35336, 35376, 35416, +35456, 35496, 35536, 35576, 35616, 35656, 35696, 35736, 35776, 35816, 35856, 35896, 35936, 35976, 36016, 36056, +36096, 36136, 36176, 36216, 36256, 36296, 36336, 36376, 36416, 36456, 36496, 36536, 36576, 36616, 36656, 36696, +36736, 36776, 36816, 36856, 36896, 36936, 36976, 37016, 37056, 37096, 37136, 37176, 37216, 37256, 37296, 37336, +37376, 37416, 37456, 37496, 37536, 37576, 37616, 37656, 37696, 37736, 37776, 37816, 37856, 37896, 37936, 37976, +38016, 38056, 38096, 38136, 38176, 38216, 38256, 38296, 38336, 38376, 38416, 38456, 38496, 38536, 38576, 38616, +38656, 38696, 38736, 38776, 38816, 38856, 38896, 38936, 38976, 39016, 39056, 39096, 39136, 39176, 39216, 39256, +39296, 39336, 39376, 39416, 39456, 39496, 39536, 39576, 39616, 39656, 39696, 39736, 39776, 39816, 39856, 39896, +39936, 39976, 40016, 40056, 40096, 40136, 40176, 40216, 40256, 40296, 40336, 40376, 40416, 40456, 40496, 40536, +40576, 40616, 40656, 40696, 40736, 40776, 40816, 40856, 40896, 40936, 40976, 41016, 41056, 41096, 41136, 41176, +41216, 41256, 41296, 41336, 41376, 41416, 41456, 41496, 41536, 41576, 41616, 41656, 41696, 41736, 41776, 41816, +41856, 41896, 41936, 41976, 42016, 42056, 42096, 42136, 42176, 42216, 42256, 42296, 42336, 42376, 42416, 42456, +42496, 42536, 42576, 42616, 42656, 42696, 42736, 42776, 42816, 42856, 42896, 42936, 42976, 43016, 43056, 43096, +43136, 43176, 43216, 43256, 43296, 43336, 43376, 43416, 43456, 43496, 43536, 43576, 43616, 43656, 43696, 43736, +43776, 43816, 43856, 43896, 43936, 43976, 44016, 44056, 44096, 44136, 44176, 44216, 44256, 44296, 44336, 44376, +44416, 44456, 44496, 44536, 44576, 44616, 44656, 44696, 44736, 44776, 44816, 44856, 44896, 44936, 44976, 45016, +45056, 45096, 45136, 45176, 45216, 45256, 45296, 45336, 45376, 45416, 45456, 45496, 45536, 45576, 45616, 45656, +45696, 45736, 45776, 45816, 45856, 45896, 45936, 45976, 46016, 46056, 46096, 46136, 46176, 46216, 46256, 46296, +46336, 46376, 46416, 46456, 46496, 46536, 46576, 46616, 46656, 46696, 46736, 46776, 46816, 46856, 46896, 46936, +46976, 47016, 47056, 47096, 47136, 47176, 47216, 47256, 47296, 47336, 47376, 47416, 47456, 47496, 47536, 47576, +47616, 47656, 47696, 47736, 47776, 47816, 47856, 47896, 47936, 47976, 48016, 48056, 48096, 48136, 48176, 48216, +48256, 48296, 48336, 48376, 48416, 48456, 48496, 48536, 48576, 48616, 48656, 48696, 48736, 48776, 48816, 48856, +48896, 48936, 48976, 49016, 49056, 49096, 49136, 49176, 49216, 49256, 49296, 49336, 49376, 49416, 49456, 49496, +49536, 49576, 49616, 49656, 49696, 49736, 49776, 49816, 49856, 49896, 49936, 49976, 50016, 50056, 50096, 50136, +50176, 50216, 50256, 50296, 50336, 50376, 50416, 50456, 50496, 50536, 50576, 50616, 50656, 50696, 50736, 50776, +50816, 50856, 50896, 50936, 50976, 51016, 51056, 51096, 51136, 51176, 51216, 51256, 51296, 51336, 51376, 51416, +51456, 51496, 51536, 51576, 51616, 51656, 51696, 51736, 51776, 51816, 51856, 51896, 51936, 51976, 52016, 52056, +52096, 52136, 52176, 52216, 52256, 52296, 52336, 52376, 52416, 52456, 52496, 52536, 52576, 52616, 52656, 52696, +52736, 52776, 52816, 52856, 52896, 52936, 52976, 53016, 53056, 53096, 53136, 53176, 53216, 53256, 53296, 53336, +53376, 53416, 53456, 53496, 53536, 53576, 53616, 53656, 53696, 53736, 53776, 53816, 53856, 53896, 53936, 53976, +54016, 54056, 54096, 54136, 54176, 54216, 54256, 54296, 54336, 54376, 54416, 54456, 54496, 54536, 54576, 54616, +54656, 54696, 54736, 54776, 54816, 54856, 54896, 54936, 54976, 55016, 55056, 55096, 55136, 55176, 55216, 55256, +57344, 57384, 57424, 57464, 57504, 57544, 57584, 57624, 57664, 57704, 57744, 57784, 57824, 57864, 57904, 57944, +57984, 58024, 58064, 58104, 58144, 58184, 58224, 58264, 58304, 58344, 58384, 58424, 58464, 58504, 58544, 58584, +58624, 58664, 58704, 58744, 58784, 58824, 58864, 58904, 58944, 58984, 59024, 59064, 59104, 59144, 59184, 59224, +59264, 59304, 59344, 59384, 59424, 59464, 59504, 59544, 59584, 59624, 59664, 59704, 59744, 59784, 59824, 59864, +59904, 59944, 59984, 60024, 60064, 60104, 60144, 60184, 60224, 60264, 60304, 60344, 60384, 60424, 60464, 60504, +60544, 60584, 60624, 60664, 60704, 60744, 60784, 60824, 60864, 60904, 60944, 60984, 61024, 61064, 61104, 61144, +61184, 61224, 61264, 61304, 61344, 61384, 61424, 61464, 61504, 61544, 61584, 61624, 61664, 61704, 61744, 61784, +61824, 61864, 61904, 61944, 61984, 62024, 62064, 62104, 62144, 62184, 62224, 62264, 62304, 62344, 62384, 62424, +62464, 62504, 62544, 62584, 62624, 62664, 62704, 62744, 62784, 62824, 62864, 62904, 62944, 62984, 63024, 63064, +63104, 63144, 63184, 63224, 63264, 63304, 63344, 63384, 63424, 63464, 63504, 63544, 63584, 63624, 63664, 63704, +63744, 63784, 63824, 63864, 63904, 63944, 63984, 64024, 64064, 64104, 64144, 64184, 64224, 64264, 64304, 64344, +64384, 64424, 64464, 64504, 64544, 64584, 64624, 64664, 64704, 64744, 64784, 64824, 64864, 64904, 64944, 64984, +65024, 65064, 65104, 65144, 65184, 65224, 65264, 65304, 65344, 65384, 65424, 65464, 65504 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +194, 128, 194, 129, 194, 130, 194, 131, 194, 132, 194, 133, 194, 134, 194, 135, +194, 136, 194, 137, 194, 138, 194, 139, 194, 140, 194, 141, 194, 142, 194, 143, +194, 144, 194, 145, 194, 146, 194, 147, 194, 148, 194, 149, 194, 150, 194, 151, +194, 152, 194, 153, 194, 154, 194, 155, 194, 156, 194, 157, 194, 158, 194, 159, +194, 160, 194, 161, 194, 162, 194, 163, 194, 164, 194, 165, 194, 166, 194, 167, +194, 168, 194, 169, 194, 170, 194, 171, 194, 172, 194, 173, 194, 174, 194, 175, +194, 176, 194, 177, 194, 178, 194, 179, 194, 180, 194, 181, 194, 182, 194, 183, +194, 184, 194, 185, 194, 186, 194, 187, 194, 188, 194, 189, 194, 190, 194, 191, +195, 128, 195, 129, 195, 130, 195, 131, 195, 132, 195, 133, 195, 134, 195, 135, +195, 136, 195, 137, 195, 138, 195, 139, 195, 140, 195, 141, 195, 142, 195, 143, +195, 144, 195, 145, 195, 146, 195, 147, 195, 148, 195, 149, 195, 150, 195, 151, +195, 152, 195, 153, 195, 154, 195, 155, 195, 156, 195, 157, 195, 158, 195, 159, +195, 160, 195, 161, 195, 162, 195, 163, 195, 164, 195, 165, 195, 166, 195, 167, +195, 168, 195, 169, 195, 170, 195, 171, 195, 172, 195, 173, 195, 174, 195, 175, +195, 176, 195, 177, 195, 178, 195, 179, 195, 180, 195, 181, 195, 182, 195, 183, +195, 184, 195, 185, 195, 186, 195, 187, 195, 188, 195, 189, 195, 190, 195, 191, +196, 128, 196, 168, 197, 144, 197, 184, 198, 160, 199, 136, 199, 176, 200, 152, +201, 128, 201, 168, 202, 144, 202, 184, 203, 160, 204, 136, 204, 176, 205, 152, +206, 128, 206, 168, 207, 144, 207, 184, 208, 160, 209, 136, 209, 176, 210, 152, +211, 128, 211, 168, 212, 144, 212, 184, 213, 160, 214, 136, 214, 176, 215, 152, +216, 128, 216, 168, 217, 144, 217, 184, 218, 160, 219, 136, 219, 176, 220, 152, +221, 128, 221, 168, 222, 144, 222, 184, 223, 160, 224, 160, 136, 224, 160, 176, +224, 161, 152, 224, 162, 128, 224, 162, 168, 224, 163, 144, 224, 163, 184, 224, +164, 160, 224, 165, 136, 224, 165, 176, 224, 166, 152, 224, 167, 128, 224, 167, +168, 224, 168, 144, 224, 168, 184, 224, 169, 160, 224, 170, 136, 224, 170, 176, +224, 171, 152, 224, 172, 128, 224, 172, 168, 224, 173, 144, 224, 173, 184, 224, +174, 160, 224, 175, 136, 224, 175, 176, 224, 176, 152, 224, 177, 128, 224, 177, +168, 224, 178, 144, 224, 178, 184, 224, 179, 160, 224, 180, 136, 224, 180, 176, +224, 181, 152, 224, 182, 128, 224, 182, 168, 224, 183, 144, 224, 183, 184, 224, +184, 160, 224, 185, 136, 224, 185, 176, 224, 186, 152, 224, 187, 128, 224, 187, +168, 224, 188, 144, 224, 188, 184, 224, 189, 160, 224, 190, 136, 224, 190, 176, +224, 191, 152, 225, 128, 128, 225, 128, 168, 225, 129, 144, 225, 129, 184, 225, +130, 160, 225, 131, 136, 225, 131, 176, 225, 132, 152, 225, 133, 128, 225, 133, +168, 225, 134, 144, 225, 134, 184, 225, 135, 160, 225, 136, 136, 225, 136, 176, +225, 137, 152, 225, 138, 128, 225, 138, 168, 225, 139, 144, 225, 139, 184, 225, +140, 160, 225, 141, 136, 225, 141, 176, 225, 142, 152, 225, 143, 128, 225, 143, +168, 225, 144, 144, 225, 144, 184, 225, 145, 160, 225, 146, 136, 225, 146, 176, +225, 147, 152, 225, 148, 128, 225, 148, 168, 225, 149, 144, 225, 149, 184, 225, +150, 160, 225, 151, 136, 225, 151, 176, 225, 152, 152, 225, 153, 128, 225, 153, +168, 225, 154, 144, 225, 154, 184, 225, 155, 160, 225, 156, 136, 225, 156, 176, +225, 157, 152, 225, 158, 128, 225, 158, 168, 225, 159, 144, 225, 159, 184, 225, +160, 160, 225, 161, 136, 225, 161, 176, 225, 162, 152, 225, 163, 128, 225, 163, +168, 225, 164, 144, 225, 164, 184, 225, 165, 160, 225, 166, 136, 225, 166, 176, +225, 167, 152, 225, 168, 128, 225, 168, 168, 225, 169, 144, 225, 169, 184, 225, +170, 160, 225, 171, 136, 225, 171, 176, 225, 172, 152, 225, 173, 128, 225, 173, +168, 225, 174, 144, 225, 174, 184, 225, 175, 160, 225, 176, 136, 225, 176, 176, +225, 177, 152, 225, 178, 128, 225, 178, 168, 225, 179, 144, 225, 179, 184, 225, +180, 160, 225, 181, 136, 225, 181, 176, 225, 182, 152, 225, 183, 128, 225, 183, +168, 225, 184, 144, 225, 184, 184, 225, 185, 160, 225, 186, 136, 225, 186, 176, +225, 187, 152, 225, 188, 128, 225, 188, 168, 225, 189, 144, 225, 189, 184, 225, +190, 160, 225, 191, 136, 225, 191, 176, 226, 128, 152, 226, 129, 128, 226, 129, +168, 226, 130, 144, 226, 130, 184, 226, 131, 160, 226, 132, 136, 226, 132, 176, +226, 133, 152, 226, 134, 128, 226, 134, 168, 226, 135, 144, 226, 135, 184, 226, +136, 160, 226, 137, 136, 226, 137, 176, 226, 138, 152, 226, 139, 128, 226, 139, +168, 226, 140, 144, 226, 140, 184, 226, 141, 160, 226, 142, 136, 226, 142, 176, +226, 143, 152, 226, 144, 128, 226, 144, 168, 226, 145, 144, 226, 145, 184, 226, +146, 160, 226, 147, 136, 226, 147, 176, 226, 148, 152, 226, 149, 128, 226, 149, +168, 226, 150, 144, 226, 150, 184, 226, 151, 160, 226, 152, 136, 226, 152, 176, +226, 153, 152, 226, 154, 128, 226, 154, 168, 226, 155, 144, 226, 155, 184, 226, +156, 160, 226, 157, 136, 226, 157, 176, 226, 158, 152, 226, 159, 128, 226, 159, +168, 226, 160, 144, 226, 160, 184, 226, 161, 160, 226, 162, 136, 226, 162, 176, +226, 163, 152, 226, 164, 128, 226, 164, 168, 226, 165, 144, 226, 165, 184, 226, +166, 160, 226, 167, 136, 226, 167, 176, 226, 168, 152, 226, 169, 128, 226, 169, +168, 226, 170, 144, 226, 170, 184, 226, 171, 160, 226, 172, 136, 226, 172, 176, +226, 173, 152, 226, 174, 128, 226, 174, 168, 226, 175, 144, 226, 175, 184, 226, +176, 160, 226, 177, 136, 226, 177, 176, 226, 178, 152, 226, 179, 128, 226, 179, +168, 226, 180, 144, 226, 180, 184, 226, 181, 160, 226, 182, 136, 226, 182, 176, +226, 183, 152, 226, 184, 128, 226, 184, 168, 226, 185, 144, 226, 185, 184, 226, +186, 160, 226, 187, 136, 226, 187, 176, 226, 188, 152, 226, 189, 128, 226, 189, +168, 226, 190, 144, 226, 190, 184, 226, 191, 160, 227, 128, 136, 227, 128, 176, +227, 129, 152, 227, 130, 128, 227, 130, 168, 227, 131, 144, 227, 131, 184, 227, +132, 160, 227, 133, 136, 227, 133, 176, 227, 134, 152, 227, 135, 128, 227, 135, +168, 227, 136, 144, 227, 136, 184, 227, 137, 160, 227, 138, 136, 227, 138, 176, +227, 139, 152, 227, 140, 128, 227, 140, 168, 227, 141, 144, 227, 141, 184, 227, +142, 160, 227, 143, 136, 227, 143, 176, 227, 144, 152, 227, 145, 128, 227, 145, +168, 227, 146, 144, 227, 146, 184, 227, 147, 160, 227, 148, 136, 227, 148, 176, +227, 149, 152, 227, 150, 128, 227, 150, 168, 227, 151, 144, 227, 151, 184, 227, +152, 160, 227, 153, 136, 227, 153, 176, 227, 154, 152, 227, 155, 128, 227, 155, +168, 227, 156, 144, 227, 156, 184, 227, 157, 160, 227, 158, 136, 227, 158, 176, +227, 159, 152, 227, 160, 128, 227, 160, 168, 227, 161, 144, 227, 161, 184, 227, +162, 160, 227, 163, 136, 227, 163, 176, 227, 164, 152, 227, 165, 128, 227, 165, +168, 227, 166, 144, 227, 166, 184, 227, 167, 160, 227, 168, 136, 227, 168, 176, +227, 169, 152, 227, 170, 128, 227, 170, 168, 227, 171, 144, 227, 171, 184, 227, +172, 160, 227, 173, 136, 227, 173, 176, 227, 174, 152, 227, 175, 128, 227, 175, +168, 227, 176, 144, 227, 176, 184, 227, 177, 160, 227, 178, 136, 227, 178, 176, +227, 179, 152, 227, 180, 128, 227, 180, 168, 227, 181, 144, 227, 181, 184, 227, +182, 160, 227, 183, 136, 227, 183, 176, 227, 184, 152, 227, 185, 128, 227, 185, +168, 227, 186, 144, 227, 186, 184, 227, 187, 160, 227, 188, 136, 227, 188, 176, +227, 189, 152, 227, 190, 128, 227, 190, 168, 227, 191, 144, 227, 191, 184, 228, +128, 160, 228, 129, 136, 228, 129, 176, 228, 130, 152, 228, 131, 128, 228, 131, +168, 228, 132, 144, 228, 132, 184, 228, 133, 160, 228, 134, 136, 228, 134, 176, +228, 135, 152, 228, 136, 128, 228, 136, 168, 228, 137, 144, 228, 137, 184, 228, +138, 160, 228, 139, 136, 228, 139, 176, 228, 140, 152, 228, 141, 128, 228, 141, +168, 228, 142, 144, 228, 142, 184, 228, 143, 160, 228, 144, 136, 228, 144, 176, +228, 145, 152, 228, 146, 128, 228, 146, 168, 228, 147, 144, 228, 147, 184, 228, +148, 160, 228, 149, 136, 228, 149, 176, 228, 150, 152, 228, 151, 128, 228, 151, +168, 228, 152, 144, 228, 152, 184, 228, 153, 160, 228, 154, 136, 228, 154, 176, +228, 155, 152, 228, 156, 128, 228, 156, 168, 228, 157, 144, 228, 157, 184, 228, +158, 160, 228, 159, 136, 228, 159, 176, 228, 160, 152, 228, 161, 128, 228, 161, +168, 228, 162, 144, 228, 162, 184, 228, 163, 160, 228, 164, 136, 228, 164, 176, +228, 165, 152, 228, 166, 128, 228, 166, 168, 228, 167, 144, 228, 167, 184, 228, +168, 160, 228, 169, 136, 228, 169, 176, 228, 170, 152, 228, 171, 128, 228, 171, +168, 228, 172, 144, 228, 172, 184, 228, 173, 160, 228, 174, 136, 228, 174, 176, +228, 175, 152, 228, 176, 128, 228, 176, 168, 228, 177, 144, 228, 177, 184, 228, +178, 160, 228, 179, 136, 228, 179, 176, 228, 180, 152, 228, 181, 128, 228, 181, +168, 228, 182, 144, 228, 182, 184, 228, 183, 160, 228, 184, 136, 228, 184, 176, +228, 185, 152, 228, 186, 128, 228, 186, 168, 228, 187, 144, 228, 187, 184, 228, +188, 160, 228, 189, 136, 228, 189, 176, 228, 190, 152, 228, 191, 128, 228, 191, +168, 229, 128, 144, 229, 128, 184, 229, 129, 160, 229, 130, 136, 229, 130, 176, +229, 131, 152, 229, 132, 128, 229, 132, 168, 229, 133, 144, 229, 133, 184, 229, +134, 160, 229, 135, 136, 229, 135, 176, 229, 136, 152, 229, 137, 128, 229, 137, +168, 229, 138, 144, 229, 138, 184, 229, 139, 160, 229, 140, 136, 229, 140, 176, +229, 141, 152, 229, 142, 128, 229, 142, 168, 229, 143, 144, 229, 143, 184, 229, +144, 160, 229, 145, 136, 229, 145, 176, 229, 146, 152, 229, 147, 128, 229, 147, +168, 229, 148, 144, 229, 148, 184, 229, 149, 160, 229, 150, 136, 229, 150, 176, +229, 151, 152, 229, 152, 128, 229, 152, 168, 229, 153, 144, 229, 153, 184, 229, +154, 160, 229, 155, 136, 229, 155, 176, 229, 156, 152, 229, 157, 128, 229, 157, +168, 229, 158, 144, 229, 158, 184, 229, 159, 160, 229, 160, 136, 229, 160, 176, +229, 161, 152, 229, 162, 128, 229, 162, 168, 229, 163, 144, 229, 163, 184, 229, +164, 160, 229, 165, 136, 229, 165, 176, 229, 166, 152, 229, 167, 128, 229, 167, +168, 229, 168, 144, 229, 168, 184, 229, 169, 160, 229, 170, 136, 229, 170, 176, +229, 171, 152, 229, 172, 128, 229, 172, 168, 229, 173, 144, 229, 173, 184, 229, +174, 160, 229, 175, 136, 229, 175, 176, 229, 176, 152, 229, 177, 128, 229, 177, +168, 229, 178, 144, 229, 178, 184, 229, 179, 160, 229, 180, 136, 229, 180, 176, +229, 181, 152, 229, 182, 128, 229, 182, 168, 229, 183, 144, 229, 183, 184, 229, +184, 160, 229, 185, 136, 229, 185, 176, 229, 186, 152, 229, 187, 128, 229, 187, +168, 229, 188, 144, 229, 188, 184, 229, 189, 160, 229, 190, 136, 229, 190, 176, +229, 191, 152, 230, 128, 128, 230, 128, 168, 230, 129, 144, 230, 129, 184, 230, +130, 160, 230, 131, 136, 230, 131, 176, 230, 132, 152, 230, 133, 128, 230, 133, +168, 230, 134, 144, 230, 134, 184, 230, 135, 160, 230, 136, 136, 230, 136, 176, +230, 137, 152, 230, 138, 128, 230, 138, 168, 230, 139, 144, 230, 139, 184, 230, +140, 160, 230, 141, 136, 230, 141, 176, 230, 142, 152, 230, 143, 128, 230, 143, +168, 230, 144, 144, 230, 144, 184, 230, 145, 160, 230, 146, 136, 230, 146, 176, +230, 147, 152, 230, 148, 128, 230, 148, 168, 230, 149, 144, 230, 149, 184, 230, +150, 160, 230, 151, 136, 230, 151, 176, 230, 152, 152, 230, 153, 128, 230, 153, +168, 230, 154, 144, 230, 154, 184, 230, 155, 160, 230, 156, 136, 230, 156, 176, +230, 157, 152, 230, 158, 128, 230, 158, 168, 230, 159, 144, 230, 159, 184, 230, +160, 160, 230, 161, 136, 230, 161, 176, 230, 162, 152, 230, 163, 128, 230, 163, +168, 230, 164, 144, 230, 164, 184, 230, 165, 160, 230, 166, 136, 230, 166, 176, +230, 167, 152, 230, 168, 128, 230, 168, 168, 230, 169, 144, 230, 169, 184, 230, +170, 160, 230, 171, 136, 230, 171, 176, 230, 172, 152, 230, 173, 128, 230, 173, +168, 230, 174, 144, 230, 174, 184, 230, 175, 160, 230, 176, 136, 230, 176, 176, +230, 177, 152, 230, 178, 128, 230, 178, 168, 230, 179, 144, 230, 179, 184, 230, +180, 160, 230, 181, 136, 230, 181, 176, 230, 182, 152, 230, 183, 128, 230, 183, +168, 230, 184, 144, 230, 184, 184, 230, 185, 160, 230, 186, 136, 230, 186, 176, +230, 187, 152, 230, 188, 128, 230, 188, 168, 230, 189, 144, 230, 189, 184, 230, +190, 160, 230, 191, 136, 230, 191, 176, 231, 128, 152, 231, 129, 128, 231, 129, +168, 231, 130, 144, 231, 130, 184, 231, 131, 160, 231, 132, 136, 231, 132, 176, +231, 133, 152, 231, 134, 128, 231, 134, 168, 231, 135, 144, 231, 135, 184, 231, +136, 160, 231, 137, 136, 231, 137, 176, 231, 138, 152, 231, 139, 128, 231, 139, +168, 231, 140, 144, 231, 140, 184, 231, 141, 160, 231, 142, 136, 231, 142, 176, +231, 143, 152, 231, 144, 128, 231, 144, 168, 231, 145, 144, 231, 145, 184, 231, +146, 160, 231, 147, 136, 231, 147, 176, 231, 148, 152, 231, 149, 128, 231, 149, +168, 231, 150, 144, 231, 150, 184, 231, 151, 160, 231, 152, 136, 231, 152, 176, +231, 153, 152, 231, 154, 128, 231, 154, 168, 231, 155, 144, 231, 155, 184, 231, +156, 160, 231, 157, 136, 231, 157, 176, 231, 158, 152, 231, 159, 128, 231, 159, +168, 231, 160, 144, 231, 160, 184, 231, 161, 160, 231, 162, 136, 231, 162, 176, +231, 163, 152, 231, 164, 128, 231, 164, 168, 231, 165, 144, 231, 165, 184, 231, +166, 160, 231, 167, 136, 231, 167, 176, 231, 168, 152, 231, 169, 128, 231, 169, +168, 231, 170, 144, 231, 170, 184, 231, 171, 160, 231, 172, 136, 231, 172, 176, +231, 173, 152, 231, 174, 128, 231, 174, 168, 231, 175, 144, 231, 175, 184, 231, +176, 160, 231, 177, 136, 231, 177, 176, 231, 178, 152, 231, 179, 128, 231, 179, +168, 231, 180, 144, 231, 180, 184, 231, 181, 160, 231, 182, 136, 231, 182, 176, +231, 183, 152, 231, 184, 128, 231, 184, 168, 231, 185, 144, 231, 185, 184, 231, +186, 160, 231, 187, 136, 231, 187, 176, 231, 188, 152, 231, 189, 128, 231, 189, +168, 231, 190, 144, 231, 190, 184, 231, 191, 160, 232, 128, 136, 232, 128, 176, +232, 129, 152, 232, 130, 128, 232, 130, 168, 232, 131, 144, 232, 131, 184, 232, +132, 160, 232, 133, 136, 232, 133, 176, 232, 134, 152, 232, 135, 128, 232, 135, +168, 232, 136, 144, 232, 136, 184, 232, 137, 160, 232, 138, 136, 232, 138, 176, +232, 139, 152, 232, 140, 128, 232, 140, 168, 232, 141, 144, 232, 141, 184, 232, +142, 160, 232, 143, 136, 232, 143, 176, 232, 144, 152, 232, 145, 128, 232, 145, +168, 232, 146, 144, 232, 146, 184, 232, 147, 160, 232, 148, 136, 232, 148, 176, +232, 149, 152, 232, 150, 128, 232, 150, 168, 232, 151, 144, 232, 151, 184, 232, +152, 160, 232, 153, 136, 232, 153, 176, 232, 154, 152, 232, 155, 128, 232, 155, +168, 232, 156, 144, 232, 156, 184, 232, 157, 160, 232, 158, 136, 232, 158, 176, +232, 159, 152, 232, 160, 128, 232, 160, 168, 232, 161, 144, 232, 161, 184, 232, +162, 160, 232, 163, 136, 232, 163, 176, 232, 164, 152, 232, 165, 128, 232, 165, +168, 232, 166, 144, 232, 166, 184, 232, 167, 160, 232, 168, 136, 232, 168, 176, +232, 169, 152, 232, 170, 128, 232, 170, 168, 232, 171, 144, 232, 171, 184, 232, +172, 160, 232, 173, 136, 232, 173, 176, 232, 174, 152, 232, 175, 128, 232, 175, +168, 232, 176, 144, 232, 176, 184, 232, 177, 160, 232, 178, 136, 232, 178, 176, +232, 179, 152, 232, 180, 128, 232, 180, 168, 232, 181, 144, 232, 181, 184, 232, +182, 160, 232, 183, 136, 232, 183, 176, 232, 184, 152, 232, 185, 128, 232, 185, +168, 232, 186, 144, 232, 186, 184, 232, 187, 160, 232, 188, 136, 232, 188, 176, +232, 189, 152, 232, 190, 128, 232, 190, 168, 232, 191, 144, 232, 191, 184, 233, +128, 160, 233, 129, 136, 233, 129, 176, 233, 130, 152, 233, 131, 128, 233, 131, +168, 233, 132, 144, 233, 132, 184, 233, 133, 160, 233, 134, 136, 233, 134, 176, +233, 135, 152, 233, 136, 128, 233, 136, 168, 233, 137, 144, 233, 137, 184, 233, +138, 160, 233, 139, 136, 233, 139, 176, 233, 140, 152, 233, 141, 128, 233, 141, +168, 233, 142, 144, 233, 142, 184, 233, 143, 160, 233, 144, 136, 233, 144, 176, +233, 145, 152, 233, 146, 128, 233, 146, 168, 233, 147, 144, 233, 147, 184, 233, +148, 160, 233, 149, 136, 233, 149, 176, 233, 150, 152, 233, 151, 128, 233, 151, +168, 233, 152, 144, 233, 152, 184, 233, 153, 160, 233, 154, 136, 233, 154, 176, +233, 155, 152, 233, 156, 128, 233, 156, 168, 233, 157, 144, 233, 157, 184, 233, +158, 160, 233, 159, 136, 233, 159, 176, 233, 160, 152, 233, 161, 128, 233, 161, +168, 233, 162, 144, 233, 162, 184, 233, 163, 160, 233, 164, 136, 233, 164, 176, +233, 165, 152, 233, 166, 128, 233, 166, 168, 233, 167, 144, 233, 167, 184, 233, +168, 160, 233, 169, 136, 233, 169, 176, 233, 170, 152, 233, 171, 128, 233, 171, +168, 233, 172, 144, 233, 172, 184, 233, 173, 160, 233, 174, 136, 233, 174, 176, +233, 175, 152, 233, 176, 128, 233, 176, 168, 233, 177, 144, 233, 177, 184, 233, +178, 160, 233, 179, 136, 233, 179, 176, 233, 180, 152, 233, 181, 128, 233, 181, +168, 233, 182, 144, 233, 182, 184, 233, 183, 160, 233, 184, 136, 233, 184, 176, +233, 185, 152, 233, 186, 128, 233, 186, 168, 233, 187, 144, 233, 187, 184, 233, +188, 160, 233, 189, 136, 233, 189, 176, 233, 190, 152, 233, 191, 128, 233, 191, +168, 234, 128, 144, 234, 128, 184, 234, 129, 160, 234, 130, 136, 234, 130, 176, +234, 131, 152, 234, 132, 128, 234, 132, 168, 234, 133, 144, 234, 133, 184, 234, +134, 160, 234, 135, 136, 234, 135, 176, 234, 136, 152, 234, 137, 128, 234, 137, +168, 234, 138, 144, 234, 138, 184, 234, 139, 160, 234, 140, 136, 234, 140, 176, +234, 141, 152, 234, 142, 128, 234, 142, 168, 234, 143, 144, 234, 143, 184, 234, +144, 160, 234, 145, 136, 234, 145, 176, 234, 146, 152, 234, 147, 128, 234, 147, +168, 234, 148, 144, 234, 148, 184, 234, 149, 160, 234, 150, 136, 234, 150, 176, +234, 151, 152, 234, 152, 128, 234, 152, 168, 234, 153, 144, 234, 153, 184, 234, +154, 160, 234, 155, 136, 234, 155, 176, 234, 156, 152, 234, 157, 128, 234, 157, +168, 234, 158, 144, 234, 158, 184, 234, 159, 160, 234, 160, 136, 234, 160, 176, +234, 161, 152, 234, 162, 128, 234, 162, 168, 234, 163, 144, 234, 163, 184, 234, +164, 160, 234, 165, 136, 234, 165, 176, 234, 166, 152, 234, 167, 128, 234, 167, +168, 234, 168, 144, 234, 168, 184, 234, 169, 160, 234, 170, 136, 234, 170, 176, +234, 171, 152, 234, 172, 128, 234, 172, 168, 234, 173, 144, 234, 173, 184, 234, +174, 160, 234, 175, 136, 234, 175, 176, 234, 176, 152, 234, 177, 128, 234, 177, +168, 234, 178, 144, 234, 178, 184, 234, 179, 160, 234, 180, 136, 234, 180, 176, +234, 181, 152, 234, 182, 128, 234, 182, 168, 234, 183, 144, 234, 183, 184, 234, +184, 160, 234, 185, 136, 234, 185, 176, 234, 186, 152, 234, 187, 128, 234, 187, +168, 234, 188, 144, 234, 188, 184, 234, 189, 160, 234, 190, 136, 234, 190, 176, +234, 191, 152, 235, 128, 128, 235, 128, 168, 235, 129, 144, 235, 129, 184, 235, +130, 160, 235, 131, 136, 235, 131, 176, 235, 132, 152, 235, 133, 128, 235, 133, +168, 235, 134, 144, 235, 134, 184, 235, 135, 160, 235, 136, 136, 235, 136, 176, +235, 137, 152, 235, 138, 128, 235, 138, 168, 235, 139, 144, 235, 139, 184, 235, +140, 160, 235, 141, 136, 235, 141, 176, 235, 142, 152, 235, 143, 128, 235, 143, +168, 235, 144, 144, 235, 144, 184, 235, 145, 160, 235, 146, 136, 235, 146, 176, +235, 147, 152, 235, 148, 128, 235, 148, 168, 235, 149, 144, 235, 149, 184, 235, +150, 160, 235, 151, 136, 235, 151, 176, 235, 152, 152, 235, 153, 128, 235, 153, +168, 235, 154, 144, 235, 154, 184, 235, 155, 160, 235, 156, 136, 235, 156, 176, +235, 157, 152, 235, 158, 128, 235, 158, 168, 235, 159, 144, 235, 159, 184, 235, +160, 160, 235, 161, 136, 235, 161, 176, 235, 162, 152, 235, 163, 128, 235, 163, +168, 235, 164, 144, 235, 164, 184, 235, 165, 160, 235, 166, 136, 235, 166, 176, +235, 167, 152, 235, 168, 128, 235, 168, 168, 235, 169, 144, 235, 169, 184, 235, +170, 160, 235, 171, 136, 235, 171, 176, 235, 172, 152, 235, 173, 128, 235, 173, +168, 235, 174, 144, 235, 174, 184, 235, 175, 160, 235, 176, 136, 235, 176, 176, +235, 177, 152, 235, 178, 128, 235, 178, 168, 235, 179, 144, 235, 179, 184, 235, +180, 160, 235, 181, 136, 235, 181, 176, 235, 182, 152, 235, 183, 128, 235, 183, +168, 235, 184, 144, 235, 184, 184, 235, 185, 160, 235, 186, 136, 235, 186, 176, +235, 187, 152, 235, 188, 128, 235, 188, 168, 235, 189, 144, 235, 189, 184, 235, +190, 160, 235, 191, 136, 235, 191, 176, 236, 128, 152, 236, 129, 128, 236, 129, +168, 236, 130, 144, 236, 130, 184, 236, 131, 160, 236, 132, 136, 236, 132, 176, +236, 133, 152, 236, 134, 128, 236, 134, 168, 236, 135, 144, 236, 135, 184, 236, +136, 160, 236, 137, 136, 236, 137, 176, 236, 138, 152, 236, 139, 128, 236, 139, +168, 236, 140, 144, 236, 140, 184, 236, 141, 160, 236, 142, 136, 236, 142, 176, +236, 143, 152, 236, 144, 128, 236, 144, 168, 236, 145, 144, 236, 145, 184, 236, +146, 160, 236, 147, 136, 236, 147, 176, 236, 148, 152, 236, 149, 128, 236, 149, +168, 236, 150, 144, 236, 150, 184, 236, 151, 160, 236, 152, 136, 236, 152, 176, +236, 153, 152, 236, 154, 128, 236, 154, 168, 236, 155, 144, 236, 155, 184, 236, +156, 160, 236, 157, 136, 236, 157, 176, 236, 158, 152, 236, 159, 128, 236, 159, +168, 236, 160, 144, 236, 160, 184, 236, 161, 160, 236, 162, 136, 236, 162, 176, +236, 163, 152, 236, 164, 128, 236, 164, 168, 236, 165, 144, 236, 165, 184, 236, +166, 160, 236, 167, 136, 236, 167, 176, 236, 168, 152, 236, 169, 128, 236, 169, +168, 236, 170, 144, 236, 170, 184, 236, 171, 160, 236, 172, 136, 236, 172, 176, +236, 173, 152, 236, 174, 128, 236, 174, 168, 236, 175, 144, 236, 175, 184, 236, +176, 160, 236, 177, 136, 236, 177, 176, 236, 178, 152, 236, 179, 128, 236, 179, +168, 236, 180, 144, 236, 180, 184, 236, 181, 160, 236, 182, 136, 236, 182, 176, +236, 183, 152, 236, 184, 128, 236, 184, 168, 236, 185, 144, 236, 185, 184, 236, +186, 160, 236, 187, 136, 236, 187, 176, 236, 188, 152, 236, 189, 128, 236, 189, +168, 236, 190, 144, 236, 190, 184, 236, 191, 160, 237, 128, 136, 237, 128, 176, +237, 129, 152, 237, 130, 128, 237, 130, 168, 237, 131, 144, 237, 131, 184, 237, +132, 160, 237, 133, 136, 237, 133, 176, 237, 134, 152, 237, 135, 128, 237, 135, +168, 237, 136, 144, 237, 136, 184, 237, 137, 160, 237, 138, 136, 237, 138, 176, +237, 139, 152, 237, 140, 128, 237, 140, 168, 237, 141, 144, 237, 141, 184, 237, +142, 160, 237, 143, 136, 237, 143, 176, 237, 144, 152, 237, 145, 128, 237, 145, +168, 237, 146, 144, 237, 146, 184, 237, 147, 160, 237, 148, 136, 237, 148, 176, +237, 149, 152, 237, 150, 128, 237, 150, 168, 237, 151, 144, 237, 151, 184, 237, +152, 160, 237, 153, 136, 237, 153, 176, 237, 154, 152, 237, 155, 128, 237, 155, +168, 237, 156, 144, 237, 156, 184, 237, 157, 160, 237, 158, 136, 237, 158, 176, +237, 159, 152, 238, 128, 128, 238, 128, 168, 238, 129, 144, 238, 129, 184, 238, +130, 160, 238, 131, 136, 238, 131, 176, 238, 132, 152, 238, 133, 128, 238, 133, +168, 238, 134, 144, 238, 134, 184, 238, 135, 160, 238, 136, 136, 238, 136, 176, +238, 137, 152, 238, 138, 128, 238, 138, 168, 238, 139, 144, 238, 139, 184, 238, +140, 160, 238, 141, 136, 238, 141, 176, 238, 142, 152, 238, 143, 128, 238, 143, +168, 238, 144, 144, 238, 144, 184, 238, 145, 160, 238, 146, 136, 238, 146, 176, +238, 147, 152, 238, 148, 128, 238, 148, 168, 238, 149, 144, 238, 149, 184, 238, +150, 160, 238, 151, 136, 238, 151, 176, 238, 152, 152, 238, 153, 128, 238, 153, +168, 238, 154, 144, 238, 154, 184, 238, 155, 160, 238, 156, 136, 238, 156, 176, +238, 157, 152, 238, 158, 128, 238, 158, 168, 238, 159, 144, 238, 159, 184, 238, +160, 160, 238, 161, 136, 238, 161, 176, 238, 162, 152, 238, 163, 128, 238, 163, +168, 238, 164, 144, 238, 164, 184, 238, 165, 160, 238, 166, 136, 238, 166, 176, +238, 167, 152, 238, 168, 128, 238, 168, 168, 238, 169, 144, 238, 169, 184, 238, +170, 160, 238, 171, 136, 238, 171, 176, 238, 172, 152, 238, 173, 128, 238, 173, +168, 238, 174, 144, 238, 174, 184, 238, 175, 160, 238, 176, 136, 238, 176, 176, +238, 177, 152, 238, 178, 128, 238, 178, 168, 238, 179, 144, 238, 179, 184, 238, +180, 160, 238, 181, 136, 238, 181, 176, 238, 182, 152, 238, 183, 128, 238, 183, +168, 238, 184, 144, 238, 184, 184, 238, 185, 160, 238, 186, 136, 238, 186, 176, +238, 187, 152, 238, 188, 128, 238, 188, 168, 238, 189, 144, 238, 189, 184, 238, +190, 160, 238, 191, 136, 238, 191, 176, 239, 128, 152, 239, 129, 128, 239, 129, +168, 239, 130, 144, 239, 130, 184, 239, 131, 160, 239, 132, 136, 239, 132, 176, +239, 133, 152, 239, 134, 128, 239, 134, 168, 239, 135, 144, 239, 135, 184, 239, +136, 160, 239, 137, 136, 239, 137, 176, 239, 138, 152, 239, 139, 128, 239, 139, +168, 239, 140, 144, 239, 140, 184, 239, 141, 160, 239, 142, 136, 239, 142, 176, +239, 143, 152, 239, 144, 128, 239, 144, 168, 239, 145, 144, 239, 145, 184, 239, +146, 160, 239, 147, 136, 239, 147, 176, 239, 148, 152, 239, 149, 128, 239, 149, +168, 239, 150, 144, 239, 150, 184, 239, 151, 160, 239, 152, 136, 239, 152, 176, +239, 153, 152, 239, 154, 128, 239, 154, 168, 239, 155, 144, 239, 155, 184, 239, +156, 160, 239, 157, 136, 239, 157, 176, 239, 158, 152, 239, 159, 128, 239, 159, +168, 239, 160, 144, 239, 160, 184, 239, 161, 160, 239, 162, 136, 239, 162, 176, +239, 163, 152, 239, 164, 128, 239, 164, 168, 239, 165, 144, 239, 165, 184, 239, +166, 160, 239, 167, 136, 239, 167, 176, 239, 168, 152, 239, 169, 128, 239, 169, +168, 239, 170, 144, 239, 170, 184, 239, 171, 160, 239, 172, 136, 239, 172, 176, +239, 173, 152, 239, 174, 128, 239, 174, 168, 239, 175, 144, 239, 175, 184, 239, +176, 160, 239, 177, 136, 239, 177, 176, 239, 178, 152, 239, 179, 128, 239, 179, +168, 239, 180, 144, 239, 180, 184, 239, 181, 160, 239, 182, 136, 239, 182, 176, +239, 183, 152, 239, 184, 128, 239, 184, 168, 239, 185, 144, 239, 185, 184, 239, +186, 160, 239, 187, 136, 239, 187, 176, 239, 188, 152, 239, 189, 128, 239, 189, +168, 239, 190, 144, 239, 190, 184, 239, 191, 160 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_x_windows_950.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_x_windows_950.java new file mode 100644 index 0000000..ea8fd6b --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_x_windows_950.java @@ -0,0 +1,251 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.KnownFailure; +import dalvik.annotation.TestTargetClass; + +import java.nio.charset.CharacterCodingException; + +@TestTargetClass(targets.Charsets.x_windows_950.class) + +public class Charset_MultiByte_x_windows_950 extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "x-windows-950"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +167, 175, 176, 177, 183, 215, 247, 711, 713, 913, 945, 8211, 8242, 8364, 8451, 8544, +8592, 8725, 8756, 8786, 8853, 8895, 9472, 9508, 9552, 9582, 9612, 9650, 9698, 9733, 9792, 12288, +12318, 12549, 12579, 12963, 13198, 13252, 19968, 19998, 20028, 20060, 20094, 20126, 20160, 20190, 20221, 20253, +20283, 20313, 20343, 20373, 20403, 20433, 20463, 20493, 20523, 20553, 20584, 20615, 20652, 20682, 20712, 20742, +20772, 20803, 20833, 20864, 20894, 20924, 20956, 20986, 21020, 21050, 21082, 21112, 21142, 21179, 21209, 21239, +21269, 21300, 21330, 21360, 21390, 21420, 21450, 21480, 21510, 21540, 21570, 21600, 21630, 21664, 21694, 21726, +21756, 21786, 21816, 21846, 21877, 21907, 21937, 21967, 21999, 22029, 22060, 22090, 22120, 22150, 22181, 22211, +22241, 22271, 22302, 22334, 22369, 22400, 22430, 22460, 22492, 22522, 22553, 22583, 22613, 22644, 22675, 22705, +22735, 22767, 22797, 22827, 22857, 22887, 22917, 22947, 22977, 23008, 23038, 23068, 23100, 23130, 23160, 23191, +23221, 23253, 23283, 23315, 23346, 23376, 23406, 23436, 23468, 23498, 23528, 23559, 23589, 23620, 23650, 23686, +23716, 23750, 23784, 23814, 23844, 23874, 23906, 23936, 23966, 23996, 24029, 24061, 24091, 24125, 24155, 24185, +24215, 24245, 24275, 24305, 24335, 24365, 24395, 24425, 24455, 24485, 24515, 24545, 24575, 24605, 24640, 24670, +24703, 24733, 24763, 24793, 24823, 24853, 24884, 24914, 24944, 24974, 25004, 25034, 25064, 25095, 25125, 25155, +25185, 25215, 25256, 25286, 25323, 25353, 25384, 25414, 25445, 25475, 25505, 25536, 25567, 25606, 25636, 25667, +25697, 25727, 25757, 25787, 25817, 25847, 25877, 25907, 25937, 25967, 26000, 26030, 26060, 26092, 26122, 26152, +26183, 26213, 26244, 26274, 26304, 26334, 26364, 26395, 26425, 26455, 26485, 26515, 26546, 26576, 26606, 26642, +26673, 26703, 26733, 26763, 26793, 26823, 26854, 26884, 26917, 26948, 26978, 27010, 27040, 27070, 27106, 27136, +27166, 27196, 27226, 27262, 27292, 27322, 27353, 27384, 27414, 27444, 27476, 27506, 27537, 27567, 27597, 27627, +27657, 27687, 27718, 27749, 27779, 27819, 27849, 27879, 27911, 27941, 27992, 28022, 28052, 28082, 28112, 28142, +28185, 28216, 28246, 28276, 28306, 28336, 28366, 28396, 28426, 28457, 28494, 28524, 28555, 28585, 28615, 28646, +28676, 28706, 28736, 28766, 28796, 28826, 28856, 28887, 28918, 28951, 28982, 29012, 29042, 29072, 29103, 29134, +29164, 29194, 29224, 29254, 29287, 29317, 29347, 29377, 29407, 29437, 29467, 29498, 29528, 29558, 29588, 29618, +29650, 29684, 29718, 29748, 29778, 29808, 29840, 29871, 29903, 29934, 29964, 29994, 30024, 30054, 30084, 30114, +30144, 30174, 30204, 30234, 30264, 30294, 30325, 30355, 30388, 30418, 30448, 30480, 30511, 30541, 30571, 30601, +30631, 30663, 30693, 30723, 30753, 30787, 30818, 30848, 30878, 30908, 30938, 30969, 30999, 31029, 31059, 31090, +31120, 31150, 31181, 31211, 31242, 31272, 31302, 31335, 31365, 31395, 31425, 31455, 31485, 31515, 31547, 31584, +31618, 31648, 31678, 31708, 31739, 31769, 31799, 31831, 31861, 31892, 31922, 31952, 31982, 32012, 32043, 32074, +32104, 32134, 32166, 32196, 32227, 32259, 32289, 32319, 32350, 32380, 32410, 32566, 32596, 32626, 32657, 32687, +32717, 32747, 32779, 32809, 32839, 32871, 32901, 32931, 32962, 32992, 33022, 33053, 33085, 33115, 33145, 33175, +33205, 33237, 33267, 33297, 33327, 33358, 33388, 33418, 33448, 33489, 33519, 33549, 33579, 33609, 33651, 33682, +33712, 33742, 33772, 33802, 33833, 33863, 33893, 33926, 33956, 33986, 34023, 34054, 34084, 34115, 34145, 34176, +34206, 34237, 34268, 34298, 34328, 34358, 34388, 34419, 34449, 34479, 34512, 34549, 34579, 34609, 34639, 34669, +34701, 34731, 34761, 34791, 34821, 34851, 34881, 34913, 34943, 34974, 35004, 35034, 35064, 35094, 35125, 35155, +35185, 35215, 35245, 35282, 35312, 35342, 35372, 35402, 35432, 35462, 35492, 35522, 35552, 35582, 35612, 35642, +35672, 35703, 35733, 35895, 35925, 35955, 35985, 36015, 36047, 36077, 36109, 36196, 36228, 36259, 36289, 36319, +36349, 36379, 36409, 36439, 36470, 36500, 36530, 36561, 36591, 36621, 36652, 36683, 36763, 36799, 36832, 36862, +36892, 36924, 36955, 36985, 37015, 37045, 37076, 37106, 37136, 37166, 37196, 37226, 37257, 37287, 37317, 37347, +37377, 37411, 37445, 37475, 37506, 37536, 37568, 37598, 37628, 37658, 37688, 37718, 37749, 37780, 37810, 37840, +37870, 37900, 37930, 37960, 37992, 38263, 38296, 38326, 38356, 38428, 38458, 38488, 38518, 38548, 38579, 38610, +38640, 38670, 38700, 38731, 38761, 38792, 38822, 38852, 38883, 38913, 38944, 38977, 39007, 39080, 39110, 39141, +39171, 39201, 39231, 39262, 39318, 39348, 39378, 39408, 39438, 39468, 39498, 39528, 39592, 39622, 39654, 39684, +39714, 39745, 39775, 39805, 39835, 39865, 39895, 39927, 39959, 39990, 40020, 40051, 40165, 40195, 40226, 40256, +40287, 40317, 40347, 40377, 40407, 40437, 40467, 40565, 40595, 40628, 40659, 40690, 40720, 40750, 40780, 40810, +40845, 57344, 57374, 57404, 57434, 57464, 57494, 57524, 57554, 57584, 57614, 57644, 57674, 57704, 57734, 57764, +57794, 57824, 57854, 57884, 57914, 57944, 57974, 58004, 58034, 58064, 58094, 58124, 58154, 58184, 58214, 58244, +58274, 58304, 58334, 58364, 58394, 58424, 58454, 58484, 58514, 58544, 58574, 58604, 58634, 58664, 58694, 58724, +58754, 58784, 58814, 58844, 58874, 58904, 58934, 58964, 58994, 59024, 59054, 59084, 59114, 59144, 59174, 59204, +59234, 59264, 59294, 59324, 59354, 59384, 59414, 59444, 59474, 59504, 59534, 59564, 59594, 59624, 59654, 59684, +59714, 59744, 59774, 59804, 59834, 59864, 59894, 59924, 59954, 59984, 60014, 60044, 60074, 60104, 60134, 60164, +60194, 60224, 60254, 60284, 60314, 60344, 60374, 60404, 60434, 60464, 60494, 60524, 60554, 60584, 60614, 60644, +60674, 60704, 60734, 60764, 60794, 60824, 60854, 60884, 60914, 60944, 60974, 61004, 61034, 61064, 61094, 61124, +61154, 61184, 61214, 61244, 61274, 61304, 61334, 61364, 61394, 61424, 61454, 61484, 61514, 61544, 61574, 61604, +61634, 61664, 61694, 61724, 61754, 61784, 61814, 61844, 61874, 61904, 61934, 61964, 61994, 62024, 62054, 62084, +62114, 62144, 62174, 62204, 62234, 62264, 62294, 62324, 62354, 62384, 62414, 62444, 62474, 62504, 62534, 62564, +62594, 62624, 62654, 62684, 62714, 62744, 62774, 62804, 62834, 62864, 62894, 62924, 62954, 62984, 63014, 63044, +63074, 63104, 63134, 63164, 63194, 63224, 63254, 63284, 63314, 63344, 63374, 63404, 63434, 63464, 63494, 63524, +63554, 64012, 65072, 65102, 65281, 65311, 65343, 65373, 65504 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +161, 177, 161, 194, 162, 88, 161, 211, 161, 80, 161, 209, 161, 210, 163, 190, +163, 188, 163, 68, 163, 92, 161, 86, 161, 172, 163, 225, 162, 74, 162, 185, +161, 246, 162, 65, 161, 239, 161, 220, 161, 242, 161, 233, 162, 119, 162, 116, +162, 164, 162, 161, 162, 109, 161, 182, 162, 168, 161, 185, 161, 240, 161, 64, +161, 170, 163, 116, 163, 180, 161, 192, 162, 85, 162, 87, 164, 64, 165, 224, +201, 100, 201, 65, 176, 174, 168, 200, 164, 176, 165, 81, 165, 247, 201, 180, +202, 91, 167, 69, 203, 188, 203, 202, 205, 232, 171, 77, 173, 193, 173, 191, +173, 219, 176, 182, 216, 91, 216, 95, 182, 202, 220, 185, 224, 243, 228, 234, +236, 188, 164, 184, 162, 93, 190, 172, 203, 205, 203, 206, 187, 254, 165, 88, +202, 108, 168, 235, 208, 231, 220, 199, 241, 237, 168, 241, 176, 200, 241, 238, +164, 80, 232, 250, 168, 242, 166, 76, 202, 116, 225, 70, 164, 206, 165, 111, +166, 91, 202, 165, 167, 102, 203, 235, 203, 227, 206, 72, 206, 76, 206, 78, +173, 243, 208, 247, 176, 225, 176, 220, 212, 113, 216, 109, 179, 237, 220, 216, +182, 226, 185, 198, 229, 68, 228, 251, 190, 185, 236, 195, 195, 96, 245, 196, +201, 198, 171, 170, 249, 107, 167, 163, 169, 89, 203, 249, 206, 81, 209, 81, +212, 177, 176, 242, 216, 161, 216, 126, 220, 233, 225, 93, 185, 211, 229, 76, +236, 204, 167, 167, 206, 96, 164, 210, 169, 94, 182, 248, 201, 206, 167, 173, +204, 74, 206, 115, 206, 116, 174, 82, 177, 64, 177, 66, 216, 187, 216, 197, +220, 249, 225, 110, 225, 115, 233, 86, 236, 208, 164, 108, 212, 240, 167, 185, +209, 104, 216, 213, 185, 235, 177, 78, 201, 213, 204, 89, 185, 240, 202, 199, +204, 92, 206, 171, 174, 111, 177, 83, 177, 92, 216, 233, 221, 86, 225, 164, +229, 109, 192, 172, 164, 116, 180, 83, 169, 173, 180, 85, 185, 243, 183, 70, +169, 177, 177, 103, 185, 248, 245, 203, 166, 161, 171, 218, 233, 116, 177, 109, +171, 224, 216, 246, 164, 223, 202, 221, 169, 193, 171, 228, 206, 202, 206, 195, +177, 118, 209, 167, 177, 162, 213, 91, 221, 101, 180, 106, 183, 91, 225, 200, +188, 162, 188, 168, 188, 169, 190, 210, 236, 230, 249, 186, 221, 117, 206, 211, +201, 230, 169, 211, 169, 225, 169, 238, 206, 218, 171, 246, 174, 193, 174, 185, +213, 103, 177, 189, 177, 196, 180, 122, 217, 99, 183, 112, 221, 126, 221, 162, +217, 98, 225, 237, 217, 90, 190, 216, 233, 174, 194, 94, 244, 77, 233, 175, +177, 207, 221, 188, 180, 180, 217, 124, 177, 220, 166, 175, 169, 254, 172, 81, +209, 213, 213, 169, 183, 121, 186, 90, 233, 181, 242, 75, 176, 210, 177, 230, +201, 240, 168, 65, 170, 83, 170, 85, 207, 86, 172, 89, 207, 79, 209, 236, +209, 226, 209, 224, 213, 180, 213, 204, 213, 188, 217, 217, 217, 209, 217, 172, +217, 216, 221, 228, 221, 205, 183, 167, 226, 64, 226, 76, 229, 213, 229, 202, +188, 207, 233, 215, 233, 203, 192, 207, 192, 204, 239, 226, 242, 80, 245, 209, +198, 86, 209, 249, 233, 223, 183, 179, 213, 218, 194, 108, 165, 192, 178, 64, +237, 77, 174, 241, 201, 248, 203, 91, 168, 85, 170, 106, 172, 117, 204, 246, +207, 167, 172, 122, 210, 76, 210, 72, 175, 75, 178, 71, 214, 64, 178, 97, +181, 65, 180, 229, 180, 242, 213, 228, 222, 95, 222, 85, 226, 108, 186, 173, +226, 126, 186, 120, 226, 118, 230, 73, 230, 90, 237, 79, 233, 236, 237, 86, +233, 246, 242, 98, 244, 102, 197, 244, 168, 96, 205, 89, 172, 181, 210, 113, +214, 88, 214, 75, 181, 77, 222, 108, 222, 115, 226, 187, 230, 99, 191, 82, +192, 236, 242, 106, 198, 121, 192, 240, 170, 170, 218, 107, 242, 113, 203, 101, +207, 194, 175, 86, 178, 114, 222, 173, 230, 117, 239, 254, 203, 107, 172, 194, +210, 180, 214, 120, 218, 126, 181, 94, 222, 180, 186, 192, 237, 105, 237, 110, +196, 110, 207, 216, 191, 94, 202, 70, 207, 219, 178, 165, 237, 115, 172, 207, +210, 199, 181, 108, 222, 204, 230, 181, 191, 97, 194, 125, 249, 204, 181, 113, +181, 114, 178, 176, 205, 120, 210, 207, 214, 169, 218, 189, 183, 251, 230, 190, +193, 64, 195, 169, 170, 190, 207, 242, 210, 225, 178, 185, 218, 209, 222, 240, +226, 242, 189, 88, 191, 106, 237, 172, 242, 163, 246, 246, 210, 234, 218, 212, +227, 67, 194, 167, 207, 250, 210, 237, 218, 215, 227, 72, 191, 112, 242, 166, +210, 248, 223, 66, 237, 185, 179, 186, 172, 242, 178, 195, 218, 223, 184, 97, +227, 93, 189, 105, 230, 216, 234, 195, 237, 191, 240, 99, 195, 178, 246, 250, +205, 168, 214, 222, 223, 84, 234, 202, 244, 171, 211, 90, 181, 181, 214, 238, +181, 179, 223, 88, 227, 117, 227, 108, 189, 116, 230, 233, 234, 205, 193, 104, +194, 182, 196, 126, 248, 254, 166, 206, 170, 201, 184, 112, 208, 78, 189, 126, +214, 248, 230, 246, 181, 192, 234, 230, 215, 66, 230, 252, 181, 194, 205, 173, +208, 91, 208, 88, 219, 72, 215, 80, 219, 79, 223, 119, 184, 161, 231, 68, +234, 236, 242, 194, 166, 220, 215, 82, 211, 113, 231, 74, 247, 239, 203, 161, +205, 191, 173, 98, 173, 102, 206, 65, 175, 237, 175, 243, 215, 94, 178, 247, +215, 116, 219, 116, 219, 168, 181, 220, 223, 199, 223, 215, 223, 176, 223, 179, +227, 173, 227, 178, 231, 115, 189, 183, 231, 76, 191, 187, 234, 253, 237, 244, +237, 254, 240, 171, 242, 212, 196, 169, 245, 241, 247, 76, 176, 64, 208, 169, +211, 189, 179, 76, 181, 241, 223, 232, 184, 187, 227, 235, 231, 187, 231, 175, +191, 196, 193, 177, 238, 98, 240, 187, 195, 199, 196, 247, 208, 170, 191, 197, +211, 215, 179, 79, 219, 202, 223, 247, 187, 114, 231, 202, 238, 113, 240, 210, +247, 82, 179, 87, 238, 121, 168, 164, 231, 210, 176, 81, 215, 203, 219, 226, +184, 229, 224, 70, 187, 126, 189, 212, 235, 126, 191, 213, 238, 174, 240, 237, +195, 209, 197, 64, 248, 194, 168, 166, 168, 168, 193, 199, 235, 177, 182, 74, +228, 84, 189, 228, 196, 186, 168, 170, 219, 237, 189, 236, 215, 218, 184, 242, +228, 91, 231, 249, 191, 229, 240, 250, 195, 221, 247, 94, 184, 250, 211, 232, +219, 252, 228, 103, 232, 71, 241, 73, 168, 175, 203, 166, 208, 182, 211, 234, +215, 229, 185, 71, 187, 191, 235, 209, 202, 82, 170, 242, 215, 238, 215, 236, +224, 164, 232, 90, 176, 117, 185, 84, 190, 75, 241, 80, 198, 111, 179, 168, +220, 98, 182, 116, 185, 100, 224, 197, 228, 170, 228, 123, 232, 101, 232, 123, +191, 251, 191, 254, 235, 228, 238, 209, 193, 228, 194, 232, 241, 102, 243, 101, +243, 110, 245, 65, 246, 102, 247, 110, 248, 203, 170, 248, 185, 104, 236, 75, +194, 243, 170, 250, 205, 219, 176, 164, 179, 179, 185, 106, 241, 111, 187, 220, +220, 168, 192, 75, 243, 124, 249, 173, 173, 178, 232, 179, 194, 254, 248, 79, +247, 114, 173, 182, 232, 187, 239, 69, 245, 81, 173, 183, 246, 116, 216, 79, +187, 229, 192, 96, 195, 73, 198, 97, 173, 186, 185, 165, 190, 115, 236, 101, +195, 77, 245, 93, 247, 126, 249, 195, 176, 169, 245, 102, 187, 236, 241, 188, +198, 75, 187, 237, 228, 225, 236, 161, 239, 109, 241, 205, 243, 208, 245, 108, +245, 116, 247, 182, 197, 235, 249, 120, 179, 190, 190, 161, 236, 171, 239, 166, +241, 219, 243, 227, 245, 126, 246, 191, 197, 195, 247, 196, 249, 124, 179, 191, +196, 83, 196, 84, 232, 241, 248, 118, 232, 243, 245, 185, 241, 233, 197, 198, +192, 115, 250, 64, 250, 94, 250, 124, 250, 188, 250, 218, 250, 248, 251, 87, +251, 117, 251, 181, 251, 211, 251, 241, 252, 80, 252, 110, 252, 174, 252, 204, +252, 234, 253, 73, 253, 103, 253, 167, 253, 197, 253, 227, 254, 66, 254, 96, +254, 126, 254, 190, 254, 220, 254, 250, 142, 89, 142, 119, 142, 183, 142, 213, +142, 243, 143, 82, 143, 112, 143, 176, 143, 206, 143, 236, 144, 75, 144, 105, +144, 169, 144, 199, 144, 229, 145, 68, 145, 98, 145, 162, 145, 192, 145, 222, +145, 252, 146, 91, 146, 121, 146, 185, 146, 215, 146, 245, 147, 84, 147, 114, +147, 178, 147, 208, 147, 238, 148, 77, 148, 107, 148, 171, 148, 201, 148, 231, +149, 70, 149, 100, 149, 164, 149, 194, 149, 224, 149, 254, 150, 93, 150, 123, +150, 187, 150, 217, 150, 247, 151, 86, 151, 116, 151, 180, 151, 210, 151, 240, +152, 79, 152, 109, 152, 173, 152, 203, 152, 233, 153, 72, 153, 102, 153, 166, +153, 196, 153, 226, 154, 65, 154, 95, 154, 125, 154, 189, 154, 219, 154, 249, +155, 88, 155, 118, 155, 182, 155, 212, 155, 242, 156, 81, 156, 111, 156, 175, +156, 205, 156, 235, 157, 74, 157, 104, 157, 168, 157, 198, 157, 228, 158, 67, +158, 97, 158, 161, 158, 191, 158, 221, 158, 251, 159, 90, 159, 120, 159, 184, +159, 214, 159, 244, 160, 83, 160, 113, 160, 177, 160, 207, 160, 237, 129, 76, +129, 106, 129, 170, 129, 200, 129, 230, 130, 69, 130, 99, 130, 163, 130, 193, +130, 223, 130, 253, 131, 92, 131, 122, 131, 186, 131, 216, 131, 246, 132, 85, +132, 115, 132, 179, 132, 209, 132, 239, 133, 78, 133, 108, 133, 172, 133, 202, +133, 232, 134, 71, 134, 101, 134, 165, 134, 195, 134, 225, 135, 64, 135, 94, +135, 124, 135, 188, 135, 218, 135, 248, 136, 87, 136, 117, 136, 181, 136, 211, +136, 241, 137, 80, 137, 110, 137, 174, 137, 204, 137, 234, 138, 73, 138, 103, +138, 167, 138, 197, 138, 227, 139, 66, 139, 96, 139, 126, 139, 190, 139, 220, +139, 250, 140, 89, 140, 119, 140, 183, 140, 213, 140, 243, 141, 82, 141, 112, +141, 176, 141, 206, 141, 236, 198, 172, 198, 202, 198, 232, 199, 71, 199, 101, +199, 165, 199, 195, 199, 225, 200, 64, 200, 94, 200, 124, 200, 188, 200, 218, +200, 248, 201, 74, 161, 74, 161, 201, 161, 73, 161, 72, 161, 196, 161, 98, +162, 70 + }); + + super.setUp(); + } + + @KnownFailure("This Characterset is not properly supported in Android!") + @Override + public void test_CodecDynamic() throws CharacterCodingException { + super.test_CodecDynamic(); + } + + @KnownFailure("This Characterset is not properly supported in Android!") + @Override + public void test_Decode() throws CharacterCodingException { + super.test_Decode(); + } + + @KnownFailure("This Characterset is not properly supported in Android!") + @Override + public void test_Encode() throws CharacterCodingException { + super.test_Encode(); + } + + @KnownFailure("This Characterset is mapped to Big5 Android!") + @Override + public void test_nameMatch() { + super.test_nameMatch(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByteAbstractTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByteAbstractTest.java new file mode 100644 index 0000000..c9d00bc --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByteAbstractTest.java @@ -0,0 +1,217 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CodingErrorAction; +import java.util.Arrays; + +@TestTargetClass(targets.Charsets._Abstract.class) + +/** + * Super class for concrete charset test suites. + */ +public class Charset_SingleByteAbstractTest extends Charset_AbstractTest { + + static byte[] allBytes; + static char[] allChars; + + @Override + protected void setUp() throws Exception { + allBytes = new byte[256]; + for (int i = 0; i < 256; i++) { + allBytes[i] = (byte) i; + } + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + + + public static void dumpDecoded () { + Charset_TestGenerator.Dumper out = new Charset_TestGenerator.Dumper1(); + ByteBuffer inputBB = ByteBuffer.wrap(allBytes); + CharBuffer outputCB; + decoder.onMalformedInput(CodingErrorAction.REPLACE); + try { + outputCB = decoder.decode(inputBB); + outputCB.rewind(); + while (outputCB.hasRemaining()) { + out.consume(outputCB.get()); + } + } catch (CharacterCodingException e) { + System.out.println(e); +// e.printStackTrace(); + } + } + + public static void decodeReplace (byte[] input, char[] expectedOutput) throws CharacterCodingException { + ByteBuffer inputBB = ByteBuffer.wrap(input); + CharBuffer outputCB; + decoder.onMalformedInput(CodingErrorAction.REPLACE); + outputCB = decoder.decode(inputBB); + outputCB.rewind(); + assertEqualChars2("Decoded charactes must match!", + expectedOutput, + outputCB.array(), + input); +// assertTrue("Decoded charactes (REPLACEed ones INCLUSIVE) must match!", +// Arrays.equals(expectedOutput, outputCB.array())); + +// assertEqualChars("Decoded charactes (REPLACEed ones INCLUSIVE) must match!", +// expectedOutput, +// outputCB.array()); + +// assertEquals("Decoded charactes must match!", +// String.valueOf(allChars), +// outputCB.toString()); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "functionalCoDec_REPR", + args = {} + ) + @Override + public void test_Decode () throws CharacterCodingException { + decodeReplace(allBytes, allChars); +// ByteBuffer inputBB = ByteBuffer.wrap(allBytes); +// CharBuffer outputCB; +// decoder.onMalformedInput(CodingErrorAction.REPLACE); +// outputCB = decoder.decode(inputBB); +// outputCB.rewind(); +// assertEqualChars("Decoded charactes must match!", +// allChars, +// outputCB.array()); +//// assertEquals("Decoded charactes must match!", +//// String.valueOf(allChars), +//// outputCB.toString()); + } + + @TestTargetNew( + level = TestLevel.PARTIAL_COMPLETE, + method = "functionalCoDec_REPR", + args = {} + ) + @Override + public void test_Encode () throws CharacterCodingException { + CharBuffer inputCB = CharBuffer.wrap(allChars); + ByteBuffer outputBB; + encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); + outputBB = encoder.encode(inputCB); + outputBB.rewind(); + assertEqualBytes2("Encoded bytes must match!", allBytes, outputBB.array(), allChars); + } + +// static void assertEqualChars (String msg, char[] expected, char[] actual) { +// int len = expected.length; +// if (actual.length < len) len = actual.length; +// for (int i = 0; i < len; i++) { +// if (actual[i] != expected[i]) { +// System.out.format("Mismatch at index %d: %d instead of expected %d.\n", +// i, (int) actual[i], (int) expected[i]); +// } +//// else { +//// System.out.format("Match index %d: %d = %d\n", +//// i, (int) actual[i], (int) expected[i]); +//// } +// } +// assertTrue(msg, Arrays.equals(actual, expected)); +// } + + static void assertEqualChars2 (String msg, char[] expected, char[] actual, byte[] bytes) { + boolean match = true; + boolean replaceMatch = true; + int len = expected.length; + if (actual.length < len) len = actual.length; + for (int i = 0; i < len; i++) { + if (actual[i] == expected[i]) { + // Fine! + } + else { + if (expected[i] == 65533) { + if (actual[i] == (bytes[i] & 0xff)) { + System.out.format("REPLACE mismatch at index %d (byte %d): %d instead of expected %d.\n", + i, bytes[i] & 0xff, (int) actual[i], (int) expected[i]); + } else { + System.out.format("REPLACE mismatch at index %d (byte %d): %d instead of expected %d.\n", + i, bytes[i] & 0xff, (int) actual[i], (int) expected[i]); + } + replaceMatch = false; + } else { + System.out.format("MISMATCH at index %d (byte %d): %d instead of expected %d.\n", + i, bytes[i] & 0xff, (int) actual[i], (int) expected[i]); + match = false; + } + } +// if ((actual[i] != expected[i]) && +// !((actual[i] == bytes[i]) && (expected[i] == 65533))) { +// +// match = false; +// } + } + assertTrue(msg, match); + if (!replaceMatch) { + System.out.println("for charset " + charsetName); + } + } + +// static void assertEqualBytes (String msg, byte[] expected, byte[] actual) { +// int len = expected.length; +// if (actual.length < len) len = actual.length; +// for (int i = 0; i < len; i++) { +// if (actual[i] != expected[i]) { +// System.out.format("MISMATCH at index %d: %d instead of expected %d.\n", +// i, actual[i], expected[i]); +// } +// } +// assertTrue(msg, Arrays.equals(actual, expected)); +// } + + static void assertEqualBytes2 (String msg, byte[] expected, byte[] actual, char[] chars) { + boolean match = true; + int len = expected.length; + if (actual.length < len) len = actual.length; + for (int i = 0; i < len; i++) { + if ((actual[i] != expected[i]) && + !((chars[i] == 65533)) && (actual[i] == 63)) { + System.out.format("MISMATCH at index %d: %d instead of expected %d.\n", + i, actual[i], expected[i]); + match = false; + } + } + assertTrue(msg, match); + } + + public static void main(String[] args) { +// charset = Charset.defaultCharset(); +// decoder = charset.newDecoder(); +// System.out.println(charset.name()); + dumpDecoded(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_.java new file mode 100644 index 0000000..e48b6f4 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_.java @@ -0,0 +1,43 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets._Abstract.class) + +public class Charset_SingleByte_ extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = ""; + allChars = theseChars(new int[]{ + }); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_IBM864.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_IBM864.java new file mode 100644 index 0000000..45a3a39 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_IBM864.java @@ -0,0 +1,91 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.IBM864.class) + +public class Charset_SingleByte_IBM864 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { +// charsetName = "IBM864"; // ICU name "cp864", wanted Android name "CP864" + charsetName = "cp864"; // ICU name "cp864", wanted Android name "CP864" + + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28/*26*/, 27, 127/*28*/, 29, 30, 31, + 32, 33, 34, 35, 36, 37/*1642*/, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 26/*127*/, + 176, 183, 8729, 8730, 9618, 9472, 9474, 9532, 9508, 9516, 9500, 9524, 9488, 9484, 9492, 9496, + 946, 8734, 966, 177, 189, 188, 8776, 171, 187, 65271, 65272, 65533, 65533, 65275, 65276, 8203/*65533*/, + 160, 173, 65154, 163, 164, 65156, 65533, 65533, 65166, 65167, 65173, 65177, 1548, 65181, 65185, 65189, + 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 65233, 1563, 65201, 65205, 65209, 1567, + 162, 65152, 65153, 65155, 65157, 65226, 65163, 65165, 65169, 65171, 65175, 65179, 65183, 65187, 65191, 65193, + 65195, 65197, 65199, 65203, 65207, 65211, 65215, 65219/*65217*/, 65223/*65221*/, 65227, 65231, 166, 172, 247, 215, 65225, + 1600, 65235, 65239, 65243, 65247, 65251, 65255, 65259, 65261, 65263, 65267, 65213, 65228, 65230, 65229, 65249, + 65149, 65148/*1617*/, 65253, 65257, 65260, 65264, 65266, 65232, 65237, 65269, 65270, 65245, 65241, 65265, 9632, 65533}); +// allChars = theseChars(new int[]{ +// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +// 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +// 32, 33, 34, 35, 36, 1642, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +// 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +// 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +// 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +// 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +// 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +// 176, 183, 8729, 8730, 9618, 9472, 9474, 9532, 9508, 9516, 9500, 9524, 9488, 9484, 9492, 9496, +// 946, 8734, 966, 177, 189, 188, 8776, 171, 187, 65271, 65272, 65533, 65533, 65275, 65276, 65533, +// 160, 173, 65154, 163, 164, 65156, 65533, 65533, 65166, 65167, 65173, 65177, 1548, 65181, 65185, 65189, +// 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 65233, 1563, 65201, 65205, 65209, 1567, +// 162, 65152, 65153, 65155, 65157, 65226, 65163, 65165, 65169, 65171, 65175, 65179, 65183, 65187, 65191, 65193, +// 65195, 65197, 65199, 65203, 65207, 65211, 65215, 65217, 65221, 65227, 65231, 166, 172, 247, 215, 65225, +// 1600, 65235, 65239, 65243, 65247, 65251, 65255, 65259, 65261, 65263, 65267, 65213, 65228, 65230, 65229, 65249, +// 65149, 1617, 65253, 65257, 65260, 65264, 65266, 65232, 65237, 65269, 65270, 65245, 65241, 65265, 9632, 65533}); + + super.setUp(); + } + + public static void _test_Bytes_DifferentOnes_RI() throws CharacterCodingException { + decodeReplace( + theseBytes(new int[]{26, 28, 37, 127, 159, 215, 216, 241}), + new char[] {26, 28, 1642, 127, 65533, 65217, 65221, 1617} ); + } + + public static void test_Bytes_DifferentOnes_Android() throws CharacterCodingException { + // Android: + decodeReplace( + theseBytes(new int[]{26, 28, 37, 127, 159, 215, 216, 241}), + new char[] {28, 127, 37, 26, 8203, 65219, 65223, 65148} ); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_1.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_1.java new file mode 100644 index 0000000..edfebfb --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_1.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_1.class) + +public class Charset_SingleByte_ISO_8859_1 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-1"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_11.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_11.java new file mode 100644 index 0000000..4f87592 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_11.java @@ -0,0 +1,62 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.AndroidOnly; +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_11.class) +@AndroidOnly("charset x-iso-8859_11-2001 not supported ") +public class Charset_SingleByte_ISO_8859_11 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { +// charsetName = "ISO-8859-11"; + charsetName = "x-iso-8859_11-2001"; + + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, + 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, + 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 3630, 3631, + 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, 3641, 3642, 65533, 65533, 65533, 65533, 3647, + 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, + 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 65533, 65533, 65533, 65533}); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_13.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_13.java new file mode 100644 index 0000000..254505c --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_13.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_13.class) + +public class Charset_SingleByte_ISO_8859_13 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-13"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 8221, 162, 163, 164, 8222, 166, 167, 216, 169, 342, 171, 172, 173, 174, 198, + 176, 177, 178, 179, 8220, 181, 182, 183, 248, 185, 343, 187, 188, 189, 190, 230, + 260, 302, 256, 262, 196, 197, 280, 274, 268, 201, 377, 278, 290, 310, 298, 315, + 352, 323, 325, 211, 332, 213, 214, 215, 370, 321, 346, 362, 220, 379, 381, 223, + 261, 303, 257, 263, 228, 229, 281, 275, 269, 233, 378, 279, 291, 311, 299, 316, + 353, 324, 326, 243, 333, 245, 246, 247, 371, 322, 347, 363, 252, 380, 382, 8217}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_15.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_15.java new file mode 100644 index 0000000..0b29dd2 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_15.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_15.class) + +public class Charset_SingleByte_ISO_8859_15 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-15"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 8364, 165, 352, 167, 353, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 381, 181, 182, 183, 382, 185, 186, 187, 338, 339, 376, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_2.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_2.java new file mode 100644 index 0000000..19398ff --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_2.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_2.class) + +public class Charset_SingleByte_ISO_8859_2 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-2"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 260, 728, 321, 164, 317, 346, 167, 168, 352, 350, 356, 377, 173, 381, 379, + 176, 261, 731, 322, 180, 318, 347, 711, 184, 353, 351, 357, 378, 733, 382, 380, + 340, 193, 194, 258, 196, 313, 262, 199, 268, 201, 280, 203, 282, 205, 206, 270, + 272, 323, 327, 211, 212, 336, 214, 215, 344, 366, 218, 368, 220, 221, 354, 223, + 341, 225, 226, 259, 228, 314, 263, 231, 269, 233, 281, 235, 283, 237, 238, 271, + 273, 324, 328, 243, 244, 337, 246, 247, 345, 367, 250, 369, 252, 253, 355, 729}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_3.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_3.java new file mode 100644 index 0000000..272e517 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_3.java @@ -0,0 +1,90 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_3.class) + +public class Charset_SingleByte_ISO_8859_3 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-3"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 294, 728, 163, 164, 65533, 292, 167, 168, 304, 350, 286, 308, 173, 65533, 379, + 176, 295, 178, 179, 180, 181, 293, 183, 184, 305, 351, 287, 309, 189, 65533, 380, + 192, 193, 194, 65533, 196, 266, 264, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 65533, 209, 210, 211, 212, 288, 214, 215, 284, 217, 218, 219, 220, 364, 348, 223, + 224, 225, 226, 65533, 228, 267, 265, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 65533, 241, 242, 243, 244, 289, 246, 247, 285, 249, 250, 251, 252, 365, 349, 729}); + super.setUp(); + } + + public static void test_Bytes_166() throws CharacterCodingException { + decodeReplace( + new byte[] {(byte)166}, + new char[] {292} ); +// ByteBuffer inputBB = ByteBuffer.wrap(new byte[] {(byte)166}); +// CharBuffer outputCB; +// decoder.onMalformedInput(CodingErrorAction.REPLACE); +// System.out.println("test_Bytes_166:"); +// outputCB = decoder.decode(inputBB); +// outputCB.rewind(); +// assertEqualChars("Decoded charactes must match!", +// new char[] {292}, +// outputCB.array()); + } + + public static void test_Bytes_195() throws CharacterCodingException { + decodeReplace( + new byte[] {(byte)195}, + new char[] {65533} ); + } + + public static void test_Bytes_165() throws CharacterCodingException { + decodeReplace( + new byte[] {(byte)165}, + new char[] {65533} ); + } + + public static void test_Bytes_165_any() throws CharacterCodingException { + decodeReplace( + new byte[] {(byte)165, 32}, + new char[] {65533, 32} ); + } +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_4.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_4.java new file mode 100644 index 0000000..96c7700 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_4.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_4.class) + +public class Charset_SingleByte_ISO_8859_4 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-4"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 260, 312, 342, 164, 296, 315, 167, 168, 352, 274, 290, 358, 173, 381, 175, + 176, 261, 731, 343, 180, 297, 316, 711, 184, 353, 275, 291, 359, 330, 382, 331, + 256, 193, 194, 195, 196, 197, 198, 302, 268, 201, 280, 203, 278, 205, 206, 298, + 272, 325, 332, 310, 212, 213, 214, 215, 216, 370, 218, 219, 220, 360, 362, 223, + 257, 225, 226, 227, 228, 229, 230, 303, 269, 233, 281, 235, 279, 237, 238, 299, + 273, 326, 333, 311, 244, 245, 246, 247, 248, 371, 250, 251, 252, 361, 363, 729}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_5.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_5.java new file mode 100644 index 0000000..e189bce --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_5.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_5.class) + +public class Charset_SingleByte_ISO_8859_5 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-5"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 173, 1038, 1039, + 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, + 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, + 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, + 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, + 8470, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 167, 1118, 1119}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_6.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_6.java new file mode 100644 index 0000000..8f6f564 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_6.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_6.class) + +public class Charset_SingleByte_ISO_8859_6 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-6"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 65533, 65533, 65533, 164, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 1548, 173, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 1563, 65533, 65533, 65533, 1567, + 65533, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, + 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 65533, 65533, 65533, 65533, 65533, + 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, + 1616, 1617, 1618, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_7.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_7.java new file mode 100644 index 0000000..a6cd0cb --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_7.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_7.class) + +public class Charset_SingleByte_ISO_8859_7 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-7"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 160, 8216, 8217, 163, 65533, 65533, 166, 167, 168, 169, 65533, 171, 172, 173, 65533, 8213, + 176, 177, 178, 179, 900, 901, 902, 183, 904, 905, 906, 187, 908, 189, 910, 911, + 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, + 928, 929, 65533, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, + 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, + 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 65533}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_8.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_8.java new file mode 100644 index 0000000..cbbf4ba --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_8.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_8.class) + +public class Charset_SingleByte_ISO_8859_8 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-8"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 65533, 162, 163, 164, 165, 166, 167, 168, 169, 215, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 247, 187, 188, 189, 190, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 8215, + 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, + 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 65533, 65533, 8206, 8207, 65533}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_9.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_9.java new file mode 100644 index 0000000..706463f --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_ISO_8859_9.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.ISO_8859_9.class) + +public class Charset_SingleByte_ISO_8859_9 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "ISO-8859-9"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 286, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 304, 350, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 287, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 305, 351, 255}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_KOI8_R.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_KOI8_R.java new file mode 100644 index 0000000..876db78 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_KOI8_R.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.KOI8_R.class) + +public class Charset_SingleByte_KOI8_R extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "KOI8-R"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9600, 9604, 9608, 9612, 9616, + 9617, 9618, 9619, 8992, 9632, 8729, 8730, 8776, 8804, 8805, 160, 8993, 176, 178, 183, 247, + 9552, 9553, 9554, 1105, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, + 9567, 9568, 9569, 1025, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 169, + 1102, 1072, 1073, 1094, 1076, 1077, 1092, 1075, 1093, 1080, 1081, 1082, 1083, 1084, 1085, 1086, + 1087, 1103, 1088, 1089, 1090, 1091, 1078, 1074, 1100, 1099, 1079, 1096, 1101, 1097, 1095, 1098, + 1070, 1040, 1041, 1062, 1044, 1045, 1060, 1043, 1061, 1048, 1049, 1050, 1051, 1052, 1053, 1054, + 1055, 1071, 1056, 1057, 1058, 1059, 1046, 1042, 1068, 1067, 1047, 1064, 1069, 1065, 1063, 1066}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_US_ASCII.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_US_ASCII.java new file mode 100644 index 0000000..428910e --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_US_ASCII.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.US_ASCII.class) + +public class Charset_SingleByte_US_ASCII extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "US-ASCII"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1250.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1250.java new file mode 100644 index 0000000..0d2ad51 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1250.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.windows_1250.class) + +public class Charset_SingleByte_windows_1250 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "windows-1250"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 8364, 65533, 8218, 65533, 8222, 8230, 8224, 8225, 65533, 8240, 352, 8249, 346, 356, 381, 377, + 65533, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 65533, 8482, 353, 8250, 347, 357, 382, 378, + 160, 711, 728, 321, 164, 260, 166, 167, 168, 169, 350, 171, 172, 173, 174, 379, + 176, 177, 731, 322, 180, 181, 182, 183, 184, 261, 351, 187, 317, 733, 318, 380, + 340, 193, 194, 258, 196, 313, 262, 199, 268, 201, 280, 203, 282, 205, 206, 270, + 272, 323, 327, 211, 212, 336, 214, 215, 344, 366, 218, 368, 220, 221, 354, 223, + 341, 225, 226, 259, 228, 314, 263, 231, 269, 233, 281, 235, 283, 237, 238, 271, + 273, 324, 328, 243, 244, 337, 246, 247, 345, 367, 250, 369, 252, 253, 355, 729}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1251.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1251.java new file mode 100644 index 0000000..fbaf6aa --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1251.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.windows_1251.class) + +public class Charset_SingleByte_windows_1251 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "windows-1251"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 1026, 1027, 8218, 1107, 8222, 8230, 8224, 8225, 8364, 8240, 1033, 8249, 1034, 1036, 1035, 1039, + 1106, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 65533, 8482, 1113, 8250, 1114, 1116, 1115, 1119, + 160, 1038, 1118, 1032, 164, 1168, 166, 167, 1025, 169, 1028, 171, 172, 173, 174, 1031, + 176, 177, 1030, 1110, 1169, 181, 182, 183, 1105, 8470, 1108, 187, 1112, 1029, 1109, 1111, + 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, + 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, + 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, + 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1252.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1252.java new file mode 100644 index 0000000..9a57516 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1252.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.windows_1252.class) + +public class Charset_SingleByte_windows_1252 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "windows-1252"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 8364, 65533, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352, 8249, 338, 65533, 381, 65533, + 65533, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, 8482, 353, 8250, 339, 65533, 382, 376, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1253.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1253.java new file mode 100644 index 0000000..e4de9a0 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1253.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.windows_1253.class) + +public class Charset_SingleByte_windows_1253 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "windows-1253"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 8364, 65533, 8218, 402, 8222, 8230, 8224, 8225, 65533, 8240, 65533, 8249, 65533, 65533, 65533, 65533, + 65533, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 65533, 8482, 65533, 8250, 65533, 65533, 65533, 65533, + 160, 901, 902, 163, 164, 165, 166, 167, 168, 169, 65533, 171, 172, 173, 174, 8213, + 176, 177, 178, 179, 900, 181, 182, 183, 904, 905, 906, 187, 908, 189, 910, 911, + 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, + 928, 929, 65533, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, + 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, + 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 65533}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1254.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1254.java new file mode 100644 index 0000000..4a81ae9 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1254.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.windows_1254.class) + +public class Charset_SingleByte_windows_1254 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "windows-1254"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 8364, 65533, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352, 8249, 338, 65533, 65533, 65533, + 65533, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, 8482, 353, 8250, 339, 65533, 65533, 376, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 286, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 304, 350, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 287, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 305, 351, 255}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1255.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1255.java new file mode 100644 index 0000000..7f77f47 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1255.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.windows_1255.class) + +public class Charset_SingleByte_windows_1255 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "windows-1255"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 8364, 65533, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 65533, 8249, 65533, 65533, 65533, 65533, + 65533, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, 8482, 65533, 8250, 65533, 65533, 65533, 65533, + 160, 161, 162, 163, 8362, 165, 166, 167, 168, 169, 215, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 247, 187, 188, 189, 190, 191, + 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 65533, 1467, 1468, 1469, 1470, 1471, + 1472, 1473, 1474, 1475, 1520, 1521, 1522, 1523, 1524, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, + 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 65533, 65533, 8206, 8207, 65533}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1256.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1256.java new file mode 100644 index 0000000..2762016 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1256.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.windows_1256.class) + +public class Charset_SingleByte_windows_1256 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "windows-1256"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 8364, 1662, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 1657, 8249, 338, 1670, 1688, 1672, + 1711, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 1705, 8482, 1681, 8250, 339, 8204, 8205, 1722, + 160, 1548, 162, 163, 164, 165, 166, 167, 168, 169, 1726, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 1563, 187, 188, 189, 190, 1567, + 1729, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, + 1584, 1585, 1586, 1587, 1588, 1589, 1590, 215, 1591, 1592, 1593, 1594, 1600, 1601, 1602, 1603, + 224, 1604, 226, 1605, 1606, 1607, 1608, 231, 232, 233, 234, 235, 1609, 1610, 238, 239, + 1611, 1612, 1613, 1614, 244, 1615, 1616, 247, 1617, 249, 1618, 251, 252, 8206, 8207, 1746}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1257.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1257.java new file mode 100644 index 0000000..4cd64e0 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1257.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.windows_1257.class) + +public class Charset_SingleByte_windows_1257 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "windows-1257"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 8364, 65533, 8218, 65533, 8222, 8230, 8224, 8225, 65533, 8240, 65533, 8249, 65533, 168, 711, 184, + 65533, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 65533, 8482, 65533, 8250, 65533, 175, 731, 65533, + 160, 65533, 162, 163, 164, 65533, 166, 167, 216, 169, 342, 171, 172, 173, 174, 198, + 176, 177, 178, 179, 180, 181, 182, 183, 248, 185, 343, 187, 188, 189, 190, 230, + 260, 302, 256, 262, 196, 197, 280, 274, 268, 201, 377, 278, 290, 310, 298, 315, + 352, 323, 325, 211, 332, 213, 214, 215, 370, 321, 346, 362, 220, 379, 381, 223, + 261, 303, 257, 263, 228, 229, 281, 275, 269, 233, 378, 279, 291, 311, 299, 316, + 353, 324, 326, 243, 333, 245, 246, 247, 371, 322, 347, 363, 252, 380, 382, 729}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1258.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1258.java new file mode 100644 index 0000000..3fa659f --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_windows_1258.java @@ -0,0 +1,58 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.windows_1258.class) + +public class Charset_SingleByte_windows_1258 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { + charsetName = "windows-1258"; + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 8364, 65533, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 65533, 8249, 338, 65533, 65533, 65533, + 65533, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, 8482, 65533, 8250, 339, 65533, 65533, 376, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 258, 196, 197, 198, 199, 200, 201, 202, 203, 768, 205, 206, 207, + 272, 209, 777, 211, 212, 416, 214, 215, 216, 217, 218, 219, 220, 431, 771, 223, + 224, 225, 226, 259, 228, 229, 230, 231, 232, 233, 234, 235, 769, 237, 238, 239, + 273, 241, 803, 243, 244, 417, 246, 247, 248, 249, 250, 251, 252, 432, 8363, 255}); + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_x_IBM874.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_x_IBM874.java new file mode 100644 index 0000000..12ffff2 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByte_x_IBM874.java @@ -0,0 +1,74 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.x_IBM874.class) + +public class Charset_SingleByte_x_IBM874 extends Charset_SingleByteAbstractTest { + + protected void setUp() throws Exception { +// charsetName = "x-IBM874"; // ICU name "TIS-620", wanted Android name "CP874" + charsetName = "TIS-620"; // ICU name "TIS-620", wanted Android name "CP874" + + allChars = theseChars(new int[]{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28/*26*/, 27, 127/*28*/, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 26/*127*/, + 65533/*8364*/, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, 65533, + 3656, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, + 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, + 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 3630, 3631, + 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, 3641, 3642, 3657, 3658, 3659, 3660, 3647, + 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, + 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 162, 172, 166, 160}); + + super.setUp(); + } + + public static void _test_Bytes_DifferentOnes_RI() throws CharacterCodingException { + decodeReplace( + theseBytes(new int[]{26, 28, 127, 128}), + new char[] {26, 28, 127, 8364} ); + } + + public static void test_Bytes_DifferentOnes_Android() throws CharacterCodingException { + // Android: + decodeReplace( + theseBytes(new int[]{26, 28, 127, 128}), + new char[] {28, 127, 26, 65533} ); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_TestGenerator.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_TestGenerator.java new file mode 100644 index 0000000..a3b6fbd --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_TestGenerator.java @@ -0,0 +1,267 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +/** + * Super class for concrete charset test suites. + */ +public class Charset_TestGenerator { + + Charset charset; + CharsetDecoder decoder; + CharsetEncoder encoder; + + + static final int[] codes = { + 9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, + 89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 170, 181, 186, 192, 195, 198, + 201, 204, 207, 210, 213, 216, 219, 222, 225, 228, 231, 234, 237, 240, 243, 246, + 249, 252, 255, 258, 261, 264, 267, 270, 273, 276, 279, 282, 285, 288, 291, 294, + 297, 300, 303, 306, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, + 345, 348, 351, 354, 357, 360, 363, 366, 369, 372, 375, 378, 381, 384, 387, 390, + 393, 396, 399, 402, 405, 408, 411, 414, 417, 420, 423, 426, 429, 432, 435, 438, + 441, 444, 447, 450, 453, 456, 459, 462, 465, 468, 471, 474, 477, 480, 483, 486, + 489, 492, 495, 498, 501, 504, 507, 510, 513, 516, 519, 522, 525, 528, 531, 534, + 537, 540, 543, 546, 549, 552, 555, 558, 561, 564, 592, 595, 598, 601, 604, 607, + 610, 613, 616, 619, 622, 625, 628, 631, 634, 637, 640, 643, 646, 649, 652, 655, + 658, 661, 664, 667, 670, 673, 676, 679, 682, 685, 688, 691, 694, 697, 700, 703, + 710, 713, 716, 719, 736, 739, 750, 890, 902, 905, 908, 911, 914, 917, 920, 923, + 926, 929, 932, 935, 938, 941, 944, 947, 950, 953, 956, 959, 962, 965, 968, 971, + 974, 977, 980, 983, 986, 989, 992, 995, 998, 1001, 1004, 1007, 1010, 1013, 1016, 1019, + 1024, 1027, 1060, 1093, 1126, 1162, 1195, 1228, 1261, 1294, 1329, 1362, 1395, 1488, 1521, 1569, + 1602, 1635, 1668, 1701, 1734, 1774, 1808, 1869, 1920, 1953, 2308, 2341, 2384, 2437, 2470, 2524, + 2565, 2598, 2649, 2693, 2726, 2768, 2821, 2854, 2908, 2947, 2980, 3047, 3080, 3114, 3168, 3205, + 3238, 3294, 3333, 3366, 3424, 3461, 3494, 3585, 3618, 3651, 3713, 3746, 3779, 3840, 3873, 3906, + 3939, 3976, 4096, 4129, 4162, 4256, 4289, 4322, 4355, 4388, 4421, 4454, 4487, 4520, 4553, 4586, + 4619, 4652, 4685, 4718, 4752, 4786, 4819, 4852, 4885, 4918, 4951, 5024, 5057, 5090, 5123, 5156, + 5189, 5222, 5255, 5288, 5321, 5354, 5387, 5420, 5453, 5486, 5519, 5552, 5585, 5618, 5651, 5684, + 5717, 5750, 5783, 5816, 5849, 5888, 5921, 5954, 5987, 6020, 6053, 6103, 6158, 6191, 6224, 6257, + 6290, 6400, 6470, 6503, 7424, 7457, 7490, 7523, 7680, 7713, 7746, 7779, 7812, 7845, 7878, 7911, + 7944, 7977, 8010, 8043, 8076, 8109, 8144, 8178, 8232, 8287, 8450, 8484, 8517, 12288, 12337, 12370, + 12403, 12436, 12469, 12502, 12535, 12568, 12601, 12634, 12667, 12704, 12784, 13312, 13345, 13378, 13411, 13444, + 13477, 13510, 13543, 13576, 13609, 13642, 13675, 13708, 13741, 13774, 13807, 13840, 13873, 13906, 13939, 13972, + 14005, 14038, 14071, 14104, 14137, 14170, 14203, 14236, 14269, 14302, 14335, 14368, 14401, 14434, 14467, 14500, + 14533, 14566, 14599, 14632, 14665, 14698, 14731, 14764, 14797, 14830, 14863, 14896, 14929, 14962, 14995, 15028, + 15061, 15094, 15127, 15160, 15193, 15226, 15259, 15292, 15325, 15358, 15391, 15424, 15457, 15490, 15523, 15556, + 15589, 15622, 15655, 15688, 15721, 15754, 15787, 15820, 15853, 15886, 15919, 15952, 15985, 16018, 16051, 16084, + 16117, 16150, 16183, 16216, 16249, 16282, 16315, 16348, 16381, 16414, 16447, 16480, 16513, 16546, 16579, 16612, + 16645, 16678, 16711, 16744, 16777, 16810, 16843, 16876, 16909, 16942, 16975, 17008, 17041, 17074, 17107, 17140, + 17173, 17206, 17239, 17272, 17305, 17338, 17371, 17404, 17437, 17470, 17503, 17536, 17569, 17602, 17635, 17668, + 17701, 17734, 17767, 17800, 17833, 17866, 17899, 17932, 17965, 17998, 18031, 18064, 18097, 18130, 18163, 18196, + 18229, 18262, 18295, 18328, 18361, 18394, 18427, 18460, 18493, 18526, 18559, 18592, 18625, 18658, 18691, 18724, + 18757, 18790, 18823, 18856, 18889, 18922, 18955, 18988, 19021, 19054, 19087, 19120, 19153, 19186, 19219, 19252, + 19285, 19318, 19351, 19384, 19417, 19450, 19483, 19516, 19549, 19582, 19615, 19648, 19681, 19714, 19747, 19780, + 19813, 19846, 19879, 19968, 20001, 20034, 20067, 20100, 20133, 20166, 20199, 20232, 20265, 20298, 20331, 20364, + 20397, 20430, 20463, 20496, 20529, 20562, 20595, 20628, 20661, 20694, 20727, 20760, 20793, 20826, 20859, 20892, + 20925, 20958, 20991, 21024, 21057, 21090, 21123, 21156, 21189, 21222, 21255, 21288, 21321, 21354, 21387, 21420, + 21453, 21486, 21519, 21552, 21585, 21618, 21651, 21684, 21717, 21750, 21783, 21816, 21849, 21882, 21915, 21948, + 21981, 22014, 22047, 22080, 22113, 22146, 22179, 22212, 22245, 22278, 22311, 22344, 22377, 22410, 22443, 22476, + 22509, 22542, 22575, 22608, 22641, 22674, 22707, 22740, 22773, 22806, 22839, 22872, 22905, 22938, 22971, 23004, + 23037, 23070, 23103, 23136, 23169, 23202, 23235, 23268, 23301, 23334, 23367, 23400, 23433, 23466, 23499, 23532, + 23565, 23598, 23631, 23664, 23697, 23730, 23763, 23796, 23829, 23862, 23895, 23928, 23961, 23994, 24027, 24060, + 24093, 24126, 24159, 24192, 24225, 24258, 24291, 24324, 24357, 24390, 24423, 24456, 24489, 24522, 24555, 24588, + 24621, 24654, 24687, 24720, 24753, 24786, 24819, 24852, 24885, 24918, 24951, 24984, 25017, 25050, 25083, 25116, + 25149, 25182, 25215, 25248, 25281, 25314, 25347, 25380, 25413, 25446, 25479, 25512, 25545, 25578, 25611, 25644, + 25677, 25710, 25743, 25776, 25809, 25842, 25875, 25908, 25941, 25974, 26007, 26040, 26073, 26106, 26139, 26172, + 26205, 26238, 26271, 26304, 26337, 26370, 26403, 26436, 26469, 26502, 26535, 26568, 26601, 26634, 26667, 26700, + 26733, 26766, 26799, 26832, 26865, 26898, 26931, 26964, 26997, 27030, 27063, 27096, 27129, 27162, 27195, 27228, + 27261, 27294, 27327, 27360, 27393, 27426, 27459, 27492, 27525, 27558, 27591, 27624, 27657, 27690, 27723, 27756, + 27789, 27822, 27855, 27888, 27921, 27954, 27987, 28020, 28053, 28086, 28119, 28152, 28185, 28218, 28251, 28284, + 28317, 28350, 28383, 28416, 28449, 28482, 28515, 28548, 28581, 28614, 28647, 28680, 28713, 28746, 28779, 28812, + 28845, 28878, 28911, 28944, 28977, 29010, 29043, 29076, 29109, 29142, 29175, 29208, 29241, 29274, 29307, 29340, + 29373, 29406, 29439, 29472, 29505, 29538, 29571, 29604, 29637, 29670, 29703, 29736, 29769, 29802, 29835, 29868, + 29901, 29934, 29967, 30000, 30033, 30066, 30099, 30132, 30165, 30198, 30231, 30264, 30297, 30330, 30363, 30396, + 30429, 30462, 30495, 30528, 30561, 30594, 30627, 30660, 30693, 30726, 30759, 30792, 30825, 30858, 30891, 30924, + 30957, 30990, 31023, 31056, 31089, 31122, 31155, 31188, 31221, 31254, 31287, 31320, 31353, 31386, 31419, 31452, + 31485, 31518, 31551, 31584, 31617, 31650, 31683, 31716, 31749, 31782, 31815, 31848, 31881, 31914, 31947, 31980, + 32013, 32046, 32079, 32112, 32145, 32178, 32211, 32244, 32277, 32310, 32343, 32376, 32409, 32442, 32475, 32508, + 32541, 32574, 32607, 32640, 32673, 32706, 32739 + }; + static final char[] chars = Charset_AbstractTest.theseChars(codes); + + static abstract class CodesGenerator { + int row = 0, col = 0; + abstract void consume (int code); + + boolean isAccepted (int code) + { + return Character.isLetterOrDigit(code); + } + } + + static class CodesGenerator1 extends CodesGenerator { + @Override + void consume (int code) { + System.out.print(code); + System.out.print(", "); + col++; + if (col == 16) { + System.out.println(); + row++; + col = 0; + } + } + + @Override + boolean isAccepted (int code) + { + return Character.isLetterOrDigit(code) || Character.isWhitespace(code); + } + } + + static class CodesGenerator2 extends CodesGenerator { + @Override + void consume (int code) { +// System.out.print(code); +// System.out.print(", "); + System.out.print((char) code); + col++; + if (col == 80) { + System.out.println(); + row++; + col = 0; + } + } + } + + static class CodesGenerator3 extends CodesGenerator { + char[] buf = new char[8]; + + @Override + void consume (int code) { + buf[col] = (char) code; + System.out.print(code); + System.out.print(", "); + col++; + if (col == 8) { + System.out.print(" // "); + System.out.println(buf); + row++; + col = 0; + } + } + + @Override + boolean isAccepted (int code) + { + return Character.isLetterOrDigit(code); +// || Character.isWhitespace(code); + } + } + + static void genCodes () { + CodesGenerator gen = new CodesGenerator1(); + int code = 0; + while (code < (1 << 10)) { + while (!gen.isAccepted(code)) code ++; + gen.consume(code); + code += 3; + } + while (code < (1 << 15)) { + while (!gen.isAccepted(code)) code ++; + gen.consume(code); + code += 33; + } + } + + + static abstract class Dumper { + int row = 0, col = 0; + abstract void consume (int code); + } + + static class Dumper1 extends Dumper { + int colMax; + + Dumper1 () { + colMax = 16; + } + + Dumper1 (int colums) { + colMax = colums; + } + + @Override + void consume (int code) { + System.out.print(code); + System.out.print(", "); + col++; + if (col == colMax) { + System.out.println(); + row++; + col = 0; + } + } + } + + static void genEncoded (Charset charset, CharBuffer cb) { + System.out.println(charset.name()); + Dumper out = new Dumper1(); + CharsetEncoder encoder = charset.newEncoder(); + encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); + try { + ByteBuffer bb = encoder.encode(cb); +// bb.rewind(); + while (bb.hasRemaining()) { + out.consume(bb.get()); + } + } catch (CharacterCodingException e) { + System.out.println(e); +// e.printStackTrace(); + } + } + + static void genDecoded (Charset charset, ByteBuffer bb) { + CharsetDecoder decoder = charset.newDecoder(); +// System.out.println(code); +// bytes[0] = (byte) code; +// System.out.println(bytes[0]); +// ByteBuffer inputBB = ByteBuffer.wrap(bytes); +// CharBuffer outputCB; +// try { +// outputCB = decoder.decode(inputBB); +// outputCB.rewind(); +// System.out.println(outputCB); +// } catch (CharacterCodingException e) { +// System.out.println(e); +//// e.printStackTrace(); +// } + } + + + public static void main(String[] args) { +// charset = Charset.defaultCharset(); +// decoder = charset.newDecoder(); +// System.out.println(charset.name()); + genEncoded(Charset.forName("MacRoman"), CharBuffer.wrap(chars)); +// genEncoded(Charset.forName(charsetNames[37]), CharBuffer.wrap(chars)); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_TestGenerator_Res.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_TestGenerator_Res.java new file mode 100644 index 0000000..dfdffa6 --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_TestGenerator_Res.java @@ -0,0 +1,2683 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; +import java.util.Arrays; + +/** + * Super class for concrete charset test suites. + */ +public class Charset_TestGenerator_Res { + + Charset charset; + CharsetDecoder decoder; + CharsetEncoder encoder; + + // List of encodings currently required for Android. + static String[] charsetNames = new String[] { + // Encoding required by Java specification. + "US-ASCII", + "UTF-8", + "UTF-16", + "UTF-16BE", + "UTF-16LE", + "ISO-8859-1", + + // Additional encodings included in standard ICU + "ISO-8859-2", + "ISO-8859-3", + "ISO-8859-4", + "ISO-8859-5", + "ISO-8859-6", + "ISO-8859-7", + "ISO-8859-8", +//jdk NoSup "ISO-8859-8-I", + "ISO-8859-9", +//jdk NoSup "ISO-8859-10", + "ISO-8859-11", //jdk x-... + "ISO-8859-13", +//jdk NoSup "ISO-8859-14", + "ISO-8859-15", +//jdk NoSup "ISO-8859-16", + "ISO-2022-JP", + "Windows-950", //jdk x-... + "Windows-1250", //jdk x-... + "Windows-1251", + "Windows-1252", + "Windows-1253", + "Windows-1254", + "Windows-1255", + "Windows-1256", + "Windows-1257", + "Windows-1258", + "Big5", + "CP864", + "CP874", + "EUC-CN", + "EUC-JP", + "KOI8-R", +//jdk NoSup "Macintosh", + "GBK", + "GB2312", + "EUC-KR"}; + + static final short[] codes = { + 9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, + 89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 170, 181, 186, 192, 195, 198, + 201, 204, 207, 210, 213, 216, 219, 222, 225, 228, 231, 234, 237, 240, 243, 246, + 249, 252, 255, 258, 261, 264, 267, 270, 273, 276, 279, 282, 285, 288, 291, 294, + 297, 300, 303, 306, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 342, + 345, 348, 351, 354, 357, 360, 363, 366, 369, 372, 375, 378, 381, 384, 387, 390, + 393, 396, 399, 402, 405, 408, 411, 414, 417, 420, 423, 426, 429, 432, 435, 438, + 441, 444, 447, 450, 453, 456, 459, 462, 465, 468, 471, 474, 477, 480, 483, 486, + 489, 492, 495, 498, 501, 504, 507, 510, 513, 516, 519, 522, 525, 528, 531, 534, + 537, 540, 543, 546, 549, 552, 555, 558, 561, 564, 592, 595, 598, 601, 604, 607, + 610, 613, 616, 619, 622, 625, 628, 631, 634, 637, 640, 643, 646, 649, 652, 655, + 658, 661, 664, 667, 670, 673, 676, 679, 682, 685, 688, 691, 694, 697, 700, 703, + 710, 713, 716, 719, 736, 739, 750, 890, 902, 905, 908, 911, 914, 917, 920, 923, + 926, 929, 932, 935, 938, 941, 944, 947, 950, 953, 956, 959, 962, 965, 968, 971, + 974, 977, 980, 983, 986, 989, 992, 995, 998, 1001, 1004, 1007, 1010, 1013, 1016, 1019, + 1024, 1027, 1060, 1093, 1126, 1162, 1195, 1228, 1261, 1294, 1329, 1362, 1395, 1488, 1521, 1569, + 1602, 1635, 1668, 1701, 1734, 1774, 1808, 1869, 1920, 1953, 2308, 2341, 2384, 2437, 2470, 2524, + 2565, 2598, 2649, 2693, 2726, 2768, 2821, 2854, 2908, 2947, 2980, 3047, 3080, 3114, 3168, 3205, + 3238, 3294, 3333, 3366, 3424, 3461, 3494, 3585, 3618, 3651, 3713, 3746, 3779, 3840, 3873, 3906, + 3939, 3976, 4096, 4129, 4162, 4256, 4289, 4322, 4355, 4388, 4421, 4454, 4487, 4520, 4553, 4586, + 4619, 4652, 4685, 4718, 4752, 4786, 4819, 4852, 4885, 4918, 4951, 5024, 5057, 5090, 5123, 5156, + 5189, 5222, 5255, 5288, 5321, 5354, 5387, 5420, 5453, 5486, 5519, 5552, 5585, 5618, 5651, 5684, + 5717, 5750, 5783, 5816, 5849, 5888, 5921, 5954, 5987, 6020, 6053, 6103, 6158, 6191, 6224, 6257, + 6290, 6400, 6470, 6503, 7424, 7457, 7490, 7523, 7680, 7713, 7746, 7779, 7812, 7845, 7878, 7911, + 7944, 7977, 8010, 8043, 8076, 8109, 8144, 8178, 8232, 8287, 8450, 8484, 8517, 12288, 12337, 12370, + 12403, 12436, 12469, 12502, 12535, 12568, 12601, 12634, 12667, 12704, 12784, 13312, 13345, 13378, 13411, 13444, + 13477, 13510, 13543, 13576, 13609, 13642, 13675, 13708, 13741, 13774, 13807, 13840, 13873, 13906, 13939, 13972, + 14005, 14038, 14071, 14104, 14137, 14170, 14203, 14236, 14269, 14302, 14335, 14368, 14401, 14434, 14467, 14500, + 14533, 14566, 14599, 14632, 14665, 14698, 14731, 14764, 14797, 14830, 14863, 14896, 14929, 14962, 14995, 15028, + 15061, 15094, 15127, 15160, 15193, 15226, 15259, 15292, 15325, 15358, 15391, 15424, 15457, 15490, 15523, 15556, + 15589, 15622, 15655, 15688, 15721, 15754, 15787, 15820, 15853, 15886, 15919, 15952, 15985, 16018, 16051, 16084, + 16117, 16150, 16183, 16216, 16249, 16282, 16315, 16348, 16381, 16414, 16447, 16480, 16513, 16546, 16579, 16612, + 16645, 16678, 16711, 16744, 16777, 16810, 16843, 16876, 16909, 16942, 16975, 17008, 17041, 17074, 17107, 17140, + 17173, 17206, 17239, 17272, 17305, 17338, 17371, 17404, 17437, 17470, 17503, 17536, 17569, 17602, 17635, 17668, + 17701, 17734, 17767, 17800, 17833, 17866, 17899, 17932, 17965, 17998, 18031, 18064, 18097, 18130, 18163, 18196, + 18229, 18262, 18295, 18328, 18361, 18394, 18427, 18460, 18493, 18526, 18559, 18592, 18625, 18658, 18691, 18724, + 18757, 18790, 18823, 18856, 18889, 18922, 18955, 18988, 19021, 19054, 19087, 19120, 19153, 19186, 19219, 19252, + 19285, 19318, 19351, 19384, 19417, 19450, 19483, 19516, 19549, 19582, 19615, 19648, 19681, 19714, 19747, 19780, + 19813, 19846, 19879, 19968, 20001, 20034, 20067, 20100, 20133, 20166, 20199, 20232, 20265, 20298, 20331, 20364, + 20397, 20430, 20463, 20496, 20529, 20562, 20595, 20628, 20661, 20694, 20727, 20760, 20793, 20826, 20859, 20892, + 20925, 20958, 20991, 21024, 21057, 21090, 21123, 21156, 21189, 21222, 21255, 21288, 21321, 21354, 21387, 21420, + 21453, 21486, 21519, 21552, 21585, 21618, 21651, 21684, 21717, 21750, 21783, 21816, 21849, 21882, 21915, 21948, + 21981, 22014, 22047, 22080, 22113, 22146, 22179, 22212, 22245, 22278, 22311, 22344, 22377, 22410, 22443, 22476, + 22509, 22542, 22575, 22608, 22641, 22674, 22707, 22740, 22773, 22806, 22839, 22872, 22905, 22938, 22971, 23004, + 23037, 23070, 23103, 23136, 23169, 23202, 23235, 23268, 23301, 23334, 23367, 23400, 23433, 23466, 23499, 23532, + 23565, 23598, 23631, 23664, 23697, 23730, 23763, 23796, 23829, 23862, 23895, 23928, 23961, 23994, 24027, 24060, + 24093, 24126, 24159, 24192, 24225, 24258, 24291, 24324, 24357, 24390, 24423, 24456, 24489, 24522, 24555, 24588, + 24621, 24654, 24687, 24720, 24753, 24786, 24819, 24852, 24885, 24918, 24951, 24984, 25017, 25050, 25083, 25116, + 25149, 25182, 25215, 25248, 25281, 25314, 25347, 25380, 25413, 25446, 25479, 25512, 25545, 25578, 25611, 25644, + 25677, 25710, 25743, 25776, 25809, 25842, 25875, 25908, 25941, 25974, 26007, 26040, 26073, 26106, 26139, 26172, + 26205, 26238, 26271, 26304, 26337, 26370, 26403, 26436, 26469, 26502, 26535, 26568, 26601, 26634, 26667, 26700, + 26733, 26766, 26799, 26832, 26865, 26898, 26931, 26964, 26997, 27030, 27063, 27096, 27129, 27162, 27195, 27228, + 27261, 27294, 27327, 27360, 27393, 27426, 27459, 27492, 27525, 27558, 27591, 27624, 27657, 27690, 27723, 27756, + 27789, 27822, 27855, 27888, 27921, 27954, 27987, 28020, 28053, 28086, 28119, 28152, 28185, 28218, 28251, 28284, + 28317, 28350, 28383, 28416, 28449, 28482, 28515, 28548, 28581, 28614, 28647, 28680, 28713, 28746, 28779, 28812, + 28845, 28878, 28911, 28944, 28977, 29010, 29043, 29076, 29109, 29142, 29175, 29208, 29241, 29274, 29307, 29340, + 29373, 29406, 29439, 29472, 29505, 29538, 29571, 29604, 29637, 29670, 29703, 29736, 29769, 29802, 29835, 29868, + 29901, 29934, 29967, 30000, 30033, 30066, 30099, 30132, 30165, 30198, 30231, 30264, 30297, 30330, 30363, 30396, + 30429, 30462, 30495, 30528, 30561, 30594, 30627, 30660, 30693, 30726, 30759, 30792, 30825, 30858, 30891, 30924, + 30957, 30990, 31023, 31056, 31089, 31122, 31155, 31188, 31221, 31254, 31287, 31320, 31353, 31386, 31419, 31452, + 31485, 31518, 31551, 31584, 31617, 31650, 31683, 31716, 31749, 31782, 31815, 31848, 31881, 31914, 31947, 31980, + 32013, 32046, 32079, 32112, 32145, 32178, 32211, 32244, 32277, 32310, 32343, 32376, 32409, 32442, 32475, 32508, + 32541, 32574, 32607, 32640, 32673, 32706, 32739 + }; + static final char[] chars = new char[codes.length]; // Is filled with contents of codes. + +// { +// System.out.println("TEST"); +//// System.arraycopy(codes, 0, chars, 0, codes.length); // Na super! Der Compiler nimmt's, aber Runtime gibt's ArrayStoreException. +// for (int i = 0; i < codes.length; i++) chars[i] = (char) codes[i]; +// } + + + +/* +US-ASCII +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, + */ + +/* +UTF-8 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -62, -86, -62, -75, -62, -70, +-61, -128, -61, -125, -61, -122, -61, -119, -61, -116, -61, -113, -61, -110, -61, -107, +-61, -104, -61, -101, -61, -98, -61, -95, -61, -92, -61, -89, -61, -86, -61, -83, +-61, -80, -61, -77, -61, -74, -61, -71, -61, -68, -61, -65, -60, -126, -60, -123, +-60, -120, -60, -117, -60, -114, -60, -111, -60, -108, -60, -105, -60, -102, -60, -99, +-60, -96, -60, -93, -60, -90, -60, -87, -60, -84, -60, -81, -60, -78, -60, -75, +-60, -72, -60, -69, -60, -66, -59, -127, -59, -124, -59, -121, -59, -118, -59, -115, +-59, -112, -59, -109, -59, -106, -59, -103, -59, -100, -59, -97, -59, -94, -59, -91, +-59, -88, -59, -85, -59, -82, -59, -79, -59, -76, -59, -73, -59, -70, -59, -67, +-58, -128, -58, -125, -58, -122, -58, -119, -58, -116, -58, -113, -58, -110, -58, -107, +-58, -104, -58, -101, -58, -98, -58, -95, -58, -92, -58, -89, -58, -86, -58, -83, +-58, -80, -58, -77, -58, -74, -58, -71, -58, -68, -58, -65, -57, -126, -57, -123, +-57, -120, -57, -117, -57, -114, -57, -111, -57, -108, -57, -105, -57, -102, -57, -99, +-57, -96, -57, -93, -57, -90, -57, -87, -57, -84, -57, -81, -57, -78, -57, -75, +-57, -72, -57, -69, -57, -66, -56, -127, -56, -124, -56, -121, -56, -118, -56, -115, +-56, -112, -56, -109, -56, -106, -56, -103, -56, -100, -56, -97, -56, -94, -56, -91, +-56, -88, -56, -85, -56, -82, -56, -79, -56, -76, -55, -112, -55, -109, -55, -106, +-55, -103, -55, -100, -55, -97, -55, -94, -55, -91, -55, -88, -55, -85, -55, -82, +-55, -79, -55, -76, -55, -73, -55, -70, -55, -67, -54, -128, -54, -125, -54, -122, +-54, -119, -54, -116, -54, -113, -54, -110, -54, -107, -54, -104, -54, -101, -54, -98, +-54, -95, -54, -92, -54, -89, -54, -86, -54, -83, -54, -80, -54, -77, -54, -74, +-54, -71, -54, -68, -54, -65, -53, -122, -53, -119, -53, -116, -53, -113, -53, -96, +-53, -93, -53, -82, -51, -70, -50, -122, -50, -119, -50, -116, -50, -113, -50, -110, +-50, -107, -50, -104, -50, -101, -50, -98, -50, -95, -50, -92, -50, -89, -50, -86, +-50, -83, -50, -80, -50, -77, -50, -74, -50, -71, -50, -68, -50, -65, -49, -126, +-49, -123, -49, -120, -49, -117, -49, -114, -49, -111, -49, -108, -49, -105, -49, -102, +-49, -99, -49, -96, -49, -93, -49, -90, -49, -87, -49, -84, -49, -81, -49, -78, +-49, -75, -49, -72, -49, -69, -48, -128, -48, -125, -48, -92, -47, -123, -47, -90, +-46, -118, -46, -85, -45, -116, -45, -83, -44, -114, -44, -79, -43, -110, -43, -77, +-41, -112, -41, -79, -40, -95, -39, -126, -39, -93, -38, -124, -38, -91, -37, -122, +-37, -82, -36, -112, -35, -115, -34, -128, -34, -95, -32, -92, -124, -32, -92, -91, +-32, -91, -112, -32, -90, -123, -32, -90, -90, -32, -89, -100, -32, -88, -123, -32, +-88, -90, -32, -87, -103, -32, -86, -123, -32, -86, -90, -32, -85, -112, -32, -84, +-123, -32, -84, -90, -32, -83, -100, -32, -82, -125, -32, -82, -92, -32, -81, -89, +-32, -80, -120, -32, -80, -86, -32, -79, -96, -32, -78, -123, -32, -78, -90, -32, +-77, -98, -32, -76, -123, -32, -76, -90, -32, -75, -96, -32, -74, -123, -32, -74, +-90, -32, -72, -127, -32, -72, -94, -32, -71, -125, -32, -70, -127, -32, -70, -94, +-32, -69, -125, -32, -68, -128, -32, -68, -95, -32, -67, -126, -32, -67, -93, -32, +-66, -120, -31, -128, -128, -31, -128, -95, -31, -127, -126, -31, -126, -96, -31, -125, +-127, -31, -125, -94, -31, -124, -125, -31, -124, -92, -31, -123, -123, -31, -123, -90, +-31, -122, -121, -31, -122, -88, -31, -121, -119, -31, -121, -86, -31, -120, -117, -31, +-120, -84, -31, -119, -115, -31, -119, -82, -31, -118, -112, -31, -118, -78, -31, -117, +-109, -31, -117, -76, -31, -116, -107, -31, -116, -74, -31, -115, -105, -31, -114, -96, +-31, -113, -127, -31, -113, -94, -31, -112, -125, -31, -112, -92, -31, -111, -123, -31, +-111, -90, -31, -110, -121, -31, -110, -88, -31, -109, -119, -31, -109, -86, -31, -108, +-117, -31, -108, -84, -31, -107, -115, -31, -107, -82, -31, -106, -113, -31, -106, -80, +-31, -105, -111, -31, -105, -78, -31, -104, -109, -31, -104, -76, -31, -103, -107, -31, +-103, -74, -31, -102, -105, -31, -102, -72, -31, -101, -103, -31, -100, -128, -31, -100, +-95, -31, -99, -126, -31, -99, -93, -31, -98, -124, -31, -98, -91, -31, -97, -105, +-31, -96, -114, -31, -96, -81, -31, -95, -112, -31, -95, -79, -31, -94, -110, -31, +-92, -128, -31, -91, -122, -31, -91, -89, -31, -76, -128, -31, -76, -95, -31, -75, +-126, -31, -75, -93, -31, -72, -128, -31, -72, -95, -31, -71, -126, -31, -71, -93, +-31, -70, -124, -31, -70, -91, -31, -69, -122, -31, -69, -89, -31, -68, -120, -31, +-68, -87, -31, -67, -118, -31, -67, -85, -31, -66, -116, -31, -66, -83, -31, -65, +-112, -31, -65, -78, -30, -128, -88, -30, -127, -97, -30, -124, -126, -30, -124, -92, +-30, -123, -123, -29, -128, -128, -29, -128, -79, -29, -127, -110, -29, -127, -77, -29, +-126, -108, -29, -126, -75, -29, -125, -106, -29, -125, -73, -29, -124, -104, -29, -124, +-71, -29, -123, -102, -29, -123, -69, -29, -122, -96, -29, -121, -80, -29, -112, -128, +-29, -112, -95, -29, -111, -126, -29, -111, -93, -29, -110, -124, -29, -110, -91, -29, +-109, -122, -29, -109, -89, -29, -108, -120, -29, -108, -87, -29, -107, -118, -29, -107, +-85, -29, -106, -116, -29, -106, -83, -29, -105, -114, -29, -105, -81, -29, -104, -112, +-29, -104, -79, -29, -103, -110, -29, -103, -77, -29, -102, -108, -29, -102, -75, -29, +-101, -106, -29, -101, -73, -29, -100, -104, -29, -100, -71, -29, -99, -102, -29, -99, +-69, -29, -98, -100, -29, -98, -67, -29, -97, -98, -29, -97, -65, -29, -96, -96, +-29, -95, -127, -29, -95, -94, -29, -94, -125, -29, -94, -92, -29, -93, -123, -29, +-93, -90, -29, -92, -121, -29, -92, -88, -29, -91, -119, -29, -91, -86, -29, -90, +-117, -29, -90, -84, -29, -89, -115, -29, -89, -82, -29, -88, -113, -29, -88, -80, +-29, -87, -111, -29, -87, -78, -29, -86, -109, -29, -86, -76, -29, -85, -107, -29, +-85, -74, -29, -84, -105, -29, -84, -72, -29, -83, -103, -29, -83, -70, -29, -82, +-101, -29, -82, -68, -29, -81, -99, -29, -81, -66, -29, -80, -97, -29, -79, -128, +-29, -79, -95, -29, -78, -126, -29, -78, -93, -29, -77, -124, -29, -77, -91, -29, +-76, -122, -29, -76, -89, -29, -75, -120, -29, -75, -87, -29, -74, -118, -29, -74, +-85, -29, -73, -116, -29, -73, -83, -29, -72, -114, -29, -72, -81, -29, -71, -112, +-29, -71, -79, -29, -70, -110, -29, -70, -77, -29, -69, -108, -29, -69, -75, -29, +-68, -106, -29, -68, -73, -29, -67, -104, -29, -67, -71, -29, -66, -102, -29, -66, +-69, -29, -65, -100, -29, -65, -67, -28, -128, -98, -28, -128, -65, -28, -127, -96, +-28, -126, -127, -28, -126, -94, -28, -125, -125, -28, -125, -92, -28, -124, -123, -28, +-124, -90, -28, -123, -121, -28, -123, -88, -28, -122, -119, -28, -122, -86, -28, -121, +-117, -28, -121, -84, -28, -120, -115, -28, -120, -82, -28, -119, -113, -28, -119, -80, +-28, -118, -111, -28, -118, -78, -28, -117, -109, -28, -117, -76, -28, -116, -107, -28, +-116, -74, -28, -115, -105, -28, -115, -72, -28, -114, -103, -28, -114, -70, -28, -113, +-101, -28, -113, -68, -28, -112, -99, -28, -112, -66, -28, -111, -97, -28, -110, -128, +-28, -110, -95, -28, -109, -126, -28, -109, -93, -28, -108, -124, -28, -108, -91, -28, +-107, -122, -28, -107, -89, -28, -106, -120, -28, -106, -87, -28, -105, -118, -28, -105, +-85, -28, -104, -116, -28, -104, -83, -28, -103, -114, -28, -103, -81, -28, -102, -112, +-28, -102, -79, -28, -101, -110, -28, -101, -77, -28, -100, -108, -28, -100, -75, -28, +-99, -106, -28, -99, -73, -28, -98, -104, -28, -98, -71, -28, -97, -102, -28, -97, +-69, -28, -96, -100, -28, -96, -67, -28, -95, -98, -28, -95, -65, -28, -94, -96, +-28, -93, -127, -28, -93, -94, -28, -92, -125, -28, -92, -92, -28, -91, -123, -28, +-91, -90, -28, -90, -121, -28, -90, -88, -28, -89, -119, -28, -89, -86, -28, -88, +-117, -28, -88, -84, -28, -87, -115, -28, -87, -82, -28, -86, -113, -28, -86, -80, +-28, -85, -111, -28, -85, -78, -28, -84, -109, -28, -84, -76, -28, -83, -107, -28, +-83, -74, -28, -82, -105, -28, -82, -72, -28, -81, -103, -28, -81, -70, -28, -80, +-101, -28, -80, -68, -28, -79, -99, -28, -79, -66, -28, -78, -97, -28, -77, -128, +-28, -77, -95, -28, -76, -126, -28, -76, -93, -28, -75, -124, -28, -75, -91, -28, +-74, -122, -28, -74, -89, -28, -72, -128, -28, -72, -95, -28, -71, -126, -28, -71, +-93, -28, -70, -124, -28, -70, -91, -28, -69, -122, -28, -69, -89, -28, -68, -120, +-28, -68, -87, -28, -67, -118, -28, -67, -85, -28, -66, -116, -28, -66, -83, -28, +-65, -114, -28, -65, -81, -27, -128, -112, -27, -128, -79, -27, -127, -110, -27, -127, +-77, -27, -126, -108, -27, -126, -75, -27, -125, -106, -27, -125, -73, -27, -124, -104, +-27, -124, -71, -27, -123, -102, -27, -123, -69, -27, -122, -100, -27, -122, -67, -27, +-121, -98, -27, -121, -65, -27, -120, -96, -27, -119, -127, -27, -119, -94, -27, -118, +-125, -27, -118, -92, -27, -117, -123, -27, -117, -90, -27, -116, -121, -27, -116, -88, +-27, -115, -119, -27, -115, -86, -27, -114, -117, -27, -114, -84, -27, -113, -115, -27, +-113, -82, -27, -112, -113, -27, -112, -80, -27, -111, -111, -27, -111, -78, -27, -110, +-109, -27, -110, -76, -27, -109, -107, -27, -109, -74, -27, -108, -105, -27, -108, -72, +-27, -107, -103, -27, -107, -70, -27, -106, -101, -27, -106, -68, -27, -105, -99, -27, +-105, -66, -27, -104, -97, -27, -103, -128, -27, -103, -95, -27, -102, -126, -27, -102, +-93, -27, -101, -124, -27, -101, -91, -27, -100, -122, -27, -100, -89, -27, -99, -120, +-27, -99, -87, -27, -98, -118, -27, -98, -85, -27, -97, -116, -27, -97, -83, -27, +-96, -114, -27, -96, -81, -27, -95, -112, -27, -95, -79, -27, -94, -110, -27, -94, +-77, -27, -93, -108, -27, -93, -75, -27, -92, -106, -27, -92, -73, -27, -91, -104, +-27, -91, -71, -27, -90, -102, -27, -90, -69, -27, -89, -100, -27, -89, -67, -27, +-88, -98, -27, -88, -65, -27, -87, -96, -27, -86, -127, -27, -86, -94, -27, -85, +-125, -27, -85, -92, -27, -84, -123, -27, -84, -90, -27, -83, -121, -27, -83, -88, +-27, -82, -119, -27, -82, -86, -27, -81, -117, -27, -81, -84, -27, -80, -115, -27, +-80, -82, -27, -79, -113, -27, -79, -80, -27, -78, -111, -27, -78, -78, -27, -77, +-109, -27, -77, -76, -27, -76, -107, -27, -76, -74, -27, -75, -105, -27, -75, -72, +-27, -74, -103, -27, -74, -70, -27, -73, -101, -27, -73, -68, -27, -72, -99, -27, +-72, -66, -27, -71, -97, -27, -70, -128, -27, -70, -95, -27, -69, -126, -27, -69, +-93, -27, -68, -124, -27, -68, -91, -27, -67, -122, -27, -67, -89, -27, -66, -120, +-27, -66, -87, -27, -65, -118, -27, -65, -85, -26, -128, -116, -26, -128, -83, -26, +-127, -114, -26, -127, -81, -26, -126, -112, -26, -126, -79, -26, -125, -110, -26, -125, +-77, -26, -124, -108, -26, -124, -75, -26, -123, -106, -26, -123, -73, -26, -122, -104, +-26, -122, -71, -26, -121, -102, -26, -121, -69, -26, -120, -100, -26, -120, -67, -26, +-119, -98, -26, -119, -65, -26, -118, -96, -26, -117, -127, -26, -117, -94, -26, -116, +-125, -26, -116, -92, -26, -115, -123, -26, -115, -90, -26, -114, -121, -26, -114, -88, +-26, -113, -119, -26, -113, -86, -26, -112, -117, -26, -112, -84, -26, -111, -115, -26, +-111, -82, -26, -110, -113, -26, -110, -80, -26, -109, -111, -26, -109, -78, -26, -108, +-109, -26, -108, -76, -26, -107, -107, -26, -107, -74, -26, -106, -105, -26, -106, -72, +-26, -105, -103, -26, -105, -70, -26, -104, -101, -26, -104, -68, -26, -103, -99, -26, +-103, -66, -26, -102, -97, -26, -101, -128, -26, -101, -95, -26, -100, -126, -26, -100, +-93, -26, -99, -124, -26, -99, -91, -26, -98, -122, -26, -98, -89, -26, -97, -120, +-26, -97, -87, -26, -96, -118, -26, -96, -85, -26, -95, -116, -26, -95, -83, -26, +-94, -114, -26, -94, -81, -26, -93, -112, -26, -93, -79, -26, -92, -110, -26, -92, +-77, -26, -91, -108, -26, -91, -75, -26, -90, -106, -26, -90, -73, -26, -89, -104, +-26, -89, -71, -26, -88, -102, -26, -88, -69, -26, -87, -100, -26, -87, -67, -26, +-86, -98, -26, -86, -65, -26, -85, -96, -26, -84, -127, -26, -84, -94, -26, -83, +-125, -26, -83, -92, -26, -82, -123, -26, -82, -90, -26, -81, -121, -26, -81, -88, +-26, -80, -119, -26, -80, -86, -26, -79, -117, -26, -79, -84, -26, -78, -115, -26, +-78, -82, -26, -77, -113, -26, -77, -80, -26, -76, -111, -26, -76, -78, -26, -75, +-109, -26, -75, -76, -26, -74, -107, -26, -74, -74, -26, -73, -105, -26, -73, -72, +-26, -72, -103, -26, -72, -70, -26, -71, -101, -26, -71, -68, -26, -70, -99, -26, +-70, -66, -26, -69, -97, -26, -68, -128, -26, -68, -95, -26, -67, -126, -26, -67, +-93, -26, -66, -124, -26, -66, -91, -26, -65, -122, -26, -65, -89, -25, -128, -120, +-25, -128, -87, -25, -127, -118, -25, -127, -85, -25, -126, -116, -25, -126, -83, -25, +-125, -114, -25, -125, -81, -25, -124, -112, -25, -124, -79, -25, -123, -110, -25, -123, +-77, -25, -122, -108, -25, -122, -75, -25, -121, -106, -25, -121, -73, -25, -120, -104, +-25, -120, -71, -25, -119, -102, -25, -119, -69, -25, -118, -100, -25, -118, -67, -25, +-117, -98, -25, -117, -65, -25, -116, -96, -25, -115, -127, -25, -115, -94, -25, -114, +-125, -25, -114, -92, -25, -113, -123, -25, -113, -90, -25, -112, -121, -25, -112, -88, +-25, -111, -119, -25, -111, -86, -25, -110, -117, -25, -110, -84, -25, -109, -115, -25, +-109, -82, -25, -108, -113, -25, -108, -80, -25, -107, -111, -25, -107, -78, -25, -106, +-109, -25, -106, -76, -25, -105, -107, -25, -105, -74, -25, -104, -105, -25, -104, -72, +-25, -103, -103, -25, -103, -70, -25, -102, -101, -25, -102, -68, -25, -101, -99, -25, +-101, -66, -25, -100, -97, -25, -99, -128, -25, -99, -95, -25, -98, -126, -25, -98, +-93, -25, -97, -124, -25, -97, -91, -25, -96, -122, -25, -96, -89, -25, -95, -120, +-25, -95, -87, -25, -94, -118, -25, -94, -85, -25, -93, -116, -25, -93, -83, -25, +-92, -114, -25, -92, -81, -25, -91, -112, -25, -91, -79, -25, -90, -110, -25, -90, +-77, -25, -89, -108, -25, -89, -75, -25, -88, -106, -25, -88, -73, -25, -87, -104, +-25, -87, -71, -25, -86, -102, -25, -86, -69, -25, -85, -100, -25, -85, -67, -25, +-84, -98, -25, -84, -65, -25, -83, -96, -25, -82, -127, -25, -82, -94, -25, -81, +-125, -25, -81, -92, -25, -80, -123, -25, -80, -90, -25, -79, -121, -25, -79, -88, +-25, -78, -119, -25, -78, -86, -25, -77, -117, -25, -77, -84, -25, -76, -115, -25, +-76, -82, -25, -75, -113, -25, -75, -80, -25, -74, -111, -25, -74, -78, -25, -73, +-109, -25, -73, -76, -25, -72, -107, -25, -72, -74, -25, -71, -105, -25, -71, -72, +-25, -70, -103, -25, -70, -70, -25, -69, -101, -25, -69, -68, -25, -68, -99, -25, +-68, -66, -25, -67, -97, -25, -66, -128, -25, -66, -95, -25, -65, -126, -25, -65, +-93, + */ + +/* +UTF-16 +-2, -1, 0, 9, 0, 12, 0, 28, 0, 31, 0, 48, 0, 51, 0, 54, +0, 57, 0, 65, 0, 68, 0, 71, 0, 74, 0, 77, 0, 80, 0, 83, +0, 86, 0, 89, 0, 97, 0, 100, 0, 103, 0, 106, 0, 109, 0, 112, +0, 115, 0, 118, 0, 121, 0, -86, 0, -75, 0, -70, 0, -64, 0, -61, +0, -58, 0, -55, 0, -52, 0, -49, 0, -46, 0, -43, 0, -40, 0, -37, +0, -34, 0, -31, 0, -28, 0, -25, 0, -22, 0, -19, 0, -16, 0, -13, +0, -10, 0, -7, 0, -4, 0, -1, 1, 2, 1, 5, 1, 8, 1, 11, +1, 14, 1, 17, 1, 20, 1, 23, 1, 26, 1, 29, 1, 32, 1, 35, +1, 38, 1, 41, 1, 44, 1, 47, 1, 50, 1, 53, 1, 56, 1, 59, +1, 62, 1, 65, 1, 68, 1, 71, 1, 74, 1, 77, 1, 80, 1, 83, +1, 86, 1, 89, 1, 92, 1, 95, 1, 98, 1, 101, 1, 104, 1, 107, +1, 110, 1, 113, 1, 116, 1, 119, 1, 122, 1, 125, 1, -128, 1, -125, +1, -122, 1, -119, 1, -116, 1, -113, 1, -110, 1, -107, 1, -104, 1, -101, +1, -98, 1, -95, 1, -92, 1, -89, 1, -86, 1, -83, 1, -80, 1, -77, +1, -74, 1, -71, 1, -68, 1, -65, 1, -62, 1, -59, 1, -56, 1, -53, +1, -50, 1, -47, 1, -44, 1, -41, 1, -38, 1, -35, 1, -32, 1, -29, +1, -26, 1, -23, 1, -20, 1, -17, 1, -14, 1, -11, 1, -8, 1, -5, +1, -2, 2, 1, 2, 4, 2, 7, 2, 10, 2, 13, 2, 16, 2, 19, +2, 22, 2, 25, 2, 28, 2, 31, 2, 34, 2, 37, 2, 40, 2, 43, +2, 46, 2, 49, 2, 52, 2, 80, 2, 83, 2, 86, 2, 89, 2, 92, +2, 95, 2, 98, 2, 101, 2, 104, 2, 107, 2, 110, 2, 113, 2, 116, +2, 119, 2, 122, 2, 125, 2, -128, 2, -125, 2, -122, 2, -119, 2, -116, +2, -113, 2, -110, 2, -107, 2, -104, 2, -101, 2, -98, 2, -95, 2, -92, +2, -89, 2, -86, 2, -83, 2, -80, 2, -77, 2, -74, 2, -71, 2, -68, +2, -65, 2, -58, 2, -55, 2, -52, 2, -49, 2, -32, 2, -29, 2, -18, +3, 122, 3, -122, 3, -119, 3, -116, 3, -113, 3, -110, 3, -107, 3, -104, +3, -101, 3, -98, 3, -95, 3, -92, 3, -89, 3, -86, 3, -83, 3, -80, +3, -77, 3, -74, 3, -71, 3, -68, 3, -65, 3, -62, 3, -59, 3, -56, +3, -53, 3, -50, 3, -47, 3, -44, 3, -41, 3, -38, 3, -35, 3, -32, +3, -29, 3, -26, 3, -23, 3, -20, 3, -17, 3, -14, 3, -11, 3, -8, +3, -5, 4, 0, 4, 3, 4, 36, 4, 69, 4, 102, 4, -118, 4, -85, +4, -52, 4, -19, 5, 14, 5, 49, 5, 82, 5, 115, 5, -48, 5, -15, +6, 33, 6, 66, 6, 99, 6, -124, 6, -91, 6, -58, 6, -18, 7, 16, +7, 77, 7, -128, 7, -95, 9, 4, 9, 37, 9, 80, 9, -123, 9, -90, +9, -36, 10, 5, 10, 38, 10, 89, 10, -123, 10, -90, 10, -48, 11, 5, +11, 38, 11, 92, 11, -125, 11, -92, 11, -25, 12, 8, 12, 42, 12, 96, +12, -123, 12, -90, 12, -34, 13, 5, 13, 38, 13, 96, 13, -123, 13, -90, +14, 1, 14, 34, 14, 67, 14, -127, 14, -94, 14, -61, 15, 0, 15, 33, +15, 66, 15, 99, 15, -120, 16, 0, 16, 33, 16, 66, 16, -96, 16, -63, +16, -30, 17, 3, 17, 36, 17, 69, 17, 102, 17, -121, 17, -88, 17, -55, +17, -22, 18, 11, 18, 44, 18, 77, 18, 110, 18, -112, 18, -78, 18, -45, +18, -12, 19, 21, 19, 54, 19, 87, 19, -96, 19, -63, 19, -30, 20, 3, +20, 36, 20, 69, 20, 102, 20, -121, 20, -88, 20, -55, 20, -22, 21, 11, +21, 44, 21, 77, 21, 110, 21, -113, 21, -80, 21, -47, 21, -14, 22, 19, +22, 52, 22, 85, 22, 118, 22, -105, 22, -72, 22, -39, 23, 0, 23, 33, +23, 66, 23, 99, 23, -124, 23, -91, 23, -41, 24, 14, 24, 47, 24, 80, +24, 113, 24, -110, 25, 0, 25, 70, 25, 103, 29, 0, 29, 33, 29, 66, +29, 99, 30, 0, 30, 33, 30, 66, 30, 99, 30, -124, 30, -91, 30, -58, +30, -25, 31, 8, 31, 41, 31, 74, 31, 107, 31, -116, 31, -83, 31, -48, +31, -14, 32, 40, 32, 95, 33, 2, 33, 36, 33, 69, 48, 0, 48, 49, +48, 82, 48, 115, 48, -108, 48, -75, 48, -42, 48, -9, 49, 24, 49, 57, +49, 90, 49, 123, 49, -96, 49, -16, 52, 0, 52, 33, 52, 66, 52, 99, +52, -124, 52, -91, 52, -58, 52, -25, 53, 8, 53, 41, 53, 74, 53, 107, +53, -116, 53, -83, 53, -50, 53, -17, 54, 16, 54, 49, 54, 82, 54, 115, +54, -108, 54, -75, 54, -42, 54, -9, 55, 24, 55, 57, 55, 90, 55, 123, +55, -100, 55, -67, 55, -34, 55, -1, 56, 32, 56, 65, 56, 98, 56, -125, +56, -92, 56, -59, 56, -26, 57, 7, 57, 40, 57, 73, 57, 106, 57, -117, +57, -84, 57, -51, 57, -18, 58, 15, 58, 48, 58, 81, 58, 114, 58, -109, +58, -76, 58, -43, 58, -10, 59, 23, 59, 56, 59, 89, 59, 122, 59, -101, +59, -68, 59, -35, 59, -2, 60, 31, 60, 64, 60, 97, 60, -126, 60, -93, +60, -60, 60, -27, 61, 6, 61, 39, 61, 72, 61, 105, 61, -118, 61, -85, +61, -52, 61, -19, 62, 14, 62, 47, 62, 80, 62, 113, 62, -110, 62, -77, +62, -44, 62, -11, 63, 22, 63, 55, 63, 88, 63, 121, 63, -102, 63, -69, +63, -36, 63, -3, 64, 30, 64, 63, 64, 96, 64, -127, 64, -94, 64, -61, +64, -28, 65, 5, 65, 38, 65, 71, 65, 104, 65, -119, 65, -86, 65, -53, +65, -20, 66, 13, 66, 46, 66, 79, 66, 112, 66, -111, 66, -78, 66, -45, +66, -12, 67, 21, 67, 54, 67, 87, 67, 120, 67, -103, 67, -70, 67, -37, +67, -4, 68, 29, 68, 62, 68, 95, 68, -128, 68, -95, 68, -62, 68, -29, +69, 4, 69, 37, 69, 70, 69, 103, 69, -120, 69, -87, 69, -54, 69, -21, +70, 12, 70, 45, 70, 78, 70, 111, 70, -112, 70, -79, 70, -46, 70, -13, +71, 20, 71, 53, 71, 86, 71, 119, 71, -104, 71, -71, 71, -38, 71, -5, +72, 28, 72, 61, 72, 94, 72, 127, 72, -96, 72, -63, 72, -30, 73, 3, +73, 36, 73, 69, 73, 102, 73, -121, 73, -88, 73, -55, 73, -22, 74, 11, +74, 44, 74, 77, 74, 110, 74, -113, 74, -80, 74, -47, 74, -14, 75, 19, +75, 52, 75, 85, 75, 118, 75, -105, 75, -72, 75, -39, 75, -6, 76, 27, +76, 60, 76, 93, 76, 126, 76, -97, 76, -64, 76, -31, 77, 2, 77, 35, +77, 68, 77, 101, 77, -122, 77, -89, 78, 0, 78, 33, 78, 66, 78, 99, +78, -124, 78, -91, 78, -58, 78, -25, 79, 8, 79, 41, 79, 74, 79, 107, +79, -116, 79, -83, 79, -50, 79, -17, 80, 16, 80, 49, 80, 82, 80, 115, +80, -108, 80, -75, 80, -42, 80, -9, 81, 24, 81, 57, 81, 90, 81, 123, +81, -100, 81, -67, 81, -34, 81, -1, 82, 32, 82, 65, 82, 98, 82, -125, +82, -92, 82, -59, 82, -26, 83, 7, 83, 40, 83, 73, 83, 106, 83, -117, +83, -84, 83, -51, 83, -18, 84, 15, 84, 48, 84, 81, 84, 114, 84, -109, +84, -76, 84, -43, 84, -10, 85, 23, 85, 56, 85, 89, 85, 122, 85, -101, +85, -68, 85, -35, 85, -2, 86, 31, 86, 64, 86, 97, 86, -126, 86, -93, +86, -60, 86, -27, 87, 6, 87, 39, 87, 72, 87, 105, 87, -118, 87, -85, +87, -52, 87, -19, 88, 14, 88, 47, 88, 80, 88, 113, 88, -110, 88, -77, +88, -44, 88, -11, 89, 22, 89, 55, 89, 88, 89, 121, 89, -102, 89, -69, +89, -36, 89, -3, 90, 30, 90, 63, 90, 96, 90, -127, 90, -94, 90, -61, +90, -28, 91, 5, 91, 38, 91, 71, 91, 104, 91, -119, 91, -86, 91, -53, +91, -20, 92, 13, 92, 46, 92, 79, 92, 112, 92, -111, 92, -78, 92, -45, +92, -12, 93, 21, 93, 54, 93, 87, 93, 120, 93, -103, 93, -70, 93, -37, +93, -4, 94, 29, 94, 62, 94, 95, 94, -128, 94, -95, 94, -62, 94, -29, +95, 4, 95, 37, 95, 70, 95, 103, 95, -120, 95, -87, 95, -54, 95, -21, +96, 12, 96, 45, 96, 78, 96, 111, 96, -112, 96, -79, 96, -46, 96, -13, +97, 20, 97, 53, 97, 86, 97, 119, 97, -104, 97, -71, 97, -38, 97, -5, +98, 28, 98, 61, 98, 94, 98, 127, 98, -96, 98, -63, 98, -30, 99, 3, +99, 36, 99, 69, 99, 102, 99, -121, 99, -88, 99, -55, 99, -22, 100, 11, +100, 44, 100, 77, 100, 110, 100, -113, 100, -80, 100, -47, 100, -14, 101, 19, +101, 52, 101, 85, 101, 118, 101, -105, 101, -72, 101, -39, 101, -6, 102, 27, +102, 60, 102, 93, 102, 126, 102, -97, 102, -64, 102, -31, 103, 2, 103, 35, +103, 68, 103, 101, 103, -122, 103, -89, 103, -56, 103, -23, 104, 10, 104, 43, +104, 76, 104, 109, 104, -114, 104, -81, 104, -48, 104, -15, 105, 18, 105, 51, +105, 84, 105, 117, 105, -106, 105, -73, 105, -40, 105, -7, 106, 26, 106, 59, +106, 92, 106, 125, 106, -98, 106, -65, 106, -32, 107, 1, 107, 34, 107, 67, +107, 100, 107, -123, 107, -90, 107, -57, 107, -24, 108, 9, 108, 42, 108, 75, +108, 108, 108, -115, 108, -82, 108, -49, 108, -16, 109, 17, 109, 50, 109, 83, +109, 116, 109, -107, 109, -74, 109, -41, 109, -8, 110, 25, 110, 58, 110, 91, +110, 124, 110, -99, 110, -66, 110, -33, 111, 0, 111, 33, 111, 66, 111, 99, +111, -124, 111, -91, 111, -58, 111, -25, 112, 8, 112, 41, 112, 74, 112, 107, +112, -116, 112, -83, 112, -50, 112, -17, 113, 16, 113, 49, 113, 82, 113, 115, +113, -108, 113, -75, 113, -42, 113, -9, 114, 24, 114, 57, 114, 90, 114, 123, +114, -100, 114, -67, 114, -34, 114, -1, 115, 32, 115, 65, 115, 98, 115, -125, +115, -92, 115, -59, 115, -26, 116, 7, 116, 40, 116, 73, 116, 106, 116, -117, +116, -84, 116, -51, 116, -18, 117, 15, 117, 48, 117, 81, 117, 114, 117, -109, +117, -76, 117, -43, 117, -10, 118, 23, 118, 56, 118, 89, 118, 122, 118, -101, +118, -68, 118, -35, 118, -2, 119, 31, 119, 64, 119, 97, 119, -126, 119, -93, +119, -60, 119, -27, 120, 6, 120, 39, 120, 72, 120, 105, 120, -118, 120, -85, +120, -52, 120, -19, 121, 14, 121, 47, 121, 80, 121, 113, 121, -110, 121, -77, +121, -44, 121, -11, 122, 22, 122, 55, 122, 88, 122, 121, 122, -102, 122, -69, +122, -36, 122, -3, 123, 30, 123, 63, 123, 96, 123, -127, 123, -94, 123, -61, +123, -28, 124, 5, 124, 38, 124, 71, 124, 104, 124, -119, 124, -86, 124, -53, +124, -20, 125, 13, 125, 46, 125, 79, 125, 112, 125, -111, 125, -78, 125, -45, +125, -12, 126, 21, 126, 54, 126, 87, 126, 120, 126, -103, 126, -70, 126, -37, +126, -4, 127, 29, 127, 62, 127, 95, 127, -128, 127, -95, 127, -62, 127, -29, + */ + +/* +UTF-16BE +0, 9, 0, 12, 0, 28, 0, 31, 0, 48, 0, 51, 0, 54, 0, 57, +0, 65, 0, 68, 0, 71, 0, 74, 0, 77, 0, 80, 0, 83, 0, 86, +0, 89, 0, 97, 0, 100, 0, 103, 0, 106, 0, 109, 0, 112, 0, 115, +0, 118, 0, 121, 0, -86, 0, -75, 0, -70, 0, -64, 0, -61, 0, -58, +0, -55, 0, -52, 0, -49, 0, -46, 0, -43, 0, -40, 0, -37, 0, -34, +0, -31, 0, -28, 0, -25, 0, -22, 0, -19, 0, -16, 0, -13, 0, -10, +0, -7, 0, -4, 0, -1, 1, 2, 1, 5, 1, 8, 1, 11, 1, 14, +1, 17, 1, 20, 1, 23, 1, 26, 1, 29, 1, 32, 1, 35, 1, 38, +1, 41, 1, 44, 1, 47, 1, 50, 1, 53, 1, 56, 1, 59, 1, 62, +1, 65, 1, 68, 1, 71, 1, 74, 1, 77, 1, 80, 1, 83, 1, 86, +1, 89, 1, 92, 1, 95, 1, 98, 1, 101, 1, 104, 1, 107, 1, 110, +1, 113, 1, 116, 1, 119, 1, 122, 1, 125, 1, -128, 1, -125, 1, -122, +1, -119, 1, -116, 1, -113, 1, -110, 1, -107, 1, -104, 1, -101, 1, -98, +1, -95, 1, -92, 1, -89, 1, -86, 1, -83, 1, -80, 1, -77, 1, -74, +1, -71, 1, -68, 1, -65, 1, -62, 1, -59, 1, -56, 1, -53, 1, -50, +1, -47, 1, -44, 1, -41, 1, -38, 1, -35, 1, -32, 1, -29, 1, -26, +1, -23, 1, -20, 1, -17, 1, -14, 1, -11, 1, -8, 1, -5, 1, -2, +2, 1, 2, 4, 2, 7, 2, 10, 2, 13, 2, 16, 2, 19, 2, 22, +2, 25, 2, 28, 2, 31, 2, 34, 2, 37, 2, 40, 2, 43, 2, 46, +2, 49, 2, 52, 2, 80, 2, 83, 2, 86, 2, 89, 2, 92, 2, 95, +2, 98, 2, 101, 2, 104, 2, 107, 2, 110, 2, 113, 2, 116, 2, 119, +2, 122, 2, 125, 2, -128, 2, -125, 2, -122, 2, -119, 2, -116, 2, -113, +2, -110, 2, -107, 2, -104, 2, -101, 2, -98, 2, -95, 2, -92, 2, -89, +2, -86, 2, -83, 2, -80, 2, -77, 2, -74, 2, -71, 2, -68, 2, -65, +2, -58, 2, -55, 2, -52, 2, -49, 2, -32, 2, -29, 2, -18, 3, 122, +3, -122, 3, -119, 3, -116, 3, -113, 3, -110, 3, -107, 3, -104, 3, -101, +3, -98, 3, -95, 3, -92, 3, -89, 3, -86, 3, -83, 3, -80, 3, -77, +3, -74, 3, -71, 3, -68, 3, -65, 3, -62, 3, -59, 3, -56, 3, -53, +3, -50, 3, -47, 3, -44, 3, -41, 3, -38, 3, -35, 3, -32, 3, -29, +3, -26, 3, -23, 3, -20, 3, -17, 3, -14, 3, -11, 3, -8, 3, -5, +4, 0, 4, 3, 4, 36, 4, 69, 4, 102, 4, -118, 4, -85, 4, -52, +4, -19, 5, 14, 5, 49, 5, 82, 5, 115, 5, -48, 5, -15, 6, 33, +6, 66, 6, 99, 6, -124, 6, -91, 6, -58, 6, -18, 7, 16, 7, 77, +7, -128, 7, -95, 9, 4, 9, 37, 9, 80, 9, -123, 9, -90, 9, -36, +10, 5, 10, 38, 10, 89, 10, -123, 10, -90, 10, -48, 11, 5, 11, 38, +11, 92, 11, -125, 11, -92, 11, -25, 12, 8, 12, 42, 12, 96, 12, -123, +12, -90, 12, -34, 13, 5, 13, 38, 13, 96, 13, -123, 13, -90, 14, 1, +14, 34, 14, 67, 14, -127, 14, -94, 14, -61, 15, 0, 15, 33, 15, 66, +15, 99, 15, -120, 16, 0, 16, 33, 16, 66, 16, -96, 16, -63, 16, -30, +17, 3, 17, 36, 17, 69, 17, 102, 17, -121, 17, -88, 17, -55, 17, -22, +18, 11, 18, 44, 18, 77, 18, 110, 18, -112, 18, -78, 18, -45, 18, -12, +19, 21, 19, 54, 19, 87, 19, -96, 19, -63, 19, -30, 20, 3, 20, 36, +20, 69, 20, 102, 20, -121, 20, -88, 20, -55, 20, -22, 21, 11, 21, 44, +21, 77, 21, 110, 21, -113, 21, -80, 21, -47, 21, -14, 22, 19, 22, 52, +22, 85, 22, 118, 22, -105, 22, -72, 22, -39, 23, 0, 23, 33, 23, 66, +23, 99, 23, -124, 23, -91, 23, -41, 24, 14, 24, 47, 24, 80, 24, 113, +24, -110, 25, 0, 25, 70, 25, 103, 29, 0, 29, 33, 29, 66, 29, 99, +30, 0, 30, 33, 30, 66, 30, 99, 30, -124, 30, -91, 30, -58, 30, -25, +31, 8, 31, 41, 31, 74, 31, 107, 31, -116, 31, -83, 31, -48, 31, -14, +32, 40, 32, 95, 33, 2, 33, 36, 33, 69, 48, 0, 48, 49, 48, 82, +48, 115, 48, -108, 48, -75, 48, -42, 48, -9, 49, 24, 49, 57, 49, 90, +49, 123, 49, -96, 49, -16, 52, 0, 52, 33, 52, 66, 52, 99, 52, -124, +52, -91, 52, -58, 52, -25, 53, 8, 53, 41, 53, 74, 53, 107, 53, -116, +53, -83, 53, -50, 53, -17, 54, 16, 54, 49, 54, 82, 54, 115, 54, -108, +54, -75, 54, -42, 54, -9, 55, 24, 55, 57, 55, 90, 55, 123, 55, -100, +55, -67, 55, -34, 55, -1, 56, 32, 56, 65, 56, 98, 56, -125, 56, -92, +56, -59, 56, -26, 57, 7, 57, 40, 57, 73, 57, 106, 57, -117, 57, -84, +57, -51, 57, -18, 58, 15, 58, 48, 58, 81, 58, 114, 58, -109, 58, -76, +58, -43, 58, -10, 59, 23, 59, 56, 59, 89, 59, 122, 59, -101, 59, -68, +59, -35, 59, -2, 60, 31, 60, 64, 60, 97, 60, -126, 60, -93, 60, -60, +60, -27, 61, 6, 61, 39, 61, 72, 61, 105, 61, -118, 61, -85, 61, -52, +61, -19, 62, 14, 62, 47, 62, 80, 62, 113, 62, -110, 62, -77, 62, -44, +62, -11, 63, 22, 63, 55, 63, 88, 63, 121, 63, -102, 63, -69, 63, -36, +63, -3, 64, 30, 64, 63, 64, 96, 64, -127, 64, -94, 64, -61, 64, -28, +65, 5, 65, 38, 65, 71, 65, 104, 65, -119, 65, -86, 65, -53, 65, -20, +66, 13, 66, 46, 66, 79, 66, 112, 66, -111, 66, -78, 66, -45, 66, -12, +67, 21, 67, 54, 67, 87, 67, 120, 67, -103, 67, -70, 67, -37, 67, -4, +68, 29, 68, 62, 68, 95, 68, -128, 68, -95, 68, -62, 68, -29, 69, 4, +69, 37, 69, 70, 69, 103, 69, -120, 69, -87, 69, -54, 69, -21, 70, 12, +70, 45, 70, 78, 70, 111, 70, -112, 70, -79, 70, -46, 70, -13, 71, 20, +71, 53, 71, 86, 71, 119, 71, -104, 71, -71, 71, -38, 71, -5, 72, 28, +72, 61, 72, 94, 72, 127, 72, -96, 72, -63, 72, -30, 73, 3, 73, 36, +73, 69, 73, 102, 73, -121, 73, -88, 73, -55, 73, -22, 74, 11, 74, 44, +74, 77, 74, 110, 74, -113, 74, -80, 74, -47, 74, -14, 75, 19, 75, 52, +75, 85, 75, 118, 75, -105, 75, -72, 75, -39, 75, -6, 76, 27, 76, 60, +76, 93, 76, 126, 76, -97, 76, -64, 76, -31, 77, 2, 77, 35, 77, 68, +77, 101, 77, -122, 77, -89, 78, 0, 78, 33, 78, 66, 78, 99, 78, -124, +78, -91, 78, -58, 78, -25, 79, 8, 79, 41, 79, 74, 79, 107, 79, -116, +79, -83, 79, -50, 79, -17, 80, 16, 80, 49, 80, 82, 80, 115, 80, -108, +80, -75, 80, -42, 80, -9, 81, 24, 81, 57, 81, 90, 81, 123, 81, -100, +81, -67, 81, -34, 81, -1, 82, 32, 82, 65, 82, 98, 82, -125, 82, -92, +82, -59, 82, -26, 83, 7, 83, 40, 83, 73, 83, 106, 83, -117, 83, -84, +83, -51, 83, -18, 84, 15, 84, 48, 84, 81, 84, 114, 84, -109, 84, -76, +84, -43, 84, -10, 85, 23, 85, 56, 85, 89, 85, 122, 85, -101, 85, -68, +85, -35, 85, -2, 86, 31, 86, 64, 86, 97, 86, -126, 86, -93, 86, -60, +86, -27, 87, 6, 87, 39, 87, 72, 87, 105, 87, -118, 87, -85, 87, -52, +87, -19, 88, 14, 88, 47, 88, 80, 88, 113, 88, -110, 88, -77, 88, -44, +88, -11, 89, 22, 89, 55, 89, 88, 89, 121, 89, -102, 89, -69, 89, -36, +89, -3, 90, 30, 90, 63, 90, 96, 90, -127, 90, -94, 90, -61, 90, -28, +91, 5, 91, 38, 91, 71, 91, 104, 91, -119, 91, -86, 91, -53, 91, -20, +92, 13, 92, 46, 92, 79, 92, 112, 92, -111, 92, -78, 92, -45, 92, -12, +93, 21, 93, 54, 93, 87, 93, 120, 93, -103, 93, -70, 93, -37, 93, -4, +94, 29, 94, 62, 94, 95, 94, -128, 94, -95, 94, -62, 94, -29, 95, 4, +95, 37, 95, 70, 95, 103, 95, -120, 95, -87, 95, -54, 95, -21, 96, 12, +96, 45, 96, 78, 96, 111, 96, -112, 96, -79, 96, -46, 96, -13, 97, 20, +97, 53, 97, 86, 97, 119, 97, -104, 97, -71, 97, -38, 97, -5, 98, 28, +98, 61, 98, 94, 98, 127, 98, -96, 98, -63, 98, -30, 99, 3, 99, 36, +99, 69, 99, 102, 99, -121, 99, -88, 99, -55, 99, -22, 100, 11, 100, 44, +100, 77, 100, 110, 100, -113, 100, -80, 100, -47, 100, -14, 101, 19, 101, 52, +101, 85, 101, 118, 101, -105, 101, -72, 101, -39, 101, -6, 102, 27, 102, 60, +102, 93, 102, 126, 102, -97, 102, -64, 102, -31, 103, 2, 103, 35, 103, 68, +103, 101, 103, -122, 103, -89, 103, -56, 103, -23, 104, 10, 104, 43, 104, 76, +104, 109, 104, -114, 104, -81, 104, -48, 104, -15, 105, 18, 105, 51, 105, 84, +105, 117, 105, -106, 105, -73, 105, -40, 105, -7, 106, 26, 106, 59, 106, 92, +106, 125, 106, -98, 106, -65, 106, -32, 107, 1, 107, 34, 107, 67, 107, 100, +107, -123, 107, -90, 107, -57, 107, -24, 108, 9, 108, 42, 108, 75, 108, 108, +108, -115, 108, -82, 108, -49, 108, -16, 109, 17, 109, 50, 109, 83, 109, 116, +109, -107, 109, -74, 109, -41, 109, -8, 110, 25, 110, 58, 110, 91, 110, 124, +110, -99, 110, -66, 110, -33, 111, 0, 111, 33, 111, 66, 111, 99, 111, -124, +111, -91, 111, -58, 111, -25, 112, 8, 112, 41, 112, 74, 112, 107, 112, -116, +112, -83, 112, -50, 112, -17, 113, 16, 113, 49, 113, 82, 113, 115, 113, -108, +113, -75, 113, -42, 113, -9, 114, 24, 114, 57, 114, 90, 114, 123, 114, -100, +114, -67, 114, -34, 114, -1, 115, 32, 115, 65, 115, 98, 115, -125, 115, -92, +115, -59, 115, -26, 116, 7, 116, 40, 116, 73, 116, 106, 116, -117, 116, -84, +116, -51, 116, -18, 117, 15, 117, 48, 117, 81, 117, 114, 117, -109, 117, -76, +117, -43, 117, -10, 118, 23, 118, 56, 118, 89, 118, 122, 118, -101, 118, -68, +118, -35, 118, -2, 119, 31, 119, 64, 119, 97, 119, -126, 119, -93, 119, -60, +119, -27, 120, 6, 120, 39, 120, 72, 120, 105, 120, -118, 120, -85, 120, -52, +120, -19, 121, 14, 121, 47, 121, 80, 121, 113, 121, -110, 121, -77, 121, -44, +121, -11, 122, 22, 122, 55, 122, 88, 122, 121, 122, -102, 122, -69, 122, -36, +122, -3, 123, 30, 123, 63, 123, 96, 123, -127, 123, -94, 123, -61, 123, -28, +124, 5, 124, 38, 124, 71, 124, 104, 124, -119, 124, -86, 124, -53, 124, -20, +125, 13, 125, 46, 125, 79, 125, 112, 125, -111, 125, -78, 125, -45, 125, -12, +126, 21, 126, 54, 126, 87, 126, 120, 126, -103, 126, -70, 126, -37, 126, -4, +127, 29, 127, 62, 127, 95, 127, -128, 127, -95, 127, -62, 127, -29, */ + +/* +UTF-16LE +9, 0, 12, 0, 28, 0, 31, 0, 48, 0, 51, 0, 54, 0, 57, 0, +65, 0, 68, 0, 71, 0, 74, 0, 77, 0, 80, 0, 83, 0, 86, 0, +89, 0, 97, 0, 100, 0, 103, 0, 106, 0, 109, 0, 112, 0, 115, 0, +118, 0, 121, 0, -86, 0, -75, 0, -70, 0, -64, 0, -61, 0, -58, 0, +-55, 0, -52, 0, -49, 0, -46, 0, -43, 0, -40, 0, -37, 0, -34, 0, +-31, 0, -28, 0, -25, 0, -22, 0, -19, 0, -16, 0, -13, 0, -10, 0, +-7, 0, -4, 0, -1, 0, 2, 1, 5, 1, 8, 1, 11, 1, 14, 1, +17, 1, 20, 1, 23, 1, 26, 1, 29, 1, 32, 1, 35, 1, 38, 1, +41, 1, 44, 1, 47, 1, 50, 1, 53, 1, 56, 1, 59, 1, 62, 1, +65, 1, 68, 1, 71, 1, 74, 1, 77, 1, 80, 1, 83, 1, 86, 1, +89, 1, 92, 1, 95, 1, 98, 1, 101, 1, 104, 1, 107, 1, 110, 1, +113, 1, 116, 1, 119, 1, 122, 1, 125, 1, -128, 1, -125, 1, -122, 1, +-119, 1, -116, 1, -113, 1, -110, 1, -107, 1, -104, 1, -101, 1, -98, 1, +-95, 1, -92, 1, -89, 1, -86, 1, -83, 1, -80, 1, -77, 1, -74, 1, +-71, 1, -68, 1, -65, 1, -62, 1, -59, 1, -56, 1, -53, 1, -50, 1, +-47, 1, -44, 1, -41, 1, -38, 1, -35, 1, -32, 1, -29, 1, -26, 1, +-23, 1, -20, 1, -17, 1, -14, 1, -11, 1, -8, 1, -5, 1, -2, 1, +1, 2, 4, 2, 7, 2, 10, 2, 13, 2, 16, 2, 19, 2, 22, 2, +25, 2, 28, 2, 31, 2, 34, 2, 37, 2, 40, 2, 43, 2, 46, 2, +49, 2, 52, 2, 80, 2, 83, 2, 86, 2, 89, 2, 92, 2, 95, 2, +98, 2, 101, 2, 104, 2, 107, 2, 110, 2, 113, 2, 116, 2, 119, 2, +122, 2, 125, 2, -128, 2, -125, 2, -122, 2, -119, 2, -116, 2, -113, 2, +-110, 2, -107, 2, -104, 2, -101, 2, -98, 2, -95, 2, -92, 2, -89, 2, +-86, 2, -83, 2, -80, 2, -77, 2, -74, 2, -71, 2, -68, 2, -65, 2, +-58, 2, -55, 2, -52, 2, -49, 2, -32, 2, -29, 2, -18, 2, 122, 3, +-122, 3, -119, 3, -116, 3, -113, 3, -110, 3, -107, 3, -104, 3, -101, 3, +-98, 3, -95, 3, -92, 3, -89, 3, -86, 3, -83, 3, -80, 3, -77, 3, +-74, 3, -71, 3, -68, 3, -65, 3, -62, 3, -59, 3, -56, 3, -53, 3, +-50, 3, -47, 3, -44, 3, -41, 3, -38, 3, -35, 3, -32, 3, -29, 3, +-26, 3, -23, 3, -20, 3, -17, 3, -14, 3, -11, 3, -8, 3, -5, 3, +0, 4, 3, 4, 36, 4, 69, 4, 102, 4, -118, 4, -85, 4, -52, 4, +-19, 4, 14, 5, 49, 5, 82, 5, 115, 5, -48, 5, -15, 5, 33, 6, +66, 6, 99, 6, -124, 6, -91, 6, -58, 6, -18, 6, 16, 7, 77, 7, +-128, 7, -95, 7, 4, 9, 37, 9, 80, 9, -123, 9, -90, 9, -36, 9, +5, 10, 38, 10, 89, 10, -123, 10, -90, 10, -48, 10, 5, 11, 38, 11, +92, 11, -125, 11, -92, 11, -25, 11, 8, 12, 42, 12, 96, 12, -123, 12, +-90, 12, -34, 12, 5, 13, 38, 13, 96, 13, -123, 13, -90, 13, 1, 14, +34, 14, 67, 14, -127, 14, -94, 14, -61, 14, 0, 15, 33, 15, 66, 15, +99, 15, -120, 15, 0, 16, 33, 16, 66, 16, -96, 16, -63, 16, -30, 16, +3, 17, 36, 17, 69, 17, 102, 17, -121, 17, -88, 17, -55, 17, -22, 17, +11, 18, 44, 18, 77, 18, 110, 18, -112, 18, -78, 18, -45, 18, -12, 18, +21, 19, 54, 19, 87, 19, -96, 19, -63, 19, -30, 19, 3, 20, 36, 20, +69, 20, 102, 20, -121, 20, -88, 20, -55, 20, -22, 20, 11, 21, 44, 21, +77, 21, 110, 21, -113, 21, -80, 21, -47, 21, -14, 21, 19, 22, 52, 22, +85, 22, 118, 22, -105, 22, -72, 22, -39, 22, 0, 23, 33, 23, 66, 23, +99, 23, -124, 23, -91, 23, -41, 23, 14, 24, 47, 24, 80, 24, 113, 24, +-110, 24, 0, 25, 70, 25, 103, 25, 0, 29, 33, 29, 66, 29, 99, 29, +0, 30, 33, 30, 66, 30, 99, 30, -124, 30, -91, 30, -58, 30, -25, 30, +8, 31, 41, 31, 74, 31, 107, 31, -116, 31, -83, 31, -48, 31, -14, 31, +40, 32, 95, 32, 2, 33, 36, 33, 69, 33, 0, 48, 49, 48, 82, 48, +115, 48, -108, 48, -75, 48, -42, 48, -9, 48, 24, 49, 57, 49, 90, 49, +123, 49, -96, 49, -16, 49, 0, 52, 33, 52, 66, 52, 99, 52, -124, 52, +-91, 52, -58, 52, -25, 52, 8, 53, 41, 53, 74, 53, 107, 53, -116, 53, +-83, 53, -50, 53, -17, 53, 16, 54, 49, 54, 82, 54, 115, 54, -108, 54, +-75, 54, -42, 54, -9, 54, 24, 55, 57, 55, 90, 55, 123, 55, -100, 55, +-67, 55, -34, 55, -1, 55, 32, 56, 65, 56, 98, 56, -125, 56, -92, 56, +-59, 56, -26, 56, 7, 57, 40, 57, 73, 57, 106, 57, -117, 57, -84, 57, +-51, 57, -18, 57, 15, 58, 48, 58, 81, 58, 114, 58, -109, 58, -76, 58, +-43, 58, -10, 58, 23, 59, 56, 59, 89, 59, 122, 59, -101, 59, -68, 59, +-35, 59, -2, 59, 31, 60, 64, 60, 97, 60, -126, 60, -93, 60, -60, 60, +-27, 60, 6, 61, 39, 61, 72, 61, 105, 61, -118, 61, -85, 61, -52, 61, +-19, 61, 14, 62, 47, 62, 80, 62, 113, 62, -110, 62, -77, 62, -44, 62, +-11, 62, 22, 63, 55, 63, 88, 63, 121, 63, -102, 63, -69, 63, -36, 63, +-3, 63, 30, 64, 63, 64, 96, 64, -127, 64, -94, 64, -61, 64, -28, 64, +5, 65, 38, 65, 71, 65, 104, 65, -119, 65, -86, 65, -53, 65, -20, 65, +13, 66, 46, 66, 79, 66, 112, 66, -111, 66, -78, 66, -45, 66, -12, 66, +21, 67, 54, 67, 87, 67, 120, 67, -103, 67, -70, 67, -37, 67, -4, 67, +29, 68, 62, 68, 95, 68, -128, 68, -95, 68, -62, 68, -29, 68, 4, 69, +37, 69, 70, 69, 103, 69, -120, 69, -87, 69, -54, 69, -21, 69, 12, 70, +45, 70, 78, 70, 111, 70, -112, 70, -79, 70, -46, 70, -13, 70, 20, 71, +53, 71, 86, 71, 119, 71, -104, 71, -71, 71, -38, 71, -5, 71, 28, 72, +61, 72, 94, 72, 127, 72, -96, 72, -63, 72, -30, 72, 3, 73, 36, 73, +69, 73, 102, 73, -121, 73, -88, 73, -55, 73, -22, 73, 11, 74, 44, 74, +77, 74, 110, 74, -113, 74, -80, 74, -47, 74, -14, 74, 19, 75, 52, 75, +85, 75, 118, 75, -105, 75, -72, 75, -39, 75, -6, 75, 27, 76, 60, 76, +93, 76, 126, 76, -97, 76, -64, 76, -31, 76, 2, 77, 35, 77, 68, 77, +101, 77, -122, 77, -89, 77, 0, 78, 33, 78, 66, 78, 99, 78, -124, 78, +-91, 78, -58, 78, -25, 78, 8, 79, 41, 79, 74, 79, 107, 79, -116, 79, +-83, 79, -50, 79, -17, 79, 16, 80, 49, 80, 82, 80, 115, 80, -108, 80, +-75, 80, -42, 80, -9, 80, 24, 81, 57, 81, 90, 81, 123, 81, -100, 81, +-67, 81, -34, 81, -1, 81, 32, 82, 65, 82, 98, 82, -125, 82, -92, 82, +-59, 82, -26, 82, 7, 83, 40, 83, 73, 83, 106, 83, -117, 83, -84, 83, +-51, 83, -18, 83, 15, 84, 48, 84, 81, 84, 114, 84, -109, 84, -76, 84, +-43, 84, -10, 84, 23, 85, 56, 85, 89, 85, 122, 85, -101, 85, -68, 85, +-35, 85, -2, 85, 31, 86, 64, 86, 97, 86, -126, 86, -93, 86, -60, 86, +-27, 86, 6, 87, 39, 87, 72, 87, 105, 87, -118, 87, -85, 87, -52, 87, +-19, 87, 14, 88, 47, 88, 80, 88, 113, 88, -110, 88, -77, 88, -44, 88, +-11, 88, 22, 89, 55, 89, 88, 89, 121, 89, -102, 89, -69, 89, -36, 89, +-3, 89, 30, 90, 63, 90, 96, 90, -127, 90, -94, 90, -61, 90, -28, 90, +5, 91, 38, 91, 71, 91, 104, 91, -119, 91, -86, 91, -53, 91, -20, 91, +13, 92, 46, 92, 79, 92, 112, 92, -111, 92, -78, 92, -45, 92, -12, 92, +21, 93, 54, 93, 87, 93, 120, 93, -103, 93, -70, 93, -37, 93, -4, 93, +29, 94, 62, 94, 95, 94, -128, 94, -95, 94, -62, 94, -29, 94, 4, 95, +37, 95, 70, 95, 103, 95, -120, 95, -87, 95, -54, 95, -21, 95, 12, 96, +45, 96, 78, 96, 111, 96, -112, 96, -79, 96, -46, 96, -13, 96, 20, 97, +53, 97, 86, 97, 119, 97, -104, 97, -71, 97, -38, 97, -5, 97, 28, 98, +61, 98, 94, 98, 127, 98, -96, 98, -63, 98, -30, 98, 3, 99, 36, 99, +69, 99, 102, 99, -121, 99, -88, 99, -55, 99, -22, 99, 11, 100, 44, 100, +77, 100, 110, 100, -113, 100, -80, 100, -47, 100, -14, 100, 19, 101, 52, 101, +85, 101, 118, 101, -105, 101, -72, 101, -39, 101, -6, 101, 27, 102, 60, 102, +93, 102, 126, 102, -97, 102, -64, 102, -31, 102, 2, 103, 35, 103, 68, 103, +101, 103, -122, 103, -89, 103, -56, 103, -23, 103, 10, 104, 43, 104, 76, 104, +109, 104, -114, 104, -81, 104, -48, 104, -15, 104, 18, 105, 51, 105, 84, 105, +117, 105, -106, 105, -73, 105, -40, 105, -7, 105, 26, 106, 59, 106, 92, 106, +125, 106, -98, 106, -65, 106, -32, 106, 1, 107, 34, 107, 67, 107, 100, 107, +-123, 107, -90, 107, -57, 107, -24, 107, 9, 108, 42, 108, 75, 108, 108, 108, +-115, 108, -82, 108, -49, 108, -16, 108, 17, 109, 50, 109, 83, 109, 116, 109, +-107, 109, -74, 109, -41, 109, -8, 109, 25, 110, 58, 110, 91, 110, 124, 110, +-99, 110, -66, 110, -33, 110, 0, 111, 33, 111, 66, 111, 99, 111, -124, 111, +-91, 111, -58, 111, -25, 111, 8, 112, 41, 112, 74, 112, 107, 112, -116, 112, +-83, 112, -50, 112, -17, 112, 16, 113, 49, 113, 82, 113, 115, 113, -108, 113, +-75, 113, -42, 113, -9, 113, 24, 114, 57, 114, 90, 114, 123, 114, -100, 114, +-67, 114, -34, 114, -1, 114, 32, 115, 65, 115, 98, 115, -125, 115, -92, 115, +-59, 115, -26, 115, 7, 116, 40, 116, 73, 116, 106, 116, -117, 116, -84, 116, +-51, 116, -18, 116, 15, 117, 48, 117, 81, 117, 114, 117, -109, 117, -76, 117, +-43, 117, -10, 117, 23, 118, 56, 118, 89, 118, 122, 118, -101, 118, -68, 118, +-35, 118, -2, 118, 31, 119, 64, 119, 97, 119, -126, 119, -93, 119, -60, 119, +-27, 119, 6, 120, 39, 120, 72, 120, 105, 120, -118, 120, -85, 120, -52, 120, +-19, 120, 14, 121, 47, 121, 80, 121, 113, 121, -110, 121, -77, 121, -44, 121, +-11, 121, 22, 122, 55, 122, 88, 122, 121, 122, -102, 122, -69, 122, -36, 122, +-3, 122, 30, 123, 63, 123, 96, 123, -127, 123, -94, 123, -61, 123, -28, 123, +5, 124, 38, 124, 71, 124, 104, 124, -119, 124, -86, 124, -53, 124, -20, 124, +13, 125, 46, 125, 79, 125, 112, 125, -111, 125, -78, 125, -45, 125, -12, 125, +21, 126, 54, 126, 87, 126, 120, 126, -103, 126, -70, 126, -37, 126, -4, 126, +29, 127, 62, 127, 95, 127, -128, 127, -95, 127, -62, 127, -29, 127, */ + +/* 1-BYTE: +US-ASCII +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, + +ISO-8859-1 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -86, -75, -70, -64, -61, -58, +-55, -52, -49, -46, -43, -40, -37, -34, -31, -28, -25, -22, -19, -16, -13, -10, +-7, -4, -1, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +ISO-8859-2 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +-55, 63, 63, 63, 63, 63, 63, 63, -31, -28, -25, 63, -19, 63, -13, -10, +63, -4, 63, -61, -79, 63, 63, -49, -16, 63, 63, -52, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, -75, -93, -15, -46, 63, 63, -43, 63, 63, +-8, 63, -70, -34, -69, 63, 63, -39, -5, 63, 63, -68, -82, 63, 63, 63, + +ISO-8859-3 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, -75, 63, -64, 63, 63, +-55, -52, -49, -46, 63, 63, -37, 63, -31, -28, -25, -22, -19, 63, -13, -10, +-7, -4, 63, 63, 63, -58, -27, 63, 63, 63, 63, 63, -8, -43, 63, -95, +63, 63, 63, 63, -68, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, -34, -70, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +ISO-8859-4 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, -61, -58, +-55, 63, 63, 63, -43, -40, -37, 63, -31, -28, 63, 63, -19, 63, 63, -10, +63, -4, 63, 63, -79, 63, 63, 63, -16, 63, -20, 63, 63, 63, -69, 63, +-75, 63, -25, 63, 63, -94, -90, 63, 63, 63, 63, -67, -14, 63, 63, -93, +63, 63, 63, 63, 63, -35, -2, 63, 63, 63, 63, 63, -82, 63, 63, 63, + +ISO-8859-5 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, -93, -60, -27, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +ISO-8859-6 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -63, +-30, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +ISO-8859-7 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, -74, -71, -68, -65, -62, -59, -56, -53, +-50, -47, -44, -41, -38, -35, -32, -29, -26, -23, -20, -17, -14, -11, -8, -5, +-2, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +ISO-8859-8 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, -75, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -32, 63, 63, + +ISO-8859-9 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -86, -75, -70, -64, -61, -58, +-55, -52, -49, -46, -43, -40, -37, 63, -31, -28, -25, -22, -19, 63, -13, -10, +-7, -4, -1, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +x-iso-8859-11 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, -95, -62, -29, 63, 63, 63, 63, 63, 63, + +ISO-8859-13 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, -75, 63, 63, 63, -81, +-55, 63, 63, 63, -43, -88, 63, 63, 63, -28, 63, 63, 63, 63, -13, -10, +63, -4, 63, 63, -32, 63, 63, 63, 63, 63, -21, 63, 63, 63, -20, 63, +63, 63, -31, 63, 63, 63, -49, 63, -39, -15, 63, 63, -12, 63, 63, -86, +63, 63, 63, 63, 63, 63, -5, 63, 63, 63, 63, -22, -34, 63, 63, 63, + +ISO-8859-15 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -86, -75, -70, -64, -61, -58, +-55, -52, -49, -46, -43, -40, -37, -34, -31, -28, -25, -22, -19, -16, -13, -10, +-7, -4, -1, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -67, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -76, 63, 63, 63, + + */ + +/* +ISO-2022-JP // MaxBytes = 8 !!! +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 27, 36, 66, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 38, 34, 38, 37, 38, 40, 38, 43, 38, 46, 38, 49, 38, 51, 38, +54, 33, 41, 33, 41, 33, 41, 38, 67, 38, 70, 38, 73, 38, 76, 38, +79, 33, 41, 38, 84, 38, 87, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 39, 54, 39, +103, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 33, 33, 41, 36, 50, 36, 83, 33, 41, 37, 53, 37, +86, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 48, +108, 78, 62, 80, 41, 33, 41, 33, 41, 48, 103, 80, 61, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 75, 121, 80, 89, 80, 109, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 58, 68, 81, 37, 33, 41, 80, +86, 33, 41, 69, 94, 33, 41, 33, 41, 81, 88, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 51, 68, 33, 41, 68, 60, 82, 43, 33, 41, 33, +41, 82, 67, 33, 41, 33, 41, 33, 41, 72, 63, 82, 90, 77, 121, 33, +41, 70, 93, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 83, +57, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 83, 85, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 48, 53, 33, +41, 84, 48, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 116, 33, 33, +41, 33, 41, 33, 41, 74, 47, 33, 41, 33, 41, 51, 48, 48, 80, 84, +121, 33, 41, 33, 41, 58, 74, 85, 42, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 48, 66, 33, 41, 33, 41, 33, 41, 85, 116, 33, 41, 86, 34, 33, +41, 86, 42, 33, 41, 33, 41, 33, 41, 86, 61, 33, 41, 33, 41, 33, +41, 33, 41, 78, 102, 86, 95, 33, 41, 68, 107, 33, 41, 86, 112, 33, +41, 33, 41, 86, 123, 87, 34, 79, 46, 76, 111, 33, 41, 33, 41, 87, +76, 73, 124, 33, 41, 50, 119, 33, 41, 33, 41, 33, 41, 66, 41, 33, +41, 33, 41, 33, 41, 65, 91, 33, 41, 33, 41, 33, 41, 88, 77, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 89, 42, 62, 53, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 63, +100, 89, 102, 33, 41, 33, 41, 72, 66, 33, 41, 33, 41, 33, 41, 64, +113, 33, 41, 90, 51, 33, 41, 90, 61, 90, 69, 33, 41, 69, 77, 33, +41, 90, 90, 50, 34, 33, 41, 67, 107, 90, 108, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 77, 104, 33, 41, 33, 41, 33, +41, 91, 77, 33, 41, 91, 97, 33, 41, 33, 41, 33, 41, 68, 116, 33, +41, 33, 41, 92, 37, 33, 41, 92, 56, 54, 75, 33, 41, 33, 41, 77, +77, 92, 95, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 93, 61, 58, 33, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 93, 108, 93, 124, 33, 41, 66, +89, 33, 41, 61, 39, 33, 41, 77, 97, 94, 56, 33, 41, 33, 41, 33, +41, 94, 82, 94, 93, 67, 57, 33, 41, 57, 66, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 64, 33, 33, 41, 95, 57, 33, 41, 33, +41, 33, 41, 33, 41, 50, 80, 33, 41, 67, 58, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 77, 80, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 96, 117, 96, 120, 33, 41, 33, 41, 97, 37, 33, 41, 69, +68, 72, 42, 33, 41, 33, 41, 33, 41, 58, 47, 33, 41, 33, 41, 33, +41, 33, 41, 72, 47, 33, 41, 33, 41, 33, 41, 61, 98, 63, 63, 67, +101, 63, 103, 33, 41, 33, 41, 33, 41, 67, 78, 33, 41, 53, 78, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 65, 67, 33, 41, 77, +52, 33, 41, 33, 41, 99, 58, 33, 41, 33, 41, 33, 41, 99, 77, 33, +41, 99, 86, 33, 41, 33, 41, 78, 53, 33, 41, 99, 122, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 70, 70, 33, 41, 33, 41, 33, 41, 33, +41, 74, 52, 33, 41, 33, 41, 33, 41, 71, 60, 101, 39, 101, 50, 33, +41, 33, 41, 76, 86, 33, 41, 78, 125, 33, 41, 33, 41, 33, 41, 33, +41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 33, 41, 102, 42, 33, +41, 33, 41, 33, 41, 33, 41, */ + +/* +x-windows-950 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, -93, -68, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -93, 69, -93, +72, -93, 75, -93, 78, -93, 81, -93, 84, -93, 86, -93, 89, 63, 63, 63, +-93, 94, -93, 97, -93, 100, -93, 103, -93, 106, 63, -93, 111, -93, 114, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, 64, 63, +63, 63, 63, 63, 63, 63, -93, -87, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, -92, 64, 63, -55, 64, 63, -36, -78, -91, -24, -92, +-78, 63, -55, -77, 63, 63, -53, -53, 63, 63, -85, 91, -83, -63, 63, -48, +-36, 63, -44, 101, -40, 83, -74, -59, -71, -81, 63, -66, -88, -11, -63, -48, +-34, 63, 63, -88, -26, -24, -7, 63, 63, -88, -17, -48, -20, -71, -70, 63, +63, -74, -45, 63, 63, -91, 99, 63, 63, -31, 70, -92, -49, -91, 109, -90, +79, -54, 118, 63, -50, 77, 63, 63, 63, 63, -48, -14, -80, -31, 63, 63, +63, 63, -36, -48, -71, -66, -71, -54, -27, 65, 63, -20, -57, 63, 63, -54, +-87, 63, 63, 63, -87, 88, 63, 63, -47, 74, -44, -76, -44, -62, -77, -13, +63, -36, -15, 63, -68, 88, -20, -53, 63, -91, 126, -90, 105, -82, 78, -90, +111, 63, -87, 100, -85, -72, -50, 105, -47, 99, 63, -44, -50, 63, -40, -71, +63, 63, -27, 95, -20, -44, -11, -56, 63, -90, 119, 63, -40, -46, -68, 101, +-71, -17, 63, -85, -52, 63, -89, -62, 63, -50, -89, -82, 115, 63, -40, -17, +63, 63, -27, 98, -64, -83, 63, 63, -85, -46, -43, 69, -68, 109, -55, 121, +63, -76, 91, -68, 115, -89, -53, 63, -71, -5, -47, 123, -85, -36, -76, 95, +63, -89, -42, -52, -82, -52, 122, 63, -82, -89, -43, 82, -43, 94, 63, -73, +81, -40, -2, 63, -31, -43, -70, 66, 63, 63, 63, -14, 65, 63, -52, -78, +-55, -28, -87, -45, 63, 63, 63, -50, -39, 63, -47, -74, 63, -43, 115, -79, +-64, -76, 124, -76, -86, -35, -74, -73, 104, -31, -38, -27, -83, -27, -76, -68, +-74, 63, -62, 89, -12, 78, 63, -79, -43, -27, -67, -92, -26, -8, -16, 63, +-87, -12, 63, 63, -79, -34, -76, -67, -31, -8, -23, -75, 63, 63, -23, -67, +63, 63, -52, -38, 63, -50, -3, -84, 94, 63, -47, -27, -82, -32, -43, -76, +63, -79, -24, -39, -58, -39, -79, -76, -44, -35, -37, -73, -92, -73, -91, -30, +66, -70, 101, 63, 63, 63, -23, -52, 63, 63, -20, -5, 63, -14, 77, 63, +63, -35, -9, -90, -71, 63, -27, -12, -23, -27, -46, 64, -19, 77, -43, -33, +-55, -2, 63, -88, 91, -86, 113, -51, 77, -82, -11, -49, 123, -84, 119, 63, +-81, 68, -82, -9, 63, -42, 68, 63, -75, 65, -76, -7, -76, -17, 63, -73, +-66, -34, 90, 63, -26, 83, -30, -71, 63, -26, 94, -68, -31, -23, -9, -27, +-3, -19, 85, 63, -14, 100, -11, -43, -92, -11, 63, -84, -76, -46, 123, -78, +109, -42, 81, -38, 93, -34, 109, 63, -70, -78, -26, 105, -22, 75, 63, 63, +-81, 82, -38, 103, -42, 93, 63, -53, 98, 63, -42, 103, 63, 63, -26, -95, +-9, -23, -51, 102, -49, -54, 63, -42, 113, -75, 98, 63, -70, -65, -68, -3, +63, 63, -49, -40, -19, 114, -91, -48, 63, 63, 63, 63, -78, -86, -34, -47, +63, -65, 97, -16, 76, 63, -26, -69, 63, -34, -41, -84, -34, -81, 117, 63, +-70, -50, -30, -27, -22, 124, -14, 123, -86, -66, -49, -22, -81, 122, -42, -77, +-38, -50, 63, -30, -15, -26, -61, -22, -85, -62, -90, -11, -29, -81, -89, 63, +-29, 66, -59, -95, 63, 63, 63, -67, 94, -19, -76, -86, -58, 63, 63, 63, +-84, -14, -78, -57, 63, -72, 97, 63, 63, 63, -65, 119, -19, -70, -16, 104, +-12, -87, 63, -81, -69, 63, -26, -30, -14, -83, -81, -57, -78, -49, -38, -14, +-75, -69, -72, 105, -70, -12, 63, -67, 109, -22, -43, -19, -34, -16, 118, -14, +-79, -7, 66, 63, 63, 63, 63, -38, -4, -81, -53, 63, -37, 67, -45, 100, +-29, 124, */ + +/* 1-BYTE: +windows-1250 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, -75, 63, 63, 63, 63, +-55, 63, 63, 63, 63, 63, 63, 63, -31, -28, -25, 63, -19, 63, -13, -10, +63, -4, 63, -61, -71, 63, 63, -49, -16, 63, 63, -52, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, -66, -93, -15, -46, 63, 63, -43, 63, 63, +-8, 63, -70, -34, -99, 63, 63, -39, -5, 63, 63, -97, -114, 63, 63, 63, + +windows-1251 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, -75, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, -127, -44, -11, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +windows-1252 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -86, -75, -70, -64, -61, -58, +-55, -52, -49, -46, -43, -40, -37, -34, -31, -28, -25, -22, -19, -16, -13, -10, +-7, -4, -1, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -100, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -114, 63, 63, 63, +63, 63, 63, -125, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +-120, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +windows-1253 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, -75, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -125, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, -94, -71, -68, -65, -62, -59, -56, -53, +-50, -47, -44, -41, -38, -35, -32, -29, -26, -23, -20, -17, -14, -11, -8, -5, +-2, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +windows-1254 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -86, -75, -70, -64, -61, -58, +-55, -52, -49, -46, -43, -40, -37, 63, -31, -28, -25, -22, -19, 63, -13, -10, +-7, -4, -1, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -100, 63, +63, 63, -2, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -125, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +windows-1255 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, -75, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -125, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +-120, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -32, -43, 63, + +windows-1256 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, -75, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -25, -22, 63, 63, 63, 63, +-7, -4, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -100, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -125, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +-120, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -63, +-34, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +windows-1257 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, -75, 63, 63, 63, -81, +-55, 63, 63, 63, -43, -88, 63, 63, 63, -28, 63, 63, 63, 63, -13, -10, +63, -4, 63, 63, -32, 63, 63, 63, 63, 63, -21, 63, 63, 63, -20, 63, +63, 63, -31, 63, 63, 63, -49, 63, -39, -15, 63, 63, -12, 63, 63, -86, +63, 63, 63, 63, 63, 63, -5, 63, 63, 63, 63, -22, -34, 63, 63, 63, + +windows-1258 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -86, -75, -70, -64, 63, -58, +-55, 63, -49, 63, 63, -40, -37, 63, -31, -28, -25, -22, -19, 63, -13, -10, +-7, -4, -1, -61, 63, 63, 63, 63, -16, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -100, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -125, 63, 63, 63, 63, -11, 63, 63, 63, 63, -3, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +-120, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + + + */ + +/* +Big5 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, -93, -68, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -93, 69, -93, +72, -93, 75, -93, 78, -93, 81, -93, 84, -93, 86, -93, 89, 63, 63, 63, +-93, 94, -93, 97, -93, 100, -93, 103, -93, 106, 63, -93, 111, -93, 114, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, -57, -68, -57, -34, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, +64, 63, -58, -74, -58, -41, 63, -57, 77, -57, 110, 63, -93, -87, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -92, 64, 63, -55, 64, +63, -36, -78, -91, -24, -92, -78, 63, -55, -77, 63, 63, -53, -53, 63, 63, +-85, 91, -83, -63, 63, -48, -36, 63, -44, 101, -40, 83, -74, -59, -71, -81, +63, -66, -88, -11, -63, -48, -34, 63, 63, -88, -26, -24, -7, 63, 63, -88, +-17, -48, -20, -71, -70, 63, 63, -74, -45, 63, 63, -91, 99, 63, 63, -31, +70, -92, -49, -91, 109, -90, 79, -54, 118, 63, -50, 77, 63, 63, 63, 63, +-48, -14, -80, -31, 63, 63, 63, 63, -36, -48, -71, -66, -71, -54, -27, 65, +63, -20, -57, 63, 63, -54, -87, 63, 63, 63, -87, 88, 63, 63, -47, 74, +-44, -76, -44, -62, -77, -13, 63, -36, -15, 63, -68, 88, -20, -53, 63, -91, +126, -90, 105, -82, 78, -90, 111, 63, -87, 100, -85, -72, -50, 105, -47, 99, +63, -44, -50, 63, -40, -71, 63, 63, -27, 95, -20, -44, -11, -56, 63, -90, +119, 63, -40, -46, -68, 101, -71, -17, 63, -85, -52, 63, -89, -62, 63, -50, +-89, -82, 115, 63, -40, -17, 63, 63, -27, 98, -64, -83, 63, 63, -85, -46, +-43, 69, -68, 109, -55, 121, 63, -76, 91, -68, 115, -89, -53, 63, -71, -5, +-47, 123, -85, -36, -76, 95, 63, -89, -42, -52, -82, -52, 122, 63, -82, -89, +-43, 82, -43, 94, 63, -73, 81, -40, -2, 63, -31, -43, -70, 66, 63, 63, +63, -14, 65, 63, -52, -78, -55, -28, -87, -45, 63, 63, 63, -50, -39, 63, +-47, -74, 63, -43, 115, -79, -64, -76, 124, -76, -86, -35, -74, -73, 104, -31, +-38, -27, -83, -27, -76, -68, -74, 63, -62, 89, -12, 78, 63, -79, -43, -27, +-67, -92, -26, -8, -16, 63, -87, -12, 63, 63, -79, -34, -76, -67, -31, -8, +-23, -75, 63, 63, -23, -67, 63, 63, -52, -38, 63, -50, -3, -84, 94, 63, +-47, -27, -82, -32, -43, -76, 63, -79, -24, -39, -58, -39, -79, -76, -44, -35, +-37, -73, -92, -73, -91, -30, 66, -70, 101, 63, 63, 63, -23, -52, 63, 63, +-20, -5, 63, -14, 77, 63, 63, -35, -9, -90, -71, 63, -27, -12, -23, -27, +-46, 64, -19, 77, -43, -33, -55, -2, 63, -88, 91, -86, 113, -51, 77, -82, +-11, -49, 123, -84, 119, 63, -81, 68, -82, -9, 63, -42, 68, 63, -75, 65, +-76, -7, -76, -17, 63, -73, -66, -34, 90, 63, -26, 83, -30, -71, 63, -26, +94, -68, -31, -23, -9, -27, -3, -19, 85, 63, -14, 100, -11, -43, -92, -11, +63, -84, -76, -46, 123, -78, 109, -42, 81, -38, 93, -34, 109, 63, -70, -78, +-26, 105, -22, 75, 63, 63, -81, 82, -38, 103, -42, 93, 63, -53, 98, 63, +-42, 103, 63, 63, -26, -95, -9, -23, -51, 102, -49, -54, 63, -42, 113, -75, +98, 63, -70, -65, -68, -3, 63, 63, -49, -40, -19, 114, -91, -48, 63, 63, +63, 63, -78, -86, -34, -47, 63, -65, 97, -16, 76, 63, -26, -69, 63, -34, +-41, -84, -34, -81, 117, 63, -70, -50, -30, -27, -22, 124, -14, 123, -86, -66, +-49, -22, -81, 122, -42, -77, -38, -50, 63, -30, -15, -26, -61, -22, -85, -62, +-90, -11, -29, -81, -89, 63, -29, 66, -59, -95, 63, 63, 63, -67, 94, -19, +-76, -86, -58, 63, 63, 63, -84, -14, -78, -57, 63, -72, 97, 63, 63, 63, +-65, 119, -19, -70, -16, 104, -12, -87, 63, -81, -69, 63, -26, -30, -14, -83, +-81, -57, -78, -49, -38, -14, -75, -69, -72, 105, -70, -12, 63, -67, 109, -22, +-43, -19, -34, -16, 118, -14, -79, -7, 66, 63, 63, 63, 63, -38, -4, -81, +-53, 63, -37, 67, -45, 100, -29, 124, */ + +/* 1-BYTE: +IBM864 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, -77, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +x-IBM874 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, -95, -62, -29, 63, 63, 63, 63, 63, 63, + */ + +/* +GB2312 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, -88, -94, 63, 63, -88, -70, -88, -86, +63, -88, -82, 63, -88, -76, -88, -71, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, -88, -83, 63, 63, 63, 63, 63, 63, 63, 63, 63, -88, -79, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -88, +-93, 63, -88, -77, 63, -88, -73, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, -91, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, -90, -94, -90, -91, -90, -88, -90, -85, +-90, -82, -90, -79, -90, -77, -90, -74, 63, 63, 63, -90, -61, -90, -58, -90, +-55, -90, -52, -90, -49, 63, -90, -44, -90, -41, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -89, -74, -89, +-25, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, -95, 63, -92, -78, -92, +-45, 63, -91, -75, -91, -42, 63, -88, -40, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, -46, -69, 63, 63, 63, 63, -70, -91, -58, -51, +63, 63, 63, 63, 63, 63, 63, -39, -34, -72, -87, 63, 63, 63, 63, 63, +63, -39, -46, 63, 63, 63, -75, -77, -47, -8, -59, -87, -39, -3, 63, -44, +-28, -55, -66, -74, -25, 63, 63, 63, 63, 63, 63, 63, -69, -36, 63, -47, +-71, 63, -73, -76, -74, -93, -64, -12, 63, 63, -33, -38, 63, -33, -44, -33, +-36, 63, 63, 63, 63, 63, 63, 63, -32, -61, -32, -43, -32, -67, 63, 63, +63, -49, -7, 63, 63, -44, -78, 63, 63, -37, -31, 63, -75, -26, 63, -36, +-92, 63, 63, 63, 63, -55, -54, 63, 63, 63, -51, -30, -46, -60, -34, -54, +-53, -3, 63, -58, -34, -67, -86, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -80, -78, -49, -36, 63, 63, 63, 63, -58, -63, 63, -31, -81, +63, 63, 63, 63, 63, 63, 63, -31, -41, 63, -25, -35, 63, -75, -37, 63, +63, -30, -49, 63, 63, 63, -59, -86, -61, -42, 63, 63, -70, -36, 63, 63, +-65, -20, 63, 63, 63, -49, -94, 63, -29, -83, 63, -49, -21, 63, 63, 63, +-65, -74, 63, 63, 63, 63, 63, -20, -26, 63, -77, -48, -65, -39, 63, -62, +-93, 63, -68, -73, -51, -79, 63, -74, -34, -51, -58, -56, -32, -66, -66, -34, +-11, -80, -31, 63, 63, 63, -41, -85, 63, 63, 63, -22, -73, -21, -73, 63, +-74, -73, 63, 63, -51, -6, 63, -42, -25, 63, -63, -64, 63, 63, 63, 63, +63, 63, -64, -76, 63, -24, -59, 63, -24, -47, -24, -48, 63, -41, -64, 63, +63, -52, -35, 63, -64, -30, -67, -73, 63, -48, -88, 63, 63, -56, -74, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, -69, -74, -20, -90, -76, -53, 63, +63, 63, 63, 63, -21, -76, 63, 63, 63, -66, -38, 63, -52, -87, 63, -42, +-34, -59, -88, -44, -95, -52, -23, 63, 63, 63, 63, -61, -20, -43, -65, 63, +63, 63, -28, -39, 63, 63, 63, 63, -77, -50, 63, 63, 63, 63, 63, 63, +-69, -16, 63, -52, -65, 63, -49, -87, -20, -55, -20, -51, 63, -20, -50, -56, +-37, -20, -40, 63, 63, 63, -75, -7, 63, 63, 63, 63, -60, -4, 63, 63, +63, 63, 63, 63, 63, 63, 63, -25, -5, 63, 63, -24, -80, 63, 63, -50, +-51, -22, -76, -52, -17, 63, -18, -76, 63, -16, -30, -70, -37, 63, -16, -7, +-56, -77, 63, 63, 63, 63, 63, -74, -36, -43, -26, -41, -59, -53, -81, 63, +63, 63, -42, -86, 63, -43, -24, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, -20, -4, 63, 63, 63, -16, -94, 63, -15, -73, 63, 63, 63, -13, +-60, -13, -41, 63, -13, -34, 63, -13, -18, 63, 63, 63, -12, -93, 63, 63, +-73, -37, -73, -32, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -73, -60, -25, -83, -41, -37, -73, -20, 63, -18, -71, 63, -49, +-37, 63, 63, */ + +/* +EUC-JP +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -113, -94, -20, 63, -113, -94, +-21, -113, -86, -94, -113, -86, -86, -113, -87, -95, -113, -86, -79, -113, -86, -64, +-113, -86, -63, -113, -86, -46, -113, -86, -40, -113, -87, -84, -113, -86, -27, -113, +-87, -80, -113, -85, -95, -113, -85, -93, -113, -85, -82, -113, -85, -76, -113, -85, +-65, -113, -87, -61, -113, -85, -47, -113, -85, -45, -113, -85, -29, -113, -85, -28, +-113, -85, -13, -113, -86, -91, -113, -85, -88, -113, -86, -84, -113, -85, -81, -113, +-86, -80, -113, -87, -62, 63, -113, -85, -74, -113, -86, -75, -113, -85, -70, -113, +-86, -67, 63, -113, -87, -92, -113, -85, -57, 63, -113, -85, -58, -113, -87, -90, +-113, -85, -56, -113, -87, -57, -113, -86, -52, -113, -85, -53, -113, -87, -88, -113, +-85, -51, -113, -86, -50, -113, -87, -85, -113, -85, -41, -113, -86, -42, -113, -87, +-51, -113, -86, -37, -113, -85, -38, -113, -86, -35, -113, -85, -33, -113, -86, -31, +-113, -85, -32, -113, -86, -20, -113, -85, -23, -113, -86, -21, -113, -85, -24, -113, +-86, -15, -113, -85, -12, -113, -85, -11, -113, -86, -10, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, -113, -85, -90, -113, -86, -43, -113, -85, -25, -113, -86, +-19, -113, -85, -17, 63, 63, 63, 63, 63, 63, 63, 63, -113, -85, -71, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, -113, -90, -31, -113, -90, -29, -113, -90, -25, -113, -90, -20, -90, -94, +-90, -91, -90, -88, -90, -85, -90, -82, -90, -79, -90, -77, -90, -74, -113, -90, +-27, -113, -90, -14, -113, -90, -5, -90, -61, -90, -58, -90, -55, -90, -52, -90, +-49, -113, -90, -8, -90, -44, -90, -41, -113, -90, -6, -113, -90, -4, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -113, -89, +-61, -89, -74, -89, -25, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, -95, +63, -92, -78, -92, -45, 63, -91, -75, -91, -42, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, -80, -20, -50, -66, -48, -87, -113, +-80, -74, 63, -80, -25, -48, -67, 63, -113, -80, -43, 63, 63, 63, -113, -79, +-92, -53, -7, -48, -39, -48, -19, -113, -79, -48, 63, -113, -79, -24, 63, -113, +-78, -93, -70, -60, -47, -91, 63, -48, -42, -113, -78, -28, -59, -34, 63, 63, +-47, -40, -113, -77, -88, 63, 63, 63, 63, -77, -60, -113, -77, -39, -60, -68, +-46, -85, 63, -113, -76, -85, -46, -61, 63, 63, 63, -56, -65, -46, -38, -51, +-7, 63, -58, -35, 63, 63, 63, 63, -113, -75, -63, 63, -45, -71, 63, 63, +63, 63, 63, -45, -43, 63, -113, -74, -66, -113, -74, -54, 63, 63, 63, -113, +-74, -8, 63, -80, -75, 63, -44, -80, 63, 63, -113, -73, -23, -113, -73, -14, +63, -12, -95, -113, -72, -79, 63, 63, -54, -81, -113, -72, -41, 63, -77, -80, +-80, -48, -44, -7, -113, -71, -91, 63, -70, -54, -43, -86, 63, -113, -71, -45, +63, 63, 63, -113, -71, -12, 63, 63, 63, 63, 63, -113, -70, -64, -80, -62, +63, 63, 63, -43, -12, -113, -70, -14, -42, -94, -113, -69, -94, -42, -86, -113, +-69, -75, 63, -113, -69, -63, -42, -67, 63, 63, 63, -113, -69, -20, -50, -26, +-42, -33, 63, -60, -21, -113, -68, -79, -42, -16, -113, -68, -62, 63, -42, -5, +-41, -94, -49, -82, -52, -17, 63, -113, -68, -2, -41, -52, -55, -4, 63, -78, +-9, 63, -113, -67, -37, 63, -62, -87, 63, -113, -67, -3, 63, -63, -37, -113, +-66, -64, -113, -66, -53, 63, -40, -51, -113, -66, -28, -113, -66, -18, 63, 63, +-113, -65, -86, -113, -65, -78, -39, -86, -66, -75, 63, 63, 63, -113, -65, -37, +63, 63, -113, -65, -7, -113, -64, -89, -65, -28, -39, -26, -113, -64, -64, 63, +-56, -62, 63, 63, -113, -64, -18, -64, -15, -113, -63, -88, -38, -77, -113, -63, +-69, -38, -67, -38, -59, 63, -59, -51, 63, -38, -38, -78, -94, 63, -61, -21, +-38, -20, -113, -62, -61, -113, -62, -42, -113, -62, -33, 63, 63, 63, 63, -51, +-24, 63, 63, -113, -61, -67, -37, -51, 63, -37, -31, -113, -61, -37, 63, 63, +-60, -12, -113, -60, -95, -113, -60, -81, -36, -91, -113, -60, -66, -36, -72, -74, +-53, -113, -60, -40, -113, -60, -31, -51, -51, -36, -33, -113, -60, -8, -113, -59, +-93, 63, 63, -113, -59, -64, -113, -59, -54, 63, 63, 63, -35, -67, -70, -95, +-113, -58, -93, 63, 63, 63, -113, -58, -58, 63, -113, -58, -39, 63, -35, -20, +-35, -4, -113, -58, -7, -62, -39, -113, -57, -80, -67, -89, 63, -51, -31, -34, +-72, 63, 63, 63, -34, -46, -34, -35, -61, -71, 63, -71, -62, 63, 63, 63, +63, 63, 63, -64, -95, -113, -56, -15, -33, -71, 63, 63, 63, -113, -55, -69, +-78, -48, 63, -61, -70, 63, 63, 63, -113, -55, -16, -113, -55, -7, 63, -51, +-48, 63, -113, -54, -72, 63, 63, -113, -54, -52, -113, -54, -41, -113, -54, -29, +63, 63, 63, 63, 63, 63, 63, -113, -53, -49, 63, -113, -53, -24, -113, -53, +-11, -113, -52, -91, -113, -52, -84, 63, -32, -11, -32, -8, 63, 63, -31, -91, +63, -59, -60, -56, -86, 63, -113, -51, -57, -113, -51, -51, -70, -81, 63, 63, +-113, -51, -3, -113, -50, -84, -56, -81, -113, -50, -70, 63, 63, -67, -30, -65, +-65, -61, -27, -65, -25, 63, 63, 63, -61, -50, -113, -49, -49, -75, -50, -113, +-49, -32, 63, -113, -49, -17, 63, -113, -48, -89, 63, -63, -61, 63, -51, -76, +63, 63, -29, -70, -113, -48, -6, 63, 63, -29, -51, 63, -29, -42, 63, -113, +-47, -30, -50, -75, -113, -47, -15, -29, -6, -113, -46, -92, -113, -46, -86, 63, +63, 63, -58, -58, 63, -113, -46, -22, 63, 63, -54, -76, 63, 63, 63, -57, +-68, -27, -89, -27, -78, -113, -45, -19, -113, -45, -5, -52, -42, 63, -50, -3, +-113, -44, -62, -113, -44, -51, 63, -113, -44, -34, 63, 63, 63, 63, 63, -113, +-44, -18, -26, -86, -113, -43, -91, -113, -43, -82, 63, -113, -43, -67, */ + +/* 1-BYTE: +KOI8-R +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, -26, -56, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + +x-MacRoman +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -69, -75, -68, -53, -52, -82, +-125, -19, -20, -15, -51, -81, -13, 63, -121, -118, -115, -112, -110, 63, -105, -102, +-99, -97, -40, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -49, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -60, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +-10, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + */ + +/* +GBK +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, -88, -94, 63, 63, -88, -70, -88, -86, +63, -88, -82, 63, -88, -76, -88, -71, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -88, +-67, 63, 63, -88, -83, 63, 63, 63, 63, 63, 63, 63, 63, 63, -88, -79, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +-88, -93, 63, -88, -77, 63, -88, -73, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, -91, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, -90, -94, -90, -91, -90, -88, -90, +-85, -90, -82, -90, -79, -90, -77, -90, -74, 63, 63, 63, -90, -61, -90, -58, +-90, -55, -90, -52, -90, -49, 63, -90, -44, -90, -41, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -89, -74, +-89, -25, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, -95, 63, -92, -78, +-92, -45, 63, -91, -75, -91, -42, 63, -88, -40, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, -46, -69, -127, 73, -127, 86, -127, 96, -127, +123, -70, -91, -58, -51, -127, -97, -127, -78, -127, -65, -127, -45, -127, -34, -127, +-16, -126, 66, -39, -34, -72, -87, -126, -126, -126, -109, -126, -85, -126, -57, -126, +-33, -126, -7, -39, -46, -125, 112, -125, -115, -125, -83, -75, -77, -47, -8, -59, +-87, -39, -3, -124, 68, -44, -28, -55, -66, -74, -25, -124, -122, -124, -99, -124, +-77, -124, -56, -124, -32, -124, -7, -123, 77, -69, -36, -123, 109, -47, -71, -123, +-111, -73, -76, -74, -93, -64, -12, -123, -58, -123, -41, -33, -38, -123, -9, -33, +-44, -33, -36, -122, 95, -122, 116, -122, -120, -122, -99, -122, -80, -122, -65, -122, +-42, -32, -61, -32, -43, -32, -67, -121, 101, -121, 126, -121, -107, -49, -7, -121, +-50, -121, -29, -44, -78, -120, 82, -120, 99, -37, -31, -120, -124, -75, -26, -120, +-80, -36, -92, -120, -39, -120, -14, -119, 79, -119, 105, -55, -54, -119, -98, -119, +-69, -119, -43, -51, -30, -46, -60, -34, -54, -53, -3, -118, 118, -58, -34, -67, +-86, -118, -71, -118, -52, -118, -29, -118, -2, -117, 87, -117, 117, -117, -113, -117, +-90, -117, -61, -117, -31, -117, -2, -116, 78, -80, -78, -49, -36, -116, 123, -116, +-110, -116, -90, -116, -71, -58, -63, -116, -37, -31, -81, -115, 68, -115, 91, -115, +115, -115, -114, -115, -91, -115, -64, -115, -39, -31, -41, -114, 88, -25, -35, -114, +-121, -75, -37, -114, -86, -114, -61, -30, -49, -114, -27, -114, -5, -113, 86, -59, +-86, -61, -42, -113, -107, -113, -86, -70, -36, -113, -51, -113, -30, -65, -20, -112, +67, -112, 80, -112, 103, -49, -94, -112, -118, -29, -83, -112, -78, -49, -21, -112, +-42, -112, -18, -111, 73, -65, -74, -111, -126, -111, -99, -111, -74, -111, -43, -111, +-28, -20, -26, -110, 73, -77, -48, -65, -39, -110, 126, -62, -93, -110, -108, -68, +-73, -51, -79, -110, -51, -74, -34, -51, -58, -56, -32, -66, -66, -34, -11, -80, +-31, -109, -103, -109, -77, -109, -51, -41, -85, -109, -8, -108, 83, -108, 113, -22, +-73, -21, -73, -108, -76, -74, -73, -108, -31, -108, -13, -51, -6, -107, 90, -42, +-25, -107, -125, -63, -64, -107, -80, -107, -53, -107, -24, -107, -3, -106, 83, -106, +101, -64, -76, -106, -119, -24, -59, -106, -82, -24, -47, -24, -48, -106, -25, -41, +-64, -105, 70, -105, 96, -52, -35, -105, -110, -64, -30, -67, -73, -105, -36, -48, +-88, -104, 79, -104, 98, -56, -74, -104, -108, -104, -80, -104, -52, -104, -26, -103, +64, -103, 92, -103, 119, -103, -107, -103, -74, -103, -41, -69, -74, -20, -90, -76, +-53, -102, 125, -102, -109, -102, -85, -102, -64, -102, -41, -21, -76, -102, -11, -101, +72, -101, 90, -66, -38, -101, 123, -52, -87, -101, -102, -42, -34, -59, -88, -44, +-95, -52, -23, -101, -15, -100, 72, -100, 91, -100, 111, -61, -20, -43, -65, -100, +-72, -100, -49, -100, -30, -28, -39, -99, 78, -99, 103, -99, 126, -99, -104, -77, +-50, -99, -54, -99, -27, -98, 65, -98, 96, -98, 125, -98, -99, -69, -16, -98, +-51, -52, -65, -98, -12, -49, -87, -20, -55, -20, -51, -97, -104, -20, -50, -56, +-37, -20, -40, -96, 64, -96, 93, -96, 124, -75, -7, -96, -86, -96, -67, -96, +-44, -96, -21, -60, -4, -86, 80, -86, 101, -86, 119, -86, -108, -85, 80, -85, +103, -85, 124, -85, -109, -84, 76, -25, -5, -84, 122, -84, -108, -24, -80, -83, +100, -83, -123, -50, -51, -22, -76, -52, -17, -82, 120, -18, -76, -81, 71, -16, +-30, -70, -37, -81, 116, -16, -7, -56, -77, -80, 80, -80, 107, -80, 126, -80, +-101, -79, 74, -74, -36, -43, -26, -41, -59, -53, -81, -78, 88, -78, 111, -78, +-122, -42, -86, -77, 81, -43, -24, -77, 115, -77, -115, -76, 68, -76, 86, -76, +107, -76, -121, -75, 65, -75, 95, -75, 118, -75, -120, -75, -96, -20, -4, -74, +112, -74, -122, -74, -100, -16, -94, -73, 110, -15, -73, -73, -100, -72, 82, -72, +111, -13, -60, -13, -41, -71, 74, -13, -34, -71, 114, -13, -18, -71, -97, -70, +86, -70, 111, -12, -93, -69, 68, -69, 100, -73, -37, -73, -32, -68, 71, -68, +94, -68, 123, -68, -103, -67, 88, -67, 120, -67, -103, -66, 87, -66, 120, -66, +-102, -65, 90, -65, 123, -65, -102, -64, 90, -64, 122, -73, -60, -25, -83, -41, +-37, -73, -20, -64, -112, -18, -71, -63, 91, -49, -37, -63, -119, -63, -96, */ + +/* +GB2312 +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, -88, -94, 63, 63, -88, -70, -88, -86, +63, -88, -82, 63, -88, -76, -88, -71, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, -88, -83, 63, 63, 63, 63, 63, 63, 63, 63, 63, -88, -79, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -88, +-93, 63, -88, -77, 63, -88, -73, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, -91, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, -90, -94, -90, -91, -90, -88, -90, -85, +-90, -82, -90, -79, -90, -77, -90, -74, 63, 63, 63, -90, -61, -90, -58, -90, +-55, -90, -52, -90, -49, 63, -90, -44, -90, -41, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -89, -74, -89, +-25, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, -95, 63, -92, -78, -92, +-45, 63, -91, -75, -91, -42, 63, -88, -40, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, -46, -69, 63, 63, 63, 63, -70, -91, -58, -51, +63, 63, 63, 63, 63, 63, 63, -39, -34, -72, -87, 63, 63, 63, 63, 63, +63, -39, -46, 63, 63, 63, -75, -77, -47, -8, -59, -87, -39, -3, 63, -44, +-28, -55, -66, -74, -25, 63, 63, 63, 63, 63, 63, 63, -69, -36, 63, -47, +-71, 63, -73, -76, -74, -93, -64, -12, 63, 63, -33, -38, 63, -33, -44, -33, +-36, 63, 63, 63, 63, 63, 63, 63, -32, -61, -32, -43, -32, -67, 63, 63, +63, -49, -7, 63, 63, -44, -78, 63, 63, -37, -31, 63, -75, -26, 63, -36, +-92, 63, 63, 63, 63, -55, -54, 63, 63, 63, -51, -30, -46, -60, -34, -54, +-53, -3, 63, -58, -34, -67, -86, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -80, -78, -49, -36, 63, 63, 63, 63, -58, -63, 63, -31, -81, +63, 63, 63, 63, 63, 63, 63, -31, -41, 63, -25, -35, 63, -75, -37, 63, +63, -30, -49, 63, 63, 63, -59, -86, -61, -42, 63, 63, -70, -36, 63, 63, +-65, -20, 63, 63, 63, -49, -94, 63, -29, -83, 63, -49, -21, 63, 63, 63, +-65, -74, 63, 63, 63, 63, 63, -20, -26, 63, -77, -48, -65, -39, 63, -62, +-93, 63, -68, -73, -51, -79, 63, -74, -34, -51, -58, -56, -32, -66, -66, -34, +-11, -80, -31, 63, 63, 63, -41, -85, 63, 63, 63, -22, -73, -21, -73, 63, +-74, -73, 63, 63, -51, -6, 63, -42, -25, 63, -63, -64, 63, 63, 63, 63, +63, 63, -64, -76, 63, -24, -59, 63, -24, -47, -24, -48, 63, -41, -64, 63, +63, -52, -35, 63, -64, -30, -67, -73, 63, -48, -88, 63, 63, -56, -74, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, -69, -74, -20, -90, -76, -53, 63, +63, 63, 63, 63, -21, -76, 63, 63, 63, -66, -38, 63, -52, -87, 63, -42, +-34, -59, -88, -44, -95, -52, -23, 63, 63, 63, 63, -61, -20, -43, -65, 63, +63, 63, -28, -39, 63, 63, 63, 63, -77, -50, 63, 63, 63, 63, 63, 63, +-69, -16, 63, -52, -65, 63, -49, -87, -20, -55, -20, -51, 63, -20, -50, -56, +-37, -20, -40, 63, 63, 63, -75, -7, 63, 63, 63, 63, -60, -4, 63, 63, +63, 63, 63, 63, 63, 63, 63, -25, -5, 63, 63, -24, -80, 63, 63, -50, +-51, -22, -76, -52, -17, 63, -18, -76, 63, -16, -30, -70, -37, 63, -16, -7, +-56, -77, 63, 63, 63, 63, 63, -74, -36, -43, -26, -41, -59, -53, -81, 63, +63, 63, -42, -86, 63, -43, -24, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, -20, -4, 63, 63, 63, -16, -94, 63, -15, -73, 63, 63, 63, -13, +-60, -13, -41, 63, -13, -34, 63, -13, -18, 63, 63, 63, -12, -93, 63, 63, +-73, -37, -73, -32, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, -73, -60, -25, -83, -41, -37, -73, -20, 63, -18, -71, 63, -49, +-37, 63, 63, */ + +/* +EUC-KR +9, 12, 28, 31, 48, 51, 54, 57, 65, 68, 71, 74, 77, 80, 83, 86, +89, 97, 100, 103, 106, 109, 112, 115, 118, 121, -88, -93, 63, -88, -84, 63, +63, -88, -95, 63, 63, 63, 63, 63, -88, -86, 63, -88, -83, 63, 63, 63, +63, 63, -87, -93, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -87, -94, +63, 63, 63, 63, 63, 63, -88, -92, 63, 63, 63, -88, -90, 63, -87, -89, +63, 63, -88, -87, 63, 63, -88, -81, 63, 63, -87, -85, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, -91, -62, -91, -59, -91, -56, -91, +-53, -91, -50, -91, -47, -91, -45, -91, -42, 63, 63, 63, -91, -29, -91, -26, +-91, -23, -91, -20, -91, -17, 63, -91, -12, -91, -9, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -84, -74, +-84, -25, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, -95, -95, 63, -86, -78, +-86, -45, 63, -85, -75, -85, -42, 63, 63, -92, -87, -92, -54, -92, -21, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, -20, -23, 63, -25, -47, 63, 63, +-6, -92, 63, 63, 63, 63, 63, 63, 63, 63, -16, -69, -36, -10, 63, 63, +63, 63, 63, -13, -16, -3, -22, 63, 63, 63, 63, 63, 63, -42, -87, -3, +-21, 63, 63, 63, 63, -4, -15, -48, -62, -10, -49, 63, 63, 63, -3, -63, +63, 63, 63, -38, -29, 63, -41, -39, 63, -9, -94, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, -15, -77, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, 63, 63, -24, -21, 63, 63, 63, -35, -59, +63, 63, -24, -30, -20, -88, 63, 63, 63, -12, -93, -53, -87, 63, 63, 63, +63, 63, 63, 63, 63, -5, -5, 63, 63, 63, -28, -52, 63, 63, -50, -80, +-45, -33, 63, 63, 63, -19, -44, 63, 63, -6, -42, 63, 63, 63, 63, 63, +-42, -70, 63, 63, -16, -88, 63, -10, -70, 63, 63, -33, -53, -50, -58, -42, +-25, 63, 63, -23, -18, 63, -36, -42, 63, -10, -31, 63, 63, 63, -29, -45, +63, 63, 63, -33, -52, 63, 63, 63, -53, -81, -3, -13, 63, 63, 63, 63, +63, 63, -29, -81, 63, 63, 63, 63, 63, 63, 63, 63, -11, -49, 63, 63, +63, -38, -26, 63, 63, 63, -13, -68, 63, -12, -83, 63, 63, 63, 63, -44, +-32, 63, 63, -24, -38, 63, 63, -15, -72, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, -49, -81, 63, 63, 63, -14, -51, 63, -16, -84, 63, 63, +-11, -95, 63, -32, -37, -48, -65, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, -13, -82, 63, 63, 63, 63, 63, 63, 63, 63, 63, +-18, -63, 63, -9, -63, -36, -57, -15, -67, 63, -23, -79, -12, -15, 63, 63, +-12, -24, -4, -71, -39, -35, -45, -64, 63, -49, -75, 63, 63, 63, 63, 63, +63, -13, -91, 63, 63, 63, 63, 63, 63, -5, -3, 63, -9, -87, 63, 63, +63, 63, 63, 63, -23, -62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, 63, 63, 63, 63, 63, 63, -6, -64, -30, -81, -51, -28, 63, -40, -91, +-19, -16, 63, 63, -24, -73, 63, -17, -93, -17, -91, 63, 63, 63, -3, -35, +63, 63, 63, 63, 63, 63, 63, 63, -30, -22, 63, -13, -73, -30, -78, 63, +63, 63, -14, -79, 63, -10, -37, 63, 63, 63, 63, 63, 63, -11, -88, 63, +-23, -34, 63, 63, -27, -52, 63, 63, 63, -14, -61, 63, -49, -30, 63, 63, +63, 63, -9, -62, 63, -48, -75, 63, 63, 63, -44, -65, 63, 63, 63, 63, +-35, -49, 63, 63, 63, -46, -95, -13, -49, 63, 63, 63, -40, -47, 63, -42, +-93, -24, -78, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, +63, */ + + +/* +~/ddeclipse/dalvik$ ./run-core-tests.sh tests.api.java.nio.charset.Charset_DomainEndToEnd_Test +mode: simulator +Running selected tests... +.US-ASCII MaxBytes = 1.0 + - IBM367 + - iso_646.irv:1983 + - csASCII + - US-ASCII + - ascii7 + - cp367 + - windows-20127 + - ASCII + - ANSI_X3.4-1986 + - 646 + - ISO646-US + - ANSI_X3.4-1968 + - iso-ir-6 + - ibm-367 + - ISO_646.irv:1991 + - us +UTF-8 MaxBytes = 3.0 + - ibm-17593 + - ibm-1208 + - UTF-8 + - ibm-1209 + - cp1208 + - ibm-13496 + - ibm-13497 + - windows-65001 + - ibm-5304 + - ibm-5305 + - ibm-17592 +UTF-16 MaxBytes = 2.0 + - ucs-2 + - UTF-16 + - csUnicode + - unicode + - ibm-1204 + - ISO-10646-UCS-2 + - ibm-1205 +UTF-16BE MaxBytes = 2.0 + - x-utf-16be + - ibm-61955 + - ibm-61956 + - UTF16_BigEndian + - windows-1201 + - cp1200 + - UTF-16BE + - cp1201 + - ibm-17584 + - ibm-17585 + - ibm-21680 + - ibm-21681 + - ibm-13488 + - ibm-1200 + - ibm-13489 + - ibm-25776 + - ibm-1201 + - ibm-25777 +UTF-16LE MaxBytes = 2.0 + - UTF16_LittleEndian + - UTF-16LE + - windows-1200 + - ibm-13490 + - ibm-13491 + - ibm-17586 + - ibm-17587 + - ibm-21682 + - x-utf-16le + - ibm-21683 + - ibm-1202 + - ibm-25778 + - ibm-1203 + - ibm-25779 +ISO-8859-1 MaxBytes = 1.0 + - 819 + - ISO-8859-1 + - csISOLatin1 + - cp819 + - l1 + - iso-ir-100 + - 8859_1 + - ibm-819 + - IBM819 + - latin1 + - ISO_8859-1:1987 +ISO-8859-2 MaxBytes = 1.0 + - ISO-8859-2 + - ibm-912 + - ibm-912_P100-1995 + - csISOLatin2 + - l2 + - iso-ir-101 + - 8859_2 + - 912 + - cp912 + - windows-28592 + - latin2 + - ISO_8859-2:1987 +ISO-8859-3 MaxBytes = 1.0 + - ISO-8859-3 + - ibm-913 + - csISOLatin3 + - l3 + - 8859_3 + - 913 + - ibm-913_P100-2000 + - cp913 + - iso-ir-109 + - ISO_8859-3:1988 + - windows-28593 + - latin3 +ISO-8859-4 MaxBytes = 1.0 + - windows-28594 + - latin4 + - ISO-8859-4 + - ibm-914 + - iso-ir-110 + - ibm-914_P100-1995 + - csISOLatin4 + - l4 + - 8859_4 + - 914 + - ISO_8859-4:1988 + - cp914 +ISO-8859-5 MaxBytes = 1.0 + - cp915 + - windows-28595 + - ISO-8859-5 + - ibm-915 + - iso-ir-144 + - ibm-915_P100-1995 + - csISOLatinCyrillic + - cyrillic + - 8859_5 + - ISO_8859-5:1988 + - 915 +ISO-8859-6 MaxBytes = 1.0 + - 1089 + - windows-28596 + - ASMO-708 + - ibm-1089_P100-1995 + - arabic + - ISO-8859-6-E + - cp1089 + - ISO-8859-6-I + - ISO-8859-6 + - ibm-1089 + - ECMA-114 + - iso-ir-127 + - ISO_8859-6:1987 + - csISOLatinArabic + - 8859_6 +ISO-8859-7 MaxBytes = 1.0 + - greek + - ibm-9005_X110-2007 + - csISOLatinGreek + - windows-28597 + - sun_eu_greek + - ibm-9005 + - ISO-8859-7 + - greek8 + - ISO_8859-7:1987 + - iso-ir-126 + - ELOT_928 + - ECMA-118 +ISO-8859-8 MaxBytes = 1.0 + - ISO-8859-8-I + - windows-28598 + - ibm-5012 + - ISO-8859-8 + - ISO_8859-8:1988 + - iso-ir-138 + - ibm-5012_P100-1999 + - 8859_8 + - csISOLatinHebrew + - ISO-8859-8-E + - hebrew +ISO-8859-8 MaxBytes = 1.0 + - ISO-8859-8-I + - windows-28598 + - ibm-5012 + - ISO-8859-8 + - ISO_8859-8:1988 + - iso-ir-138 + - ibm-5012_P100-1999 + - 8859_8 + - csISOLatinHebrew + - ISO-8859-8-E + - hebrew +ISO-8859-9 MaxBytes = 1.0 + - windows-28599 + - csISOLatin5 + - l5 + - cp920 + - ibm-920_P100-1995 + - latin5 + - 920 + - ISO-8859-9 + - iso-ir-148 + - ISO_8859-9:1989 + - ECMA-128 + - ibm-920 + - 8859_9 +ISO-8859-10 MaxBytes = 1.0 + - ISO-8859-10 + - latin6 + - iso-8859_10-1998 + - csISOLatin6 + - iso-ir-157 + - l6 + - ISO_8859-10:1992 +x-iso-8859_11-2001 MaxBytes = 1.0 + - ISO-8859-11 + - iso-8859_11-2001 + - thai8 +ISO-8859-13 MaxBytes = 1.0 + - ibm-921_P100-1995 + - ISO-8859-13 + - 921 + - windows-28603 + - cp921 + - 8859_13 + - ibm-921 +ISO-8859-14 MaxBytes = 1.0 + - latin8 + - ISO-8859-14 + - iso-ir-199 + - l8 + - iso-celtic + - iso-8859_14-1998 + - ISO_8859-14:1998 +ISO-8859-15 MaxBytes = 1.0 + - ibm-923 + - csisolatin0 + - ISO-8859-15 + - csisolatin9 + - windows-28605 + - latin0 + - l9 + - iso8859_15_fdis + - cp923 + - Latin-9 + - ibm-923_P100-1998 + - 923 + - 8859_15 +ISO-8859-16 MaxBytes = 1.0 + - latin10 + - iso-8859_16-2001 + - ISO_8859-16:2001 + - ISO-8859-16 + - iso-ir-226 + - l10 +ISO-2022-JP MaxBytes = 6.0 + - csISO2022JP + - ISO-2022-JP +Big5 MaxBytes = 2.0 + - windows-950-2000 + - csBig5 + - Big5 + - x-big5 + - windows-950 +windows-1250 MaxBytes = 1.0 + - windows-1250 + - cp1250 + - ibm-5346 + - ibm-5346_P100-1998 +windows-1251 MaxBytes = 1.0 + - ANSI1251 + - windows-1251 + - cp1251 + - ibm-5347 + - ibm-5347_P100-1998 +windows-1252 MaxBytes = 1.0 + - windows-1252 + - cp1252 + - ibm-5348 + - ibm-5348_P100-1997 +windows-1253 MaxBytes = 1.0 + - ibm-5349_P100-1998 + - windows-1253 + - cp1253 + - ibm-5349 +windows-1254 MaxBytes = 1.0 + - ibm-5350 + - ibm-5350_P100-1998 + - windows-1254 + - cp1254 +windows-1255 MaxBytes = 1.0 + - ibm-9447_P100-2002 + - ibm-9447 + - windows-1255 + - cp1255 +windows-1256 MaxBytes = 1.0 + - ibm-9448_X100-2005 + - ibm-9448 + - windows-1256 + - cp1256 +windows-1257 MaxBytes = 1.0 + - cp1257 + - ibm-9449_P100-2002 + - ibm-9449 + - windows-1257 +windows-1258 MaxBytes = 1.0 + - cp1258 + - ibm-5354 + - ibm-5354_P100-1998 + - windows-1258 +Big5 MaxBytes = 2.0 + - windows-950-2000 + - csBig5 + - Big5 + - x-big5 + - windows-950 +cp864 MaxBytes = 1.0 + - csIBM864 + - IBM864 + - cp864 + - ibm-864_X110-1999 + - ibm-864 +TIS-620 MaxBytes = 1.0 + - ibm-9066 + - TIS-620 + - eucTH + - cp874 + - tis620.2533 + - ibm-874 + - ibm-874_P100-1995 +GBK MaxBytes = 2.0 + - EUC-CN + - csISO58GB231280 + - chinese + - csGB2312 + - CP936 + - GBK + - gb2312-1980 + - windows-936 + - MS936 + - windows-936-2000 + - GB2312 + - iso-ir-58 + - GB_2312-80 +EUC-JP MaxBytes = 3.0 + - EUC-JP + - ibm-954_P101-2007 + - eucjis + - X-EUC-JP + - csEUCPkdFmtJapanese + - Extended_UNIX_Code_Packed_Format_for_Japanese + - ujis + - ibm-954 +KOI8-R MaxBytes = 1.0 + - windows-20866 + - ibm-878 + - ibm-878_P100-1996 + - koi8 + - KOI8-R + - cp878 + - csKOI8R +macintosh MaxBytes = 1.0 + - csMacintosh + - macintosh + - windows-10000 + - macos-0_2-10.2 + - mac +GBK MaxBytes = 2.0 + - EUC-CN + - csISO58GB231280 + - chinese + - csGB2312 + - CP936 + - GBK + - gb2312-1980 + - windows-936 + - MS936 + - windows-936-2000 + - GB2312 + - iso-ir-58 + - GB_2312-80 +GBK MaxBytes = 2.0 + - EUC-CN + - csISO58GB231280 + - chinese + - csGB2312 + - CP936 + - GBK + - gb2312-1980 + - windows-936 + - MS936 + - windows-936-2000 + - GB2312 + - iso-ir-58 + - GB_2312-80 +EUC-KR MaxBytes = 2.0 + - KS_C_5601-1989 + - EUC-KR + - 5601 + - korean + - csKSC56011987 + - windows-949 + - KSC_5601 + - windows-949-2000 + - ms949 + - csEUCKR + - iso-ir-149 + - KS_C_5601-1987 +Big5 + - windows-950-2000 + - csBig5 + - Big5 + - x-big5 + - windows-950 +BOCU-1 + - csBOCU-1 + - BOCU-1 + - ibm-1214 + - ibm-1215 +CESU-8 + - ibm-9400 + - CESU-8 +cp864 + - csIBM864 + - IBM864 + - cp864 + - ibm-864_X110-1999 + - ibm-864 +EUC-JP + - EUC-JP + - ibm-954_P101-2007 + - eucjis + - X-EUC-JP + - csEUCPkdFmtJapanese + - Extended_UNIX_Code_Packed_Format_for_Japanese + - ujis + - ibm-954 +EUC-KR + - KS_C_5601-1989 + - EUC-KR + - 5601 + - korean + - csKSC56011987 + - windows-949 + - KSC_5601 + - windows-949-2000 + - ms949 + - csEUCKR + - iso-ir-149 + - KS_C_5601-1987 +GBK + - EUC-CN + - csISO58GB231280 + - chinese + - csGB2312 + - CP936 + - GBK + - gb2312-1980 + - windows-936 + - MS936 + - windows-936-2000 + - GB2312 + - iso-ir-58 + - GB_2312-80 +HZ-GB-2312 + - HZ + - HZ-GB-2312 +ISO-2022-JP + - csISO2022JP + - ISO-2022-JP +ISO-8859-1 + - 819 + - ISO-8859-1 + - csISOLatin1 + - cp819 + - l1 + - iso-ir-100 + - 8859_1 + - ibm-819 + - IBM819 + - latin1 + - ISO_8859-1:1987 +ISO-8859-10 + - ISO-8859-10 + - latin6 + - iso-8859_10-1998 + - csISOLatin6 + - iso-ir-157 + - l6 + - ISO_8859-10:1992 +ISO-8859-13 + - ibm-921_P100-1995 + - ISO-8859-13 + - 921 + - windows-28603 + - cp921 + - 8859_13 + - ibm-921 +ISO-8859-14 + - latin8 + - ISO-8859-14 + - iso-ir-199 + - l8 + - iso-celtic + - iso-8859_14-1998 + - ISO_8859-14:1998 +ISO-8859-15 + - ibm-923 + - csisolatin0 + - ISO-8859-15 + - csisolatin9 + - windows-28605 + - latin0 + - l9 + - iso8859_15_fdis + - cp923 + - Latin-9 + - ibm-923_P100-1998 + - 923 + - 8859_15 +ISO-8859-16 + - latin10 + - iso-8859_16-2001 + - ISO_8859-16:2001 + - ISO-8859-16 + - iso-ir-226 + - l10 +ISO-8859-2 + - ISO-8859-2 + - ibm-912 + - ibm-912_P100-1995 + - csISOLatin2 + - l2 + - iso-ir-101 + - 8859_2 + - 912 + - cp912 + - windows-28592 + - latin2 + - ISO_8859-2:1987 +ISO-8859-3 + - ISO-8859-3 + - ibm-913 + - csISOLatin3 + - l3 + - 8859_3 + - 913 + - ibm-913_P100-2000 + - cp913 + - iso-ir-109 + - ISO_8859-3:1988 + - windows-28593 + - latin3 +ISO-8859-4 + - windows-28594 + - latin4 + - ISO-8859-4 + - ibm-914 + - iso-ir-110 + - ibm-914_P100-1995 + - csISOLatin4 + - l4 + - 8859_4 + - 914 + - ISO_8859-4:1988 + - cp914 +ISO-8859-5 + - cp915 + - windows-28595 + - ISO-8859-5 + - ibm-915 + - iso-ir-144 + - ibm-915_P100-1995 + - csISOLatinCyrillic + - cyrillic + - 8859_5 + - ISO_8859-5:1988 + - 915 +ISO-8859-6 + - 1089 + - windows-28596 + - ASMO-708 + - ibm-1089_P100-1995 + - arabic + - ISO-8859-6-E + - cp1089 + - ISO-8859-6-I + - ISO-8859-6 + - ibm-1089 + - ECMA-114 + - iso-ir-127 + - ISO_8859-6:1987 + - csISOLatinArabic + - 8859_6 +ISO-8859-7 + - greek + - ibm-9005_X110-2007 + - csISOLatinGreek + - windows-28597 + - sun_eu_greek + - ibm-9005 + - ISO-8859-7 + - greek8 + - ISO_8859-7:1987 + - iso-ir-126 + - ELOT_928 + - ECMA-118 +ISO-8859-8 + - ISO-8859-8-I + - windows-28598 + - ibm-5012 + - ISO-8859-8 + - ISO_8859-8:1988 + - iso-ir-138 + - ibm-5012_P100-1999 + - 8859_8 + - csISOLatinHebrew + - ISO-8859-8-E + - hebrew +ISO-8859-9 + - windows-28599 + - csISOLatin5 + - l5 + - cp920 + - ibm-920_P100-1995 + - latin5 + - 920 + - ISO-8859-9 + - iso-ir-148 + - ISO_8859-9:1989 + - ECMA-128 + - ibm-920 + - 8859_9 +KOI8-R + - windows-20866 + - ibm-878 + - ibm-878_P100-1996 + - koi8 + - KOI8-R + - cp878 + - csKOI8R +macintosh + - csMacintosh + - macintosh + - windows-10000 + - macos-0_2-10.2 + - mac +SCSU + - SCSU + - ibm-1212 + - ibm-1213 +Shift_JIS + - sjis + - ibm-943_P15A-2003 + - csShiftJIS + - windows-31j + - IBM-943C + - cp932 + - windows-932 + - ms932 + - x-sjis + - Shift_JIS + - pck + - cp943c + - csWindows31J + - x-ms-cp932 + - ibm-943_VSUB_VPUA + - MS_Kanji + - ibm-943 +TIS-620 + - ibm-9066 + - TIS-620 + - eucTH + - cp874 + - tis620.2533 + - ibm-874 + - ibm-874_P100-1995 +US-ASCII + - IBM367 + - iso_646.irv:1983 + - csASCII + - US-ASCII + - ascii7 + - cp367 + - windows-20127 + - ASCII + - ANSI_X3.4-1986 + - 646 + - ISO646-US + - ANSI_X3.4-1968 + - iso-ir-6 + - ibm-367 + - ISO_646.irv:1991 + - us +UTF-16 + - ucs-2 + - UTF-16 + - csUnicode + - unicode + - ibm-1204 + - ISO-10646-UCS-2 + - ibm-1205 +UTF-16BE + - x-utf-16be + - ibm-61955 + - ibm-61956 + - UTF16_BigEndian + - windows-1201 + - cp1200 + - UTF-16BE + - cp1201 + - ibm-17584 + - ibm-17585 + - ibm-21680 + - ibm-21681 + - ibm-13488 + - ibm-1200 + - ibm-13489 + - ibm-25776 + - ibm-1201 + - ibm-25777 +UTF-16LE + - UTF16_LittleEndian + - UTF-16LE + - windows-1200 + - ibm-13490 + - ibm-13491 + - ibm-17586 + - ibm-17587 + - ibm-21682 + - x-utf-16le + - ibm-21683 + - ibm-1202 + - ibm-25778 + - ibm-1203 + - ibm-25779 +UTF-32 + - ISO-10646-UCS-4 + - UTF-32 + - ucs-4 + - ibm-1236 + - ibm-1237 + - csUCS4 +UTF-32BE + - UTF32_BigEndian + - UTF-32BE + - ibm-1232 + - ibm-1233 +UTF-32LE + - UTF32_LittleEndian + - ibm-1234 + - ibm-1235 + - UTF-32LE +UTF-7 + - UTF-7 + - windows-65000 +UTF-8 + - ibm-17593 + - ibm-1208 + - UTF-8 + - ibm-1209 + - cp1208 + - ibm-13496 + - ibm-13497 + - windows-65001 + - ibm-5304 + - ibm-5305 + - ibm-17592 +windows-1250 + - windows-1250 + - cp1250 + - ibm-5346 + - ibm-5346_P100-1998 +windows-1251 + - ANSI1251 + - windows-1251 + - cp1251 + - ibm-5347 + - ibm-5347_P100-1998 +windows-1252 + - windows-1252 + - cp1252 + - ibm-5348 + - ibm-5348_P100-1997 +windows-1253 + - ibm-5349_P100-1998 + - windows-1253 + - cp1253 + - ibm-5349 +windows-1254 + - ibm-5350 + - ibm-5350_P100-1998 + - windows-1254 + - cp1254 +windows-1255 + - ibm-9447_P100-2002 + - ibm-9447 + - windows-1255 + - cp1255 +windows-1256 + - ibm-9448_X100-2005 + - ibm-9448 + - windows-1256 + - cp1256 +windows-1257 + - cp1257 + - ibm-9449_P100-2002 + - ibm-9449 + - windows-1257 +windows-1258 + - cp1258 + - ibm-5354 + - ibm-5354_P100-1998 + - windows-1258 +x-gsm-03.38-2000 + - gsm-03.38-2000 + - GSM0338 +x-ibm-1383_P110-1999 + - ibm-eucCN + - ibm-1383 + - hp15CN + - cp1383 + - ibm-1383_P110-1999 + - 1383 + - ibm-1383_VPUA +x-IMAP-mailbox-name + - IMAP-mailbox-name +x-iscii-be + - iscii-bng + - windows-57003 + - windows-57006 + - x-iscii-as + - x-iscii-be +x-iscii-de + - ibm-4902 + - iscii-dev + - windows-57002 + - x-iscii-de +x-iscii-gu + - windows-57010 + - x-iscii-gu + - iscii-guj +x-iscii-ka + - windows-57008 + - iscii-knd + - x-iscii-ka +x-iscii-ma + - iscii-mlm + - windows-57009 + - x-iscii-ma +x-iscii-or + - iscii-ori + - windows-57007 + - x-iscii-or +x-iscii-pa + - iscii-gur + - windows-57011 + - x-iscii-pa +x-iscii-ta + - x-iscii-ta + - windows-57004 + - iscii-tml +x-iscii-te + - windows-57005 + - x-iscii-te + - iscii-tlg +x-iso-8859_11-2001 + - ISO-8859-11 + - iso-8859_11-2001 + - thai8 +x-UTF16_OppositeEndian + - UTF16_OppositeEndian +x-UTF16_PlatformEndian + - UTF16_PlatformEndian +x-UTF32_OppositeEndian + - UTF32_OppositeEndian +x-UTF32_PlatformEndian + - UTF32_PlatformEndian + */ +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_macintosh.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_macintosh.java new file mode 100644 index 0000000..9f1033f --- /dev/null +++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_macintosh.java @@ -0,0 +1,78 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package tests.api.java.nio.charset; + +import dalvik.annotation.AndroidOnly; +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; + +import junit.framework.TestCase; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; + +@TestTargetClass(targets.Charsets.macintosh.class) +@AndroidOnly("icu") +public class Charset_macintosh extends Charset_AbstractTest { + + @Override + protected void setUp() throws Exception { + charsetName = "macintosh"; + + testChars = theseChars(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +160, 161, 162, 163, 165, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 180, +181, 182, 183, 184, 186, 187, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, +201, 202, 203, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 216, 217, 218, +219, 220, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, +237, 238, 239, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 255, +305, 338, 376, 710, 937, 8211, 8249, 8364, 8482, 8706, 8747, 8800, 9674, 63743, 64257 + }); + + testBytes = theseBytes(new int[]{ +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, +48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, +64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, +80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, +96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, +202, 193, 162, 163, 180, 164, 172, 169, 187, 199, 194, 168, 248, 161, 177, 171, +181, 166, 225, 252, 188, 200, 192, 203, 231, 229, 204, 128, 129, 174, 130, 233, +131, 230, 232, 237, 234, 235, 236, 132, 241, 238, 239, 205, 133, 175, 244, 242, +243, 134, 167, 136, 135, 137, 139, 138, 140, 190, 141, 143, 142, 144, 145, 147, +146, 148, 149, 150, 152, 151, 153, 155, 154, 214, 191, 157, 156, 158, 159, 216, +245, 206, 217, 246, 189, 208, 220, 219, 170, 182, 186, 173, 215, 240, 222 + }); + + super.setUp(); + } + +} diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/CoderResultTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/CoderResultTest.java index 1b4a92d..9fdc84e 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/CoderResultTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/CoderResultTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.BufferOverflowException; @@ -51,34 +51,54 @@ public class CoderResultTest extends TestCase { /* * Test the constant OVERFLOW and UNDERFLOW. */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isError", - methodArgs = {} - ), @TestTarget( - methodName = "isMalformed", - methodArgs = {} - ), @TestTarget( - methodName = "isOverflow", - methodArgs = {} - ), @TestTarget( - methodName = "isUnderflow", - methodArgs = {} - ), @TestTarget( - methodName = "isUnmappable", - methodArgs = {} - ), @TestTarget( - methodName = "length", - methodArgs = {} - ), @TestTarget( - methodName = "throwException", - methodArgs = {} - ), @TestTarget( - methodName = "toString", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isError", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isMalformed", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isOverflow", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isUnderflow", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isUnmappable", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "length", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "throwException", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "toString", + args = {} ) }) public void testConstants() throws Exception { @@ -129,19 +149,24 @@ public class CoderResultTest extends TestCase { * Test method isError(). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isError", - methodArgs = {} - ), @TestTarget( - methodName = "malformedForLength", - methodArgs = {int.class} - ), @TestTarget( - methodName = "unmappableForLength", - methodArgs = {int.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isError", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedForLength", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableForLength", + args = {int.class} ) }) public void testIsError() { @@ -155,21 +180,26 @@ public class CoderResultTest extends TestCase { * Test method isMalformed(). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isMalformed", - methodArgs = {} - ), @TestTarget( - methodName = "malformedForLength", - methodArgs = {int.class} - ), @TestTarget( - methodName = "unmappableForLength", - methodArgs = {int.class} - ) - }) + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isMalformed", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedForLength", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableForLength", + args = {int.class} + ) + }) public void testIsMalformed() { assertFalse(CoderResult.UNDERFLOW.isMalformed()); assertFalse(CoderResult.OVERFLOW.isMalformed()); @@ -181,21 +211,26 @@ public class CoderResultTest extends TestCase { * Test method isMalformed(). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isUnmappable", - methodArgs = {} - ), @TestTarget( - methodName = "malformedForLength", - methodArgs = {int.class} - ), @TestTarget( - methodName = "unmappableForLength", - methodArgs = {int.class} - ) - }) + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isUnmappable", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedForLength", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableForLength", + args = {int.class} + ) + }) public void testIsUnmappable() { assertFalse(CoderResult.UNDERFLOW.isUnmappable()); assertFalse(CoderResult.OVERFLOW.isUnmappable()); @@ -207,19 +242,24 @@ public class CoderResultTest extends TestCase { * Test method isOverflow(). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isOverflow", - methodArgs = {} - ), @TestTarget( - methodName = "malformedForLength", - methodArgs = {int.class} - ), @TestTarget( - methodName = "unmappableForLength", - methodArgs = {int.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isOverflow", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedForLength", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableForLength", + args = {int.class} ) }) public void testIsOverflow() { @@ -233,19 +273,24 @@ public class CoderResultTest extends TestCase { * Test method isUnderflow(). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isUnderflow", - methodArgs = {} - ), @TestTarget( - methodName = "malformedForLength", - methodArgs = {int.class} - ), @TestTarget( - methodName = "unmappableForLength", - methodArgs = {int.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isUnderflow", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedForLength", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableForLength", + args = {int.class} ) }) public void testIsUnderflow() { @@ -259,19 +304,24 @@ public class CoderResultTest extends TestCase { * Test method length(). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "length", - methodArgs = {} - ), @TestTarget( - methodName = "malformedForLength", - methodArgs = {int.class} - ), @TestTarget( - methodName = "unmappableForLength", - methodArgs = {int.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "length", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedForLength", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableForLength", + args = {int.class} ) }) public void testLength() { @@ -296,15 +346,12 @@ public class CoderResultTest extends TestCase { * Test method malformedForLength(int). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "malformedForLength", - methodArgs = {int.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedForLength", + args = {int.class} + ) public void testMalformedForLength() { assertNotNull(CoderResult.malformedForLength(Integer.MAX_VALUE)); assertNotNull(CoderResult.malformedForLength(1)); @@ -332,15 +379,12 @@ public class CoderResultTest extends TestCase { * Test method unmappableForLength(int). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "unmappableForLength", - methodArgs = {int.class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableForLength", + args = {int.class} + ) public void testUnmappableForLength() { assertNotNull(CoderResult.unmappableForLength(Integer.MAX_VALUE)); assertNotNull(CoderResult.unmappableForLength(1)); @@ -366,19 +410,24 @@ public class CoderResultTest extends TestCase { * Test method throwException(). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "throwException", - methodArgs = {} - ), @TestTarget( - methodName = "malformedForLength", - methodArgs = {int.class} - ), @TestTarget( - methodName = "unmappableForLength", - methodArgs = {int.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "throwException", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedForLength", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableForLength", + args = {int.class} ) }) public void testThrowException() throws Exception { @@ -412,19 +461,24 @@ public class CoderResultTest extends TestCase { * Test method toString(). * */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "toString", - methodArgs = {} - ), @TestTarget( - methodName = "malformedForLength", - methodArgs = {int.class} - ), @TestTarget( - methodName = "unmappableForLength", - methodArgs = {int.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "toString", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "malformedForLength", + args = {int.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "unmappableForLength", + args = {int.class} ) }) public void testToString() throws Exception { diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/CodingErrorActionTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/CodingErrorActionTest.java index 5847fd1..d9e5bea 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/CodingErrorActionTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/CodingErrorActionTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.charset.CodingErrorAction; @@ -47,15 +47,12 @@ public class CodingErrorActionTest extends TestCase { /* * Test the constants. */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Verify constant", - targets = { - @TestTarget( - methodName = "!Constants", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Verify constant", + method = "!Constants", + args = {} + ) public void testIGNORE() { assertNotNull(CodingErrorAction.IGNORE); assertNotNull(CodingErrorAction.REPLACE); @@ -68,15 +65,12 @@ public class CodingErrorActionTest extends TestCase { /* * Test the method toString(). */ -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "Verify constant", - targets = { - @TestTarget( - methodName = "toString", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Verify constant", + method = "toString", + args = {} + ) public void testToString() { assertTrue(CodingErrorAction.IGNORE.toString().indexOf("IGNORE") != -1); assertTrue(CodingErrorAction.REPLACE.toString().indexOf("REPLACE") != -1); diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetDecoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetDecoderTest.java index 63f5398..2f873ac 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetDecoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetDecoderTest.java @@ -26,7 +26,7 @@ import java.nio.charset.Charset; /** * test gb18030 decoder */ -public class GBCharsetDecoderTest extends CharsetDecoderTest { +public class GBCharsetDecoderTest extends AbstractCharsetDecoderTestCase { protected void setUp() throws Exception { cs = Charset.forName("gb18030"); diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java index 4e30997..9c22dba 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.CharBuffer; @@ -29,7 +29,7 @@ import java.nio.charset.Charset; /** * test case specific activity of gb18030 charset encoder */ -public class GBCharsetEncoderTest extends CharsetEncoderTest { +public class GBCharsetEncoderTest extends AbstractCharsetEncoderTestCase { // charset for gb180303 private static final Charset CS = Charset.forName("gb18030"); @@ -49,15 +49,12 @@ public class GBCharsetEncoderTest extends CharsetEncoderTest { super.tearDown(); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} + ) public void testCanEncodechar() throws CharacterCodingException { // normal case for utfCS assertTrue(encoder.canEncode('\u0077')); @@ -70,15 +67,12 @@ public class GBCharsetEncoderTest extends CharsetEncoderTest { /* * Class under test for boolean canEncode(CharSequence) */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeCharSequence() { assertTrue(encoder.canEncode("")); // surrogate char @@ -90,16 +84,18 @@ public class GBCharsetEncoderTest extends CharsetEncoderTest { assertFalse(encoder.canEncode("\ud800")); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "averageBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} ) }) public void testSpecificDefaultValue() { diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetDecoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetDecoderTest.java index efb2539..ee2a189 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetDecoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetDecoderTest.java @@ -26,10 +26,11 @@ import java.nio.charset.Charset; * test ISO-8859-1 decoder */ @TestTargetClass(java.nio.charset.CharsetDecoder.class) -public class ISOCharsetDecoderTest extends CharsetDecoderTest { +public class ISOCharsetDecoderTest extends AbstractCharsetDecoderTestCase { protected void setUp() throws Exception { cs = Charset.forName("iso-8859-1"); + unibytes = new byte[] { 32, 98, 117, 102, 102, 101, 114 }; super.setUp(); } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetEncoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetEncoderTest.java index af764c5..6333255 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetEncoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetEncoderTest.java @@ -16,8 +16,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.ByteBuffer; @@ -32,7 +32,7 @@ import java.nio.charset.UnmappableCharacterException; * test case specific activity of iso-8859-1 charset encoder */ @TestTargetClass(java.nio.charset.CharsetEncoder.class) -public class ISOCharsetEncoderTest extends CharsetEncoderTest { +public class ISOCharsetEncoderTest extends AbstractCharsetEncoderTestCase { // charset for iso-8859-1 private static final Charset CS = Charset.forName("iso-8859-1"); @@ -52,15 +52,12 @@ public class ISOCharsetEncoderTest extends CharsetEncoderTest { super.tearDown(); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeCharSequence() { // normal case for isoCS assertTrue(encoder.canEncode("\u0077")); @@ -73,16 +70,18 @@ public class ISOCharsetEncoderTest extends CharsetEncoderTest { assertTrue(encoder.canEncode("")); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Regression test. IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Regression test. IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Regression test. IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} ) }) public void testCanEncodeICUBug() { @@ -90,30 +89,29 @@ public class ISOCharsetEncoderTest extends CharsetEncoderTest { assertFalse(encoder.canEncode((String) "\ud800")); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} + ) public void testCanEncodechar() throws CharacterCodingException { assertTrue(encoder.canEncode('\u0077')); assertFalse(encoder.canEncode('\uc2a3')); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "averageBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} ) }) public void testSpecificDefaultValue() { @@ -137,19 +135,24 @@ public class ISOCharsetEncoderTest extends CharsetEncoderTest { return null; } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "Checks also: flush & encode, but not covers exceptions.", - targets = { - @TestTarget( - methodName = "onMalformedInput", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ), @TestTarget( - methodName = "onUnmappableCharacter", - methodArgs = {java.nio.charset.CodingErrorAction.class} - ), @TestTarget( - methodName = "reset", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Checks also: flush & encode, but not covers exceptions.", + method = "onMalformedInput", + args = {java.nio.charset.CodingErrorAction.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Checks also: flush & encode, but not covers exceptions.", + method = "onUnmappableCharacter", + args = {java.nio.charset.CodingErrorAction.class} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "Checks also: flush & encode, but not covers exceptions.", + method = "reset", + args = {} ) }) public void testMultiStepEncode() throws CharacterCodingException { diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetTest.java index 562adc3..e001292 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetTest.java @@ -17,13 +17,14 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; /** * Test ISO-8859-1. */ + @TestTargetClass(java.nio.charset.Charset.class) public class ISOCharsetTest extends AbstractCharsetTestCase { @@ -42,15 +43,12 @@ public class ISOCharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testEncode_Normal() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test, text source: AbstractCharsetTestCase.internalTestEncode. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "ATTENTION: THIS TEST IS FOR THE ISOCharsetEncoder.encode AND NOT THE TARGET ANNOTATED!!! the Functional test, text source: AbstractCharsetTestCase.internalTestEncode. Exceptions checking missed.", + method = "encode", + args = {java.lang.String.class} + ) public void testEncode_Normal() { String input = "ab\u5D14\u654F"; byte[] output = new byte[] { 97, 98, @@ -64,13 +62,12 @@ public class ISOCharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testDecode_Normal() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test, text source: AbstractCharsetTestCase.internalTestDecode. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "ATTENTION: THIS TEST IS FOR THE ISOCharsetEncoder.encode AND NOT THE TARGET ANNOTATED!!! Functional test, text source: AbstractCharsetTestCase.internalTestDecode. Exceptions checking missed.", + method = "decode", + args = {java.nio.ByteBuffer.class} ) }) public void testDecode_Normal() { diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetDecoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetDecoderTest.java index 0a43e42..4960401 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetDecoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetDecoderTest.java @@ -27,7 +27,7 @@ import java.nio.charset.Charset; */ @TestTargetClass(java.nio.charset.CharsetDecoder.class) -public class UTF16BECharsetDecoderTest extends CharsetDecoderTest { +public class UTF16BECharsetDecoderTest extends AbstractCharsetDecoderTestCase { protected void setUp() throws Exception { cs = Charset.forName("utf-16be"); diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetEncoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetEncoderTest.java index 4f05c46..04bc9d6 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetEncoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetEncoderTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.CharBuffer; @@ -29,7 +29,7 @@ import java.nio.charset.Charset; * TODO type def */ @TestTargetClass(java.nio.charset.CharsetEncoder.class) -public class UTF16BECharsetEncoderTest extends CharsetEncoderTest { +public class UTF16BECharsetEncoderTest extends AbstractCharsetEncoderTestCase { // charset for utf-16be private static final Charset CS = Charset.forName("utf-16be"); @@ -56,28 +56,25 @@ public class UTF16BECharsetEncoderTest extends CharsetEncoderTest { super.tearDown(); } -@TestInfo( - level = TestLevel.TODO, - purpose = "Empty test.", - targets = { - @TestTarget( - methodName = "CharsetEncoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class} - ) - }) + @TestTargetNew( + level = TestLevel.TODO, + notes = "Empty test.", + method = "CharsetEncoder", + args = {java.nio.charset.Charset.class, float.class, float.class} + ) public void testCharsetEncoderCharsetfloatfloat() { // this constructor is invalid for UTF16LE CharsetEncoder +// mc081121: +// NO! CERTAINLY NOT LIKE FOLLOWS: +// new CharsetEncoderTest.MockCharsetEncoder(CS, 0.5f, 3.0f); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} + ) public void testCanEncodechar() throws CharacterCodingException { // normal case for utfCS assertTrue(encoder.canEncode('\u0077')); @@ -88,15 +85,12 @@ public class UTF16BECharsetEncoderTest extends CharsetEncoderTest { } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeCharSequence() { // normal case for utfCS assertTrue(encoder.canEncode("\u0077")); @@ -115,28 +109,22 @@ public class UTF16BECharsetEncoderTest extends CharsetEncoderTest { assertFalse(encoder.canEncode("\ud800\udb00")); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Regression test. IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Regression test. IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeICUBug() { assertFalse(encoder.canEncode("\ud800")); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} + ) public void testSpecificDefaultValue() { // ??? TODO NIO adapt to the actually used UTF16BE charset Encoder // assertEquals(2, encoder.averageBytesPerChar(), 0.001); @@ -155,15 +143,12 @@ public class UTF16BECharsetEncoderTest extends CharsetEncoderTest { return null; } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isLegalReplacement", - methodArgs = {byte[].class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isLegalReplacement", + args = {byte[].class} + ) public void testIsLegalReplacementEmptyArray() { assertTrue(encoder.isLegalReplacement(new byte[0])); } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetTest.java index 353a08b..d7f4866 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetTest.java @@ -17,13 +17,14 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; /** * Test UTF-16BE. */ + @TestTargetClass(java.nio.charset.Charset.class) public class UTF16BECharsetTest extends AbstractCharsetTestCase { @@ -40,15 +41,12 @@ public class UTF16BECharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testEncode_Normal() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test, text source: AbstractCharsetTestCase.internalTestEncode. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test, text source: AbstractCharsetTestCase.internalTestEncode. Exceptions checking missed.", + method = "encode", + args = {java.lang.String.class} + ) public void testEncode_Normal() { String input = "ab\u5D14\u654F"; byte[] output = new byte[] { 0, 97, 0, 98, 93, 20, 101, 79 }; @@ -60,15 +58,12 @@ public class UTF16BECharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testDecode_Normal() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test, text source: AbstractCharsetTestCase.internalTestDecode. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test, text source: AbstractCharsetTestCase.internalTestDecode. Exceptions checking missed.", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void testDecode_Normal() { byte[] input = new byte[] { 0, 97, 0, 98, 93, 20, 101, 79 }; char[] output = "ab\u5D14\u654F".toCharArray(); diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java index 17fbfc5..6c11502 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.io.UnsupportedEncodingException; @@ -33,7 +33,7 @@ import java.nio.charset.CodingErrorAction; * */ @TestTargetClass(java.nio.charset.CharsetDecoder.class) -public class UTF16CharsetDecoderTest extends CharsetDecoderTest { +public class UTF16CharsetDecoderTest extends AbstractCharsetDecoderTestCase { boolean bigEndian = true; @@ -74,15 +74,12 @@ public class UTF16CharsetDecoderTest extends CharsetDecoderTest { } } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Exceptions checking missed.", + method = "decode", + args = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} + ) public void testMultiStepDecode() throws CharacterCodingException { if (!cs.name().equals("mock")) { decoder.onMalformedInput(CodingErrorAction.REPORT); @@ -127,16 +124,18 @@ public class UTF16CharsetDecoderTest extends CharsetDecoderTest { } } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Implementation in CharsetDecoderTest.implTestDecodeByteBufferCharBufferboolean & CharsetDecoderTest.implTestDecodeByteBuffer. Exceptions cheching missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ), @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Implementation in CharsetDecoderTest.implTestDecodeByteBufferCharBufferboolean & CharsetDecoderTest.implTestDecodeByteBuffer. Exceptions cheching missed.", + method = "decode", + args = {java.nio.ByteBuffer.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Implementation in CharsetDecoderTest.implTestDecodeByteBufferCharBufferboolean & CharsetDecoderTest.implTestDecodeByteBuffer. Exceptions cheching missed.", + method = "decode", + args = {java.nio.ByteBuffer.class, java.nio.CharBuffer.class, boolean.class} ) }) public void testLittleEndian() throws CharacterCodingException, diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetEncoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetEncoderTest.java index e0b4b7d..35218e6 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetEncoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetEncoderTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.ByteBuffer; @@ -31,7 +31,7 @@ import java.nio.charset.CharsetDecoder; * TODO type def */ @TestTargetClass(java.nio.charset.CharsetEncoder.class) -public class UTF16CharsetEncoderTest extends CharsetEncoderTest { +public class UTF16CharsetEncoderTest extends AbstractCharsetEncoderTestCase { // charset for utf-16 // charset for utf-16be @@ -60,28 +60,22 @@ public class UTF16CharsetEncoderTest extends CharsetEncoderTest { super.tearDown(); } -@TestInfo( - level = TestLevel.TODO, - purpose = "Test is empty", - targets = { - @TestTarget( - methodName = "CharsetEncoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class} - ) - }) + @TestTargetNew( + level = TestLevel.TODO, + notes = "Test is empty", + method = "CharsetEncoder", + args = {java.nio.charset.Charset.class, float.class, float.class} + ) public void testCharsetEncoderCharsetfloatfloat() { // this constructor is invalid for UTF16LE CharsetEncoder } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} + ) public void testCanEncodechar() throws CharacterCodingException { // normal case for utfCS assertTrue(encoder.canEncode('\u0077')); @@ -91,15 +85,12 @@ public class UTF16CharsetEncoderTest extends CharsetEncoderTest { assertTrue(encoder.canEncode('\uc2c0')); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeCharSequence() { // normal case for utfCS assertTrue(encoder.canEncode("\u0077")); @@ -118,16 +109,18 @@ public class UTF16CharsetEncoderTest extends CharsetEncoderTest { assertFalse(encoder.canEncode("\ud800\udb00")); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ), @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} + @TestTargets({ + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} + ), + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} ) }) public void testCanEncodeICUBug() { @@ -135,16 +128,18 @@ public class UTF16CharsetEncoderTest extends CharsetEncoderTest { assertFalse(encoder.canEncode("\ud800")); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "averageBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} ) }) public void testSpecificDefaultValue() { @@ -166,15 +161,12 @@ public class UTF16CharsetEncoderTest extends CharsetEncoderTest { return null; } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isLegalReplacement", - methodArgs = {byte[].class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isLegalReplacement", + args = {byte[].class} + ) public void testIsLegalReplacementEmptyArray() { assertTrue(encoder.isLegalReplacement(new byte[0])); } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetTest.java index 725e43a..4972abe 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetTest.java @@ -17,13 +17,14 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; /** * Test UTF-16. */ + @TestTargetClass(java.nio.charset.Charset.class) public class UTF16CharsetTest extends AbstractCharsetTestCase { @@ -39,15 +40,12 @@ public class UTF16CharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testEncode_Normal() */ - @TestInfo( - level = TestLevel.TODO, - purpose = "Empty test.", - targets = { - @TestTarget( - methodName = "", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.TODO, + notes = "Empty test.", + method = "", + args = {} + ) public void testEncode_Normal() { // TODO Auto-generated method stub @@ -58,15 +56,12 @@ public class UTF16CharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testDecode_Normal() */ - @TestInfo( - level = TestLevel.TODO, - purpose = "Empty test.", - targets = { - @TestTarget( - methodName = "", - methodArgs = {} - ) - }) + @TestTargetNew( + level = TestLevel.TODO, + notes = "Empty test.", + method = "", + args = {} + ) public void testDecode_Normal() { // TODO Auto-generated method stub diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetDecoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetDecoderTest.java index eed1b12..607c44f 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetDecoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetDecoderTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.io.UnsupportedEncodingException; @@ -29,7 +29,7 @@ import java.nio.charset.Charset; * TODO typedef */ @TestTargetClass(java.nio.charset.CharsetDecoder.class) -public class UTF16LECharsetDecoderTest extends CharsetDecoderTest { +public class UTF16LECharsetDecoderTest extends AbstractCharsetDecoderTestCase { protected void setUp() throws Exception { cs = Charset.forName("utf-16le"); diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetEncoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetEncoderTest.java index 003e1d7..8963d12 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetEncoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetEncoderTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.CharBuffer; @@ -29,7 +29,7 @@ import java.nio.charset.Charset; * TODO type def */ @TestTargetClass(java.nio.charset.CharsetEncoder.class) -public class UTF16LECharsetEncoderTest extends CharsetEncoderTest { +public class UTF16LECharsetEncoderTest extends AbstractCharsetEncoderTestCase { // charset for utf-16le private static final Charset CS = Charset.forName("utf-16le"); @@ -57,28 +57,22 @@ public class UTF16LECharsetEncoderTest extends CharsetEncoderTest { super.tearDown(); } -@TestInfo( - level = TestLevel.TODO, - purpose = "Empty constructor test.", - targets = { - @TestTarget( - methodName = "CharsetEncoder", - methodArgs = {java.nio.charset.Charset.class, float.class, float.class} - ) - }) + @TestTargetNew( + level = TestLevel.TODO, + notes = "Empty constructor test.", + method = "CharsetEncoder", + args = {java.nio.charset.Charset.class, float.class, float.class} + ) public void testCharsetEncoderCharsetfloatfloat() { // this constructor is invalid for UTF16LE CharsetEncoder } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} + ) public void testCanEncodechar() throws CharacterCodingException { // normal case for utfCS assertTrue(encoder.canEncode('\u0077')); @@ -88,15 +82,12 @@ public class UTF16LECharsetEncoderTest extends CharsetEncoderTest { assertTrue(encoder.canEncode('\uc2c0')); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeCharSequence() { // normal case for utfCS assertTrue(encoder.canEncode("\u0077")); @@ -115,29 +106,28 @@ public class UTF16LECharsetEncoderTest extends CharsetEncoderTest { assertFalse(encoder.canEncode("\ud800\udb00")); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Regression test. IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Regression test. IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeICUBug() { assertFalse(encoder.canEncode("\ud800")); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "averageBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} ) }) public void testSpecificDefaultValue() { @@ -145,15 +135,12 @@ public class UTF16LECharsetEncoderTest extends CharsetEncoderTest { assertEquals(2, encoder.maxBytesPerChar(), 0.001); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "isLegalReplacement", - methodArgs = {byte[].class} - ) - }) + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "isLegalReplacement", + args = {byte[].class} + ) public void testIsLegalReplacementEmptyArray() { assertTrue(encoder.isLegalReplacement(new byte[0])); } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetTest.java index 5614eac..3189a15 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; /** @@ -41,15 +41,12 @@ public class UTF16LECharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testEncode_Normal() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test, text source: AbstractCharsetTestCase.internalTestEncode. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test, text source: AbstractCharsetTestCase.internalTestEncode. Exceptions checking missed.", + method = "encode", + args = {java.lang.String.class} + ) public void testEncode_Normal() { String input = "ab\u5D14\u654F"; byte[] output = new byte[] { 97, 0, 98, 0, 20, 93, 79, 101 }; @@ -61,15 +58,12 @@ public class UTF16LECharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testDecode_Normal() */ - @TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test, text source: AbstractCharsetTestCase.internalTestDecode. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test, text source: AbstractCharsetTestCase.internalTestDecode. Exceptions checking missed.", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void testDecode_Normal() { byte[] input = new byte[] { 97, 0, 98, 0, 20, 93, 79, 101 }; char[] output = "ab\u5D14\u654F".toCharArray(); diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTF8CharsetTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTF8CharsetTest.java index cf22476..1df2def 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTF8CharsetTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTF8CharsetTest.java @@ -17,13 +17,14 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; /** * Test UTF-8 charset. */ + @TestTargetClass(java.nio.charset.Charset.class) public class UTF8CharsetTest extends AbstractCharsetTestCase { @@ -40,15 +41,12 @@ public class UTF8CharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testDecode_Normal() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test, text source: AbstractCharsetTestCase.internalTestDecode. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "decode", - methodArgs = {java.nio.ByteBuffer.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test, text source: AbstractCharsetTestCase.internalTestDecode. Exceptions checking missed.", + method = "decode", + args = {java.nio.ByteBuffer.class} + ) public void testDecode_Normal() { byte[] input = new byte[] { 97, 98, -27, -76, -108, -26, -107, -113 }; char[] output = "ab\u5D14\u654F".toCharArray(); @@ -60,15 +58,12 @@ public class UTF8CharsetTest extends AbstractCharsetTestCase { * * @see tests.api.java.nio.charset.ConcreteCharsetTest#testEncode_Normal() */ -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Functional test, text source: AbstractCharsetTestCase.internalTestEncode. Exceptions checking missed.", - targets = { - @TestTarget( - methodName = "encode", - methodArgs = {java.lang.String.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Functional test, text source: AbstractCharsetTestCase.internalTestEncode. Exceptions checking missed.", + method = "encode", + args = {java.lang.String.class} + ) public void testEncode_Normal() { String input = "ab\u5D14\u654F"; byte[] output = new byte[] { 97, 98, -27, -76, -108, -26, -107, -113 }; diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetDecoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetDecoderTest.java index 16b52eb..0986d0b 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetDecoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetDecoderTest.java @@ -26,10 +26,11 @@ import java.nio.charset.Charset; * test utf-8 decoder */ @TestTargetClass(java.nio.charset.CharsetDecoder.class) -public class UTFCharsetDecoderTest extends CharsetDecoderTest { +public class UTFCharsetDecoderTest extends AbstractCharsetDecoderTestCase { protected void setUp() throws Exception { cs = Charset.forName("utf-8"); + unibytes = new byte[] { 32, 98, 117, 102, 102, 101, 114 }; super.setUp(); } diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetEncoderTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetEncoderTest.java index a7c19d5..276a6f8 100644 --- a/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetEncoderTest.java +++ b/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetEncoderTest.java @@ -17,8 +17,8 @@ package tests.api.java.nio.charset; import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestInfo; -import dalvik.annotation.TestTarget; +import dalvik.annotation.TestTargets; +import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestLevel; import java.nio.CharBuffer; @@ -29,7 +29,7 @@ import java.nio.charset.Charset; * test case specific activity of utf-8 charset encoder */ @TestTargetClass(java.nio.charset.CharsetEncoder.class) -public class UTFCharsetEncoderTest extends CharsetEncoderTest { +public class UTFCharsetEncoderTest extends AbstractCharsetEncoderTestCase { // charset for UTF-8 private static final Charset CS = Charset.forName("utf-8"); @@ -50,15 +50,12 @@ public class UTFCharsetEncoderTest extends CharsetEncoderTest { super.tearDown(); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {char.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {char.class} + ) public void testCanEncodechar() throws CharacterCodingException { // normal case for utfCS assertTrue(encoder.canEncode('\u0077')); @@ -68,15 +65,12 @@ public class UTFCharsetEncoderTest extends CharsetEncoderTest { assertTrue(encoder.canEncode('\uc2c0')); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeCharSequence() { // normal case for utfCS assertTrue(encoder.canEncode("\u0077")); @@ -95,29 +89,28 @@ public class UTFCharsetEncoderTest extends CharsetEncoderTest { assertFalse(encoder.canEncode("\ud800\udb00")); } -@TestInfo( - level = TestLevel.PARTIAL, - purpose = "Regression test. IllegalStateException checking missed.", - targets = { - @TestTarget( - methodName = "canEncode", - methodArgs = {java.lang.CharSequence.class} - ) - }) + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Regression test. IllegalStateException checking missed.", + method = "canEncode", + args = {java.lang.CharSequence.class} + ) public void testCanEncodeICUBug() { assertFalse(encoder.canEncode("\ud800")); } -@TestInfo( - level = TestLevel.COMPLETE, - purpose = "", - targets = { - @TestTarget( - methodName = "averageBytesPerChar", - methodArgs = {} - ), @TestTarget( - methodName = "maxBytesPerChar", - methodArgs = {} + @TestTargets({ + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "averageBytesPerChar", + args = {} + ), + @TestTargetNew( + level = TestLevel.COMPLETE, + notes = "", + method = "maxBytesPerChar", + args = {} ) }) public void testSpecificDefaultValue() { diff --git a/nio_char/src/test/java/tests/nio_char/AllTests.java b/nio_char/src/test/java/tests/nio_char/AllTests.java index f466b07..19a003c 100644 --- a/nio_char/src/test/java/tests/nio_char/AllTests.java +++ b/nio_char/src/test/java/tests/nio_char/AllTests.java @@ -29,7 +29,7 @@ public class AllTests { } public static Test suite() { - TestSuite suite = new TestSuite("All NIO_Char test suites"); + TestSuite suite = tests.TestSuiteFactory.createTestSuite("All NIO_Char test suites"); // $JUnit-BEGIN$ suite.addTest(org.apache.harmony.nio_char.tests.java.nio.charset.AllTests.suite()); suite.addTest(org.apache.harmony.nio_char.tests.java.nio.charset.spi.AllTests.suite()); |