OpenJDK / jdk / hs
changeset 19070:24b4333be1d8
8021767: test/java/time/tck/java/time/format/TCKFormatStyle.java failing
Summary: Correct to use fixed locale, not locale of test environment
Reviewed-by: alanb, okutsu
Contributed-by: roger.riggs@oracle.com
author | sherman |
---|---|
date | Tue, 30 Jul 2013 14:43:19 -0700 |
parents | 1d9cb0d080e3 |
children | bc096b85d91d |
files | jdk/test/java/time/tck/java/time/format/TCKFormatStyle.java |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/test/java/time/tck/java/time/format/TCKFormatStyle.java Tue Jul 30 11:04:19 2013 -0700 +++ b/jdk/test/java/time/tck/java/time/format/TCKFormatStyle.java Tue Jul 30 14:43:19 2013 -0700 @@ -64,6 +64,7 @@ import java.time.format.DateTimeFormatterBuilder; import java.time.format.FormatStyle; import java.time.temporal.Temporal; +import java.util.Locale; import static org.testng.Assert.assertEquals; @@ -108,6 +109,7 @@ public void test_formatStyle(Temporal temporal, FormatStyle style, String formattedStr) { DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder(); DateTimeFormatter formatter = builder.appendLocalized(style, style).appendLiteral(" ").appendZoneOrOffsetId().toFormatter(); + formatter = formatter.withLocale(Locale.US); assertEquals(formatter.format(temporal), formattedStr); } }