harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Lu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6634) org.apache.harmony.text.tests.java.text.DateFormatTest.test_getDateTimeInstanceII fails on windows
Date Tue, 24 Aug 2010 09:08:16 GMT

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

Jonathan Lu updated HARMONY-6634:
---------------------------------

    Environment: windows xp sp3, 32bit, Simplified Chinese  (was: windows xp sp3, 32bit)

> org.apache.harmony.text.tests.java.text.DateFormatTest.test_getDateTimeInstanceII fails
on windows
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6634
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6634
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: windows xp sp3, 32bit, Simplified Chinese
>            Reporter: Jonathan Lu
>            Priority: Minor
>
> The reason is from java.text.DateFormat:
> public final static DateFormat getDateTimeInstance(int dateStyle,
>             int timeStyle, Locale locale) {
>         checkTimeStyle(timeStyle);
>         checkDateStyle(dateStyle);
>         com.ibm.icu.text.DateFormat icuFormat = com.ibm.icu.text.DateFormat.getDateTimeInstance(dateStyle,
timeStyle, locale);
>         return new SimpleDateFormat(locale, (com.ibm.icu.text.SimpleDateFormat)icuFormat);
>     }
> If the value of dateStyle is DateFormat.LONG and the value of timeStyle is DateFormat.SHORT,
the toPattern() method of SimpleDateFormat will lose one space character (' ') between the
date part and the time part. But RI will pass the test by giving correct output.
> The stack trace is here:
> junit.framework.AssertionFailedError: Wrong default
> 	at junit.framework.Assert.fail(Assert.java:47)
> 	at junit.framework.Assert.assertTrue(Assert.java:20)
> 	at org.apache.harmony.text.tests.java.text.DateFormatTest.testDateTime(DateFormatTest.java:208)
> 	at org.apache.harmony.text.tests.java.text.DateFormatTest.test_getDateTimeInstanceII(DateFormatTest.java:230)
> 	at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> 	at java.lang.reflect.Method.invoke(Method.java:316)
> 	at junit.framework.TestCase.runTest(TestCase.java:168)
> 	at junit.framework.TestCase.runBare(TestCase.java:134)
> 	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:124)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:232)
> 	at junit.framework.TestSuite.run(TestSuite.java:227)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:466)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

-- 
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