harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Yu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6181) [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Date Mon, 27 Apr 2009 03:38:30 GMT
[classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
---------------------------------------------------------------------------------------

                 Key: HARMONY-6181
                 URL: https://issues.apache.org/jira/browse/HARMONY-6181
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M9
            Reporter: Jim Yu
             Fix For: 5.0M10


Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would
fail as below[1]. After investigation, I noticed that this failure was caused by the different
interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU
interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the
Java spec, it results in the Harmony defect in fact. Luckily,  I've got a fix by doing a trick
to solve this issue. 

[1] Failure trace: 
junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>

at junit.framework.Assert.fail(Assert.java:47) 
at junit.framework.Assert.failNotEquals(Assert.java:277) 
at junit.framework.Assert.assertEquals(Assert.java:64) 
at junit.framework.Assert.assertEquals(Assert.java:195) 
at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)

at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) 
at java.lang.reflect.Method.invoke(Method.java:258) 
at junit.framework.TestCase.runTest(TestCase.java:164) 
at junit.framework.TestCase.runBare(TestCase.java:130) 
at junit.framework.TestResult$1.protect(TestResult.java:110) 
at junit.framework.TestResult.runProtected(TestResult.java:128) 
at junit.framework.TestResult.run(TestResult.java:113) 
at junit.framework.TestCase.run(TestCase.java:120) 
at junit.framework.TestSuite.runTest(TestSuite.java:228) 
at junit.framework.TestSuite.run(TestSuite.java:223) 
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35) 
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)

at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) 
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) 
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)




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


Mime
View raw message