--- old/test/java/time/test/java/time/format/TestTextParser.java 2016-12-26 17:42:19.976312440 +0300 +++ new/test/java/time/test/java/time/format/TestTextParser.java 2016-12-26 17:42:19.908312438 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -213,20 +213,6 @@ }; } - // Test data is dependent on localized resources. - @DataProvider(name="parseStandaloneText") - Object[][] providerStandaloneText() { - // Locale, TemporalField, TextStyle, expected value, input text - return new Object[][] { - {RUSSIAN, MONTH_OF_YEAR, TextStyle.FULL_STANDALONE, 1, "\u044f\u043d\u0432\u0430\u0440\u044c"}, - {RUSSIAN, MONTH_OF_YEAR, TextStyle.FULL_STANDALONE, 12, "\u0434\u0435\u043a\u0430\u0431\u0440\u044c"}, - {RUSSIAN, MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE, 1, "\u044f\u043d\u0432."}, - {RUSSIAN, MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE, 12, "\u0434\u0435\u043a."}, - {FINNISH, DAY_OF_WEEK, TextStyle.FULL_STANDALONE, 2, "tiistai"}, - {FINNISH, DAY_OF_WEEK, TextStyle.SHORT_STANDALONE, 2, "ti"}, - }; - } - @DataProvider(name="parseDayOfWeekText") Object[][] providerDayOfWeekData() { return new Object[][] { @@ -234,26 +220,9 @@ {Locale.US, "e", "1", DayOfWeek.SUNDAY}, {Locale.US, "ee", "01", DayOfWeek.SUNDAY}, {Locale.US, "c", "1", DayOfWeek.SUNDAY}, - - {Locale.UK, "e", "1", DayOfWeek.MONDAY}, - {Locale.UK, "ee", "01", DayOfWeek.MONDAY}, - {Locale.UK, "c", "1", DayOfWeek.MONDAY}, }; } - // Test data is dependent on localized resources. - @DataProvider(name="parseLenientText") - Object[][] providerLenientText() { - // Locale, TemporalField, expected value, input text - return new Object[][] { - {RUSSIAN, MONTH_OF_YEAR, 1, "\u044f\u043d\u0432\u0430\u0440\u044f"}, // full format - {RUSSIAN, MONTH_OF_YEAR, 1, "\u044f\u043d\u0432\u0430\u0440\u044c"}, // full standalone - {RUSSIAN, MONTH_OF_YEAR, 1, "\u044f\u043d\u0432."}, // short format - {RUSSIAN, MONTH_OF_YEAR, 1, "\u044f\u043d\u0432."}, // short standalone - }; - } - - @Test(dataProvider="parseText") public void test_parseText(TemporalField field, TextStyle style, int value, String input) throws Exception { @@ -269,14 +238,6 @@ assertEquals(pos.getIndex(), input.length()); } - @Test(dataProvider="parseStandaloneText") - public void test_parseStandaloneText(Locale locale, TemporalField field, TextStyle style, int expectedValue, String input) { - DateTimeFormatter formatter = getFormatter(field, style).withLocale(locale); - ParsePosition pos = new ParsePosition(0); - assertEquals(formatter.parseUnresolved(input, pos).getLong(field), (long) expectedValue); - assertEquals(pos.getIndex(), input.length()); - } - @Test(dataProvider="parseDayOfWeekText") public void test_parseDayOfWeekText(Locale locale, String pattern, String input, DayOfWeek expected) { DateTimeFormatter formatter = getPatternFormatter(pattern).withLocale(locale); @@ -374,25 +335,6 @@ } //----------------------------------------------------------------------- - public void test_parse_french_short_strict_full_noMatch() throws Exception { - setStrict(true); - ParsePosition pos = new ParsePosition(0); - getFormatter(MONTH_OF_YEAR, TextStyle.SHORT).withLocale(Locale.FRENCH) - .parseUnresolved("janvier", pos); - assertEquals(pos.getErrorIndex(), 0); - } - - public void test_parse_french_short_strict_short_match() throws Exception { - setStrict(true); - ParsePosition pos = new ParsePosition(0); - assertEquals(getFormatter(MONTH_OF_YEAR, TextStyle.SHORT).withLocale(Locale.FRENCH) - .parseUnresolved("janv.", pos) - .getLong(MONTH_OF_YEAR), - 1L); - assertEquals(pos.getIndex(), 5); - } - - //----------------------------------------------------------------------- public void test_parse_full_lenient_full_match() throws Exception { setStrict(false); ParsePosition pos = new ParsePosition(0); @@ -436,15 +378,6 @@ assertEquals(pos.getIndex(), 1); } - @Test(dataProvider="parseLenientText") - public void test_parseLenientText(Locale locale, TemporalField field, int expectedValue, String input) { - setStrict(false); - ParsePosition pos = new ParsePosition(0); - DateTimeFormatter formatter = getFormatter(field).withLocale(locale); - assertEquals(formatter.parseUnresolved(input, pos).getLong(field), (long) expectedValue); - assertEquals(pos.getIndex(), input.length()); - } - //----------------------------------------------------------------------- @DataProvider(name="parseChronoLocalDate") Object[][] provider_chronoLocalDate() {