changeset 9464:8bc1bbd5b659

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 c76f89695c90
children 09a77a1bdbc3
files test/java/time/tck/java/time/format/TCKFormatStyle.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/time/tck/java/time/format/TCKFormatStyle.java	Tue Jul 30 11:04:19 2013 -0700
+++ b/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);
     }
 }