harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r804171 - in /harmony/enhanced/classlib/trunk/modules/nio_char/src: main/java/org/apache/harmony/niochar/charset/additional/IBM037.java main/native/niochar/shared/additional/IBM037.c test/java/tests/api/java/nio/charset/CP037CharsetTest.java
Date Fri, 14 Aug 2009 11:47:34 GMT
Author: odeakin
Date: Fri Aug 14 11:47:33 2009
New Revision: 804171

URL: http://svn.apache.org/viewvc?rev=804171&view=rev
Log:
Apply fix and testcase for HARMONY-6308 ([classlib][nio_char] Character mapping difference
to RI for IBM037 charset)

Added:
    harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CP037CharsetTest.java
  (with props)
Modified:
    harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/additional/IBM037.java
    harmony/enhanced/classlib/trunk/modules/nio_char/src/main/native/niochar/shared/additional/IBM037.c

Modified: harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/additional/IBM037.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/additional/IBM037.java?rev=804171&r1=804170&r2=804171&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/additional/IBM037.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/additional/IBM037.java
Fri Aug 14 11:47:33 2009
@@ -110,9 +110,9 @@
 		final static char[] arr = {
                 0x009C,0x0009,0x0086,0x007F,
                 0x0097,0x008D,0x008E,0x000B,0x000C,0x000D,0x000E,0x000F,
-                0x0010,0x0011,0x0012,0x0013,0x009D,0x0085,0x0008,0x0087,
+                0x0010,0x0011,0x0012,0x0013,0x009D,0x000A,0x0008,0x0087,
                 0x0018,0x0019,0x0092,0x008F,0x001C,0x001D,0x001E,0x001F,
-                0x0080,0x0081,0x0082,0x0083,0x0084,0x000A,0x0017,0x001B,
+                0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0017,0x001B,
                 0x0088,0x0089,0x008A,0x008B,0x008C,0x0005,0x0006,0x0007,
                 0x0090,0x0091,0x0016,0x0093,0x0094,0x0095,0x0096,0x0004,
                 0x0098,0x0099,0x009A,0x009B,0x0014,0x0015,0x009E,0x001A,
@@ -282,7 +282,7 @@
 
                 final static char arr[] = {
                  
-                0x00,0x01,0x02,0x03,0x37,0x2D,0x2E,0x2F,0x16,0x05,0x25,0x0B,0x0C,0x0D,0x0E,0x0F,
+                0x00,0x01,0x02,0x03,0x37,0x2D,0x2E,0x2F,0x16,0x05,0x15,0x0B,0x0C,0x0D,0x0E,0x0F,
                 0x10,0x11,0x12,0x13,0x3C,0x3D,0x32,0x26,0x18,0x19,0x3F,0x27,0x1C,0x1D,0x1E,0x1F,
                 0x40,0x5A,0x7F,0x7B,0x5B,0x6C,0x50,0x7D,0x4D,0x5D,0x5C,0x4E,0x6B,0x60,0x4B,0x61,
                 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0x7A,0x5E,0x4C,0x7E,0x6E,0x6F,
@@ -290,7 +290,7 @@
                 0xD7,0xD8,0xD9,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xBA,0xE0,0xBB,0xB0,0x6D,
                 0x79,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,
                 0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xC0,0x4F,0xD0,0xA1,0x07,
-                0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,
+                0x20,0x21,0x22,0x23,0x24,0x25,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,
                 0x30,0x31,0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,
                 0x41,0xAA,0x4A,0xB1,0x9F,0xB2,0x6A,0xB5,0xBD,0xB4,0x9A,0x8A,0x5F,0xCA,0xAF,0xBC,
                 0x90,0x8F,0xEA,0xFA,0xBE,0xA0,0xB6,0xB3,0x9D,0xDA,0x9B,0x8B,0xB7,0xB8,0xB9,0xAB,

Modified: harmony/enhanced/classlib/trunk/modules/nio_char/src/main/native/niochar/shared/additional/IBM037.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/native/niochar/shared/additional/IBM037.c?rev=804171&r1=804170&r2=804171&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio_char/src/main/native/niochar/shared/additional/IBM037.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio_char/src/main/native/niochar/shared/additional/IBM037.c
Fri Aug 14 11:47:33 2009
@@ -24,7 +24,7 @@
 
     static jboolean table[] = {
       
-     0x00,0x01,0x02,0x03,0x37,0x2D,0x2E,0x2F,0x16,0x05,0x25,0x0B,0x0C,0x0D,0x0E,0x0F,
+     0x00,0x01,0x02,0x03,0x37,0x2D,0x2E,0x2F,0x16,0x05,0x15,0x0B,0x0C,0x0D,0x0E,0x0F,
      0x10,0x11,0x12,0x13,0x3C,0x3D,0x32,0x26,0x18,0x19,0x3F,0x27,0x1C,0x1D,0x1E,0x1F,
      0x40,0x5A,0x7F,0x7B,0x5B,0x6C,0x50,0x7D,0x4D,0x5D,0x5C,0x4E,0x6B,0x60,0x4B,0x61,
      0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0x7A,0x5E,0x4C,0x7E,0x6E,0x6F,
@@ -32,7 +32,7 @@
      0xD7,0xD8,0xD9,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xBA,0xE0,0xBB,0xB0,0x6D,
      0x79,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,
      0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xC0,0x4F,0xD0,0xA1,0x07,
-     0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,
+     0x20,0x21,0x22,0x23,0x24,0x25,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,
      0x30,0x31,0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,
      0x41,0xAA,0x4A,0xB1,0x9F,0xB2,0x6A,0xB5,0xBD,0xB4,0x9A,0x8A,0x5F,0xCA,0xAF,0xBC,
      0x90,0x8F,0xEA,0xFA,0xBE,0xA0,0xB6,0xB3,0x9D,0xDA,0x9B,0x8B,0xB7,0xB8,0xB9,0xAB,
@@ -122,9 +122,9 @@
     unsigned int table[] = {
      0x009C,0x0009,0x0086,0x007F,
      0x0097,0x008D,0x008E,0x000B,0x000C,0x000D,0x000E,0x000F,
-     0x0010,0x0011,0x0012,0x0013,0x009D,0x0085,0x0008,0x0087,
+     0x0010,0x0011,0x0012,0x0013,0x009D,0x000A,0x0008,0x0087,
      0x0018,0x0019,0x0092,0x008F,0x001C,0x001D,0x001E,0x001F,
-     0x0080,0x0081,0x0082,0x0083,0x0084,0x000A,0x0017,0x001B,
+     0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0017,0x001B,
      0x0088,0x0089,0x008A,0x008B,0x008C,0x0005,0x0006,0x0007,
      0x0090,0x0091,0x0016,0x0093,0x0094,0x0095,0x0096,0x0004,
      0x0098,0x0099,0x009A,0x009B,0x0014,0x0015,0x009E,0x001A,

Added: harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CP037CharsetTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CP037CharsetTest.java?rev=804171&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CP037CharsetTest.java
(added)
+++ harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CP037CharsetTest.java
Fri Aug 14 11:47:33 2009
@@ -0,0 +1,30 @@
+ /* 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 junit.framework.TestCase;
+
+/**
+ * test case specific activity of IBM037 charset encoder/decoder
+ */
+public class CP037CharsetTest extends TestCase {
+
+    public void test_0x15_CP037() throws Exception { 
+        // Regression test for HARMONY-6308
+        assertEquals(new String(new byte[] { 0x000A }, "UTF-8"), new String(new byte[] {
0x15 }, "CP037")); 
+    }
+}

Propchange: harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/CP037CharsetTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message