Home
last modified time | relevance | path

Searched refs:dtf (Results 1 – 11 of 11) sorted by relevance

/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestUnicodeExtension.java855 DateTimeFormatter dtf = in test_localizedBy()
858 assertEquals(dtf.getChronology(), chronoExpected); in test_localizedBy()
859 assertEquals(dtf.getZone(), zoneExpected); in test_localizedBy()
860 String formatted = dtf.format(ZDT); in test_localizedBy()
862 assertEquals(dtf.parse(formatted, ZonedDateTime::from), in test_localizedBy()
878 DateTimeFormatter dtf = in test_withLocale() local
881 assertEquals(dtf.getChronology(), chronoExpected); in test_withLocale()
882 assertEquals(dtf.getZone(), zoneExpected); in test_withLocale()
883 String formatted = dtf.format(ZDT); in test_withLocale()
886 assertEquals(dtf.parse(formatted, ZonedDateTime::from), in test_withLocale()
[all …]
DTestNonIsoFormatter.java159 DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL) in test_formatLocalizedDate() local
162 String text = dtf.format(date); in test_formatLocalizedDate()
169 DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL) in test_parseLocalizedText() local
172 TemporalAccessor temporal = dtf.parse(text); in test_parseLocalizedText()
179 DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL) in test_parseInvalidText() local
181 dtf.parse(text); in test_parseInvalidText()
188 DateTimeFormatter dtf = new DateTimeFormatterBuilder().appendChronologyText(TextStyle.SHORT) in test_chronoNames() local
190 String text = dtf.format(chrono.dateNow()); in test_chronoNames()
192 TemporalAccessor ta = dtf.parse(text); in test_chronoNames()
200 DateTimeFormatter dtf = new DateTimeFormatterBuilder() in test_lenientEraYear() local
[all …]
DTestReducedPrinter.java272 DateTimeFormatter dtf = builder.toFormatter(); in test_printAdjacent() local
275 String actual = dtf.format(ld); in test_printAdjacent()
276 assertEquals(actual, text, "formatter output: " + dtf); in test_printAdjacent()
DTestNumberParser.java169 DateTimeFormatter dtf = getFormatter(DAY_OF_MONTH, minWidth, maxWidth, signStyle); in test_parse_fresh() local
172dtf = builder.appendValue(DAY_OF_YEAR, subsequentWidth).toFormatter(locale).withDecimalStyle(decim… in test_parse_fresh()
174 TemporalAccessor parsed = dtf.parseUnresolved(text, ppos); in test_parse_fresh()
189 DateTimeFormatter dtf = getFormatter(DAY_OF_WEEK, minWidth, maxWidth, signStyle); in test_parse_textField() local
192dtf = builder.appendValue(DAY_OF_YEAR, subsequentWidth).toFormatter(locale).withDecimalStyle(decim… in test_parse_textField()
194 TemporalAccessor parsed = dtf.parseUnresolved(text, ppos); in test_parse_textField()
DTestReducedParser.java372 DateTimeFormatter dtf = builder.toFormatter(); in test_parseAdjacent() local
374 TemporalAccessor parsed = dtf.parseUnresolved(input, ppos); in test_parseAdjacent()
375 …ertNotNull(parsed, String.format("parse failed: ppos: %s, formatter: %s%n", ppos.toString(), dtf)); in test_parseAdjacent()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKLocalizedFieldParser.java128 DateTimeFormatter dtf = b.toFormatter(locale); in test_parse_textField() local
129 TemporalAccessor parsed = dtf.parseUnresolved(text, ppos); in test_parse_textField()
160 DateTimeFormatter dtf = b.toFormatter(locale); in test_parse_textLocalDate() local
161 TemporalAccessor parsed = dtf.parseUnresolved(text, ppos); in test_parse_textLocalDate()
171 LocalDate result = LocalDate.parse(text, dtf); in test_parse_textLocalDate()
197 DateTimeFormatter dtf = b.toFormatter(locale); in test_parse_WeekBasedYear() local
198 TemporalAccessor parsed = dtf.parseUnresolved(text, ppos); in test_parse_WeekBasedYear()
208 LocalDate result = LocalDate.parse(text, dtf); in test_parse_WeekBasedYear()
DTCKLocalizedFieldPrinter.java124 DateTimeFormatter dtf = DateTimeFormatter.ofPattern(pattern, locale); in test_print_WeekBasedYear() local
125 String result = dtf.format(date); in test_print_WeekBasedYear()
DTCKDateTimeFormatter.java866 … DateTimeFormatter dtf = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); in test_toFormat_parseObject_StringParsePosition_invalidPosition_tooBig() local
868 Format test = dtf.toFormat(); in test_toFormat_parseObject_StringParsePosition_invalidPosition_tooBig()
876 … DateTimeFormatter dtf = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); in test_toFormat_parseObject_StringParsePosition_invalidPosition_tooSmall() local
878 Format test = dtf.toFormat(); in test_toFormat_parseObject_StringParsePosition_invalidPosition_tooSmall()
DTCKDateTimeFormatterBuilder.java1266 DateTimeFormatter dtf = DateTimeFormatter.ofPattern(pattern); in test_adjacent_fraction() local
1267 LocalDateTime actual = LocalDateTime.parse(input, dtf); in test_adjacent_fraction()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/xml/parsers/
DSAXParserFactoryTest.java148 SAXParserFactory dtf = SAXParserFactory.newInstance(); in test_newInstance() local
149 assertNotNull("New Instance of DatatypeFactory is null", dtf); in test_newInstance()
/libcore/luni/src/test/java/libcore/java/text/
DOldDateFormatTest.java96 String dtf = format.format(current); in test_formatLjava_util_Date() local
99 assertEquals("Incorrect date format", sdf.format(current), dtf); in test_formatLjava_util_Date()