You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2007/03/05 04:02:51 UTC

[jira] Closed: (HARMONY-2423) [classlib][nio_char] tests/api/java/nio/charset/CharsetEncoderTests fail with malformed-input error

     [ https://issues.apache.org/jira/browse/HARMONY-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paulex Yang closed HARMONY-2423.
--------------------------------

    Resolution: Fixed

No response from the reporter for long time, suppose the issue is fixed. 

> [classlib][nio_char] tests/api/java/nio/charset/CharsetEncoderTests fail with malformed-input error
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2423
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2423
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>         Assigned To: Paulex Yang
>
> unitHarmony_tests_api_java_nio_charset_ASCCharsetEncoderTest    
> unitHarmony_tests_api_java_nio_charset_GBCharsetEncoderTest    
> unitHarmony_tests_api_java_nio_charset_ISOCharsetEncoderTest    
> unitHarmony_tests_api_java_nio_charset_UTF16BECharsetEncoderTest    
> unitHarmony_tests_api_java_nio_charset_UTF16CharsetEncoderTest    
> unitHarmony_tests_api_java_nio_charset_UTF16LECharsetEncoderTest    
> unitHarmony_tests_api_java_nio_charset_UTFCharsetEncoderTest 
> These tests fail on all platform with malformed-input error
> Code for reproducing:
> import java.nio.*; 
> import java.nio.charset.*; 
> public class Test extends junit.framework.TestCase {
>     public void testAAA() {
>     try {
>         CharsetEncoder encoder = Charset.forName("iso-8859-1").newEncoder();
>         ByteBuffer out = ByteBuffer.allocate(10);
>         assertSame(CoderResult.UNDERFLOW, encoder.encode(CharBuffer
>                                 .wrap("\ud800"), out, false));
>          assertTrue(encoder.encode(CharBuffer.wrap("\udc00"),
> out,true).isMalformed());
>          System.out.println(encoder.encode(CharBuffer.wrap("\udc00"), out,
> true).toString());
>      }catch(Exception e){ 
>             e.printStackTrace(); 
>      } 
>    }
> }       
> Output:
> On RI
> .MALFORMED[1]
> Time: 0.031
> OK (1 test)
> On Harmony
> .F
> Time: 0.016
> There was 1 failure:
> 1) testAAA(Test)junit.framework.AssertionFailedError: null
>         at Test.testAAA(Test.java:31)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.