harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lian...@apache.org
Subject svn commit: r518047 - in /harmony/enhanced/classlib/trunk/modules/nio_char: make/ src/main/java/java/nio/charset/ src/test/java/tests/api/java/nio/charset/
Date Wed, 14 Mar 2007 07:52:46 GMT
Author: liangyx
Date: Wed Mar 14 00:52:45 2007
New Revision: 518047

URL: http://svn.apache.org/viewvc?view=rev&rev=518047
Log:
Apply patch for HARMONY-3387([classlib][nio_char]move out 4 excluded tests)

Modified:
    harmony/enhanced/classlib/trunk/modules/nio_char/make/exclude.common
    harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetDecoder.java
    harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
    harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java

Modified: harmony/enhanced/classlib/trunk/modules/nio_char/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio_char/make/exclude.common?view=diff&rev=518047&r1=518046&r2=518047
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio_char/make/exclude.common (original)
+++ harmony/enhanced/classlib/trunk/modules/nio_char/make/exclude.common Wed Mar 14 00:52:45
2007
@@ -1,4 +0,0 @@
-tests/api/java/nio/charset/UTF16BECharsetEncoderTest.java
-tests/api/java/nio/charset/UTF16CharsetDecoderTest.java
-tests/api/java/nio/charset/UTF16CharsetEncoderTest.java
-tests/api/java/nio/charset/UTF16LECharsetEncoderTest.java

Modified: harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetDecoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetDecoder.java?view=diff&rev=518047&r1=518046&r2=518047
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetDecoder.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetDecoder.java
Wed Mar 14 00:52:45 2007
@@ -386,11 +386,11 @@
              */
             if (result.isUnderflow()) {
                 int remaining = in.remaining();
+                status = endOfInput ? END : ONGOING;
                 if (endOfInput && remaining > 0) {
                     result = CoderResult.malformedForLength(remaining);
                     in.position(in.position() + result.length());
                 } else {
-                    status = endOfInput ? END : ONGOING;
                     return result;
                 }
             }

Modified: harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java?view=diff&rev=518047&r1=518046&r2=518047
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
Wed Mar 14 00:52:45 2007
@@ -488,6 +488,7 @@
                 }
             }
             if (result.isOverflow()) {
+                status = endOfInput ? END : ONGOING;
                 return result;
             }
             CodingErrorAction action = malformAction;

Modified: harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java?view=diff&rev=518047&r1=518046&r2=518047
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java
Wed Mar 14 00:52:45 2007
@@ -90,7 +90,7 @@
 			out.clear();
 			assertSame(CoderResult.UNDERFLOW, decoder.decode(ByteBuffer
 					.wrap(new byte[] { -1, -2, 32, 0, 98 }), out, false));
-			assertTrue(decoder
+			assertFalse(decoder
 					.decode(ByteBuffer.wrap(new byte[] {}), out, true)
 					.isMalformed());
 
@@ -106,7 +106,7 @@
 			out.clear();
 			assertSame(CoderResult.UNDERFLOW, decoder.decode(ByteBuffer
 					.wrap(new byte[] { -1, -2, 32, 0, 98 }), out, false));
-			assertFalse(decoder.decode(ByteBuffer.wrap(new byte[] { 0 }), out,
+			assertTrue(decoder.decode(ByteBuffer.wrap(new byte[] { 0 }), out,
 					true).isMalformed());
 
 		}



Mime
View raw message