harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2423) [classlib][nio_char] tests/api/java/nio/charset/CharsetEncoderTests fail with malformed-input error
Date Tue, 05 Dec 2006 16:56:22 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2423?page=all ]

Paulex Yang updated HARMONY-2423:
---------------------------------

        Summary: [classlib][nio_char] tests/api/java/nio/charset/CharsetEncoderTests fail
with malformed-input error  (was: [luni] tests/api/java/nio/charset/CharsetEncoderTests fail
with malformed-input error)
    Description: 
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



  was:

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




> [classlib][nio_char] tests/api/java/nio/charset/CharsetEncoderTests fail with malformed-input
error
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2423
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2423
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message