From 36fbe17a4fc6646dc88a37675ded1d0497e92f73 Mon Sep 17 00:00:00 2001 From: rriggs Date: Wed, 9 Oct 2013 11:02:55 -0400 Subject: [PATCH] 8024612: java/time/tck/java/time/format/TCKDateTimeFormatters.java failed Summary: The test should be using the Locale.Category.FORMAT to verify the test data Reviewed-by: lancea --- .../time/tck/java/time/format/TCKDateTimeFormatters.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java b/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java index f30eb9906..d431fa4ac 100644 --- a/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java +++ b/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java @@ -126,9 +126,10 @@ public class TCKDateTimeFormatters { @Test public void test_pattern_String() { DateTimeFormatter test = DateTimeFormatter.ofPattern("d MMM yyyy"); + Locale fmtLocale = Locale.getDefault(Locale.Category.FORMAT); assertEquals(test.format(LocalDate.of(2012, 6, 30)), "30 " + - Month.JUNE.getDisplayName(TextStyle.SHORT, Locale.getDefault()) + " 2012"); - assertEquals(test.getLocale(), Locale.getDefault()); + Month.JUNE.getDisplayName(TextStyle.SHORT, fmtLocale) + " 2012"); + assertEquals(test.getLocale(), fmtLocale, "Locale.Category.FORMAT"); } @Test(expectedExceptions=IllegalArgumentException.class) -- GitLab