From: SourceForge.net <no...@so...> - 2011-10-04 09:01:55
|
Bugs item #3418287, was opened at 2011-10-04 11:01 Message generated for change (Tracker Item Submitted) made by matinh You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=3418287&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Martin (matinh) Assigned to: Nobody/Anonymous (nobody) Summary: RelativeDateFormatTests is locale dependent Initial Comment: Just a minor thing, but tests shouldn't depend on the locale they are executed in. RelativeDateFormatTests.testFormat() is locale dependet. Modifying the test to save and restore the locale would do the trick: public void testFormat() { // save the default locale and set a new one final Locale oldLocale = Locale.getDefault(); Locale.setDefault(Locale.ENGLISH); RelativeDateFormat rdf = new RelativeDateFormat(); String s = rdf.format(new Date(2 * 60L * 60L * 1000L + 122500L)); assertEquals("2h2m2.500s", s); // restore the old default locale Locale.setDefault(oldLocale); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=3418287&group_id=15494 |