提交 0cc1d3f3 编写于 作者: S sherman

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
上级 b62c6249
......@@ -64,6 +64,7 @@ import java.time.format.DateTimeFormatter;
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 class TCKFormatStyle {
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);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册