You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2009/06/16 12:59:08 UTC
[jira] Commented: (HARMONY-6207) [classlib][text]
SimpleDateFormatTest.test_parseLjava_lang_StringLjava_text_ParsePosition
would fail
[ https://issues.apache.org/jira/browse/HARMONY-6207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720063#action_12720063 ]
Tim Ellison commented on HARMONY-6207:
--------------------------------------
Jim,
Please can you explain the patch? What is the purpose of using the Date constructors with numerical arguments etc. It unclear to me what this is doing.
Thanks.
> [classlib][text] SimpleDateFormatTest.test_parseLjava_lang_StringLjava_text_ParsePosition would fail
> ----------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6207
> URL: https://issues.apache.org/jira/browse/HARMONY-6207
> Project: Harmony
> Issue Type: Test
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Attachments: HARMONY-6207.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Currently, the testcase SimpleDateFormatTest.test_parseLjava_lang_StringLjava_text_ParsePosition would fail. I've investigated the root cause of this failure and found the main reason is that the GregorianCalendar class used in the testcase is implemented by Harmony itself not delegating to ICU. So when we call getTime of GregorianCalendar to get an Date instance as the expected value, it would not equal to the one created by ICU as the result. E.g. the following testcase [1] would fail while [2] can pass. So I use Date instances directly for these failing ones in my patch.
> [1] test.parse("yyy", "99", new GregorianCalendar(99, Calendar.JANUARY, 1)
> .getTime(), 0, 2);
> [2] test.parse("yyy", "99", new com.ibm.icu.util.GregorianCalendar(99, Calendar.JANUARY, 1)
> .getTime(), 0, 2);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.