Home
last modified time | relevance | path

Searched refs:getFormatter (Results 1 – 22 of 22) sorted by relevance

/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestSettingsParser.java77 getFormatter().formatTo(dta, buf); in test_print_sensitive()
83 getFormatter().formatTo(dta, buf); in test_print_strict()
98 getFormatter().parseUnresolved("a", pos); in test_parse_changeStyle_sensitive()
105 getFormatter().parseUnresolved("a", pos); in test_parse_changeStyle_insensitive()
112 getFormatter().parseUnresolved("a", pos); in test_parse_changeStyle_strict()
119 getFormatter().parseUnresolved("a", pos); in test_parse_changeStyle_lenient()
126 assertEquals(getFormatter().toString(), "ParseCaseSensitive(true)"); in test_toString_sensitive()
131 assertEquals(getFormatter().toString(), "ParseCaseSensitive(false)"); in test_toString_insensitive()
136 assertEquals(getFormatter().toString(), "ParseStrict(true)"); in test_toString_strict()
141 assertEquals(getFormatter().toString(), "ParseStrict(false)"); in test_toString_lenient()
DTestPadPrinterDecorator.java78 getFormatter().formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
84 getFormatter().formatTo(LocalDate.of(2008, 12, 3), buf); in test_print_fullDateTime()
91 getFormatter().formatTo(EMPTY_DTA, buf); in test_print_append()
98 getFormatter().formatTo(EMPTY_DTA, buf); in test_print_noPadRequiredSingle()
104 getFormatter().formatTo(EMPTY_DTA, buf); in test_print_padRequiredSingle()
110 getFormatter().formatTo(EMPTY_DTA, buf); in test_print_noPadRequiredMultiple()
116 getFormatter().formatTo(EMPTY_DTA, buf); in test_print_padRequiredMultiple()
123 getFormatter().formatTo(EMPTY_DTA, buf); in test_print_overPad()
129 assertEquals(getFormatter().toString(), "Pad('Y',5)"); in test_toString1()
134 assertEquals(getFormatter().toString(), "Pad('Y',5,'-')"); in test_toString2()
DTestZoneOffsetParser.java91 getFormatter(pattern, noOffsetText).parseUnresolved(text, new ParsePosition(pos)); in test_parse_error()
100 TemporalAccessor parsed = getFormatter("+HH:MM:ss", "Z").parseUnresolved("Z", pos); in test_parse_exactMatch_UTC()
107 TemporalAccessor parsed = getFormatter("+HH:MM:ss", "Z").parseUnresolved("ZOTHER", pos); in test_parse_startStringMatch_UTC()
114 … TemporalAccessor parsed = getFormatter("+HH:MM:ss", "Z").parseUnresolved("OTHERZOTHER", pos); in test_parse_midStringMatch_UTC()
121 TemporalAccessor parsed = getFormatter("+HH:MM:ss", "Z").parseUnresolved("OTHERZ", pos); in test_parse_endStringMatch_UTC()
129 TemporalAccessor parsed = getFormatter("+HH:MM:ss", "").parseUnresolved("", pos); in test_parse_exactMatch_UTC_EmptyUTC()
136 TemporalAccessor parsed = getFormatter("+HH:MM:ss", "").parseUnresolved("OTHER", pos); in test_parse_startStringMatch_UTC_EmptyUTC()
143 TemporalAccessor parsed = getFormatter("+HH:MM:ss", "").parseUnresolved("OTHEROTHER", pos); in test_parse_midStringMatch_UTC_EmptyUTC()
150 TemporalAccessor parsed = getFormatter("+HH:MM:ss", "").parseUnresolved("OTHER", pos); in test_parse_endStringMatch_UTC_EmptyUTC()
234 TemporalAccessor parsed = getFormatter(pattern, "Z").parseUnresolved(parse, pos); in test_parse_exactMatch()
[all …]
DTestCharLiteralPrinter.java75 getFormatter('a').formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
81 getFormatter('a').formatTo(dta, buf); in test_print_dateTime()
86 getFormatter('a').formatTo(dta, buf); in test_print_emptyAppendable()
92 assertEquals(getFormatter('a').toString(), "'a'"); in test_toString()
97 assertEquals(getFormatter('\'').toString(), "''"); in test_toString_apos()
DTestStringLiteralPrinter.java75 getFormatter("hello").formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
81 getFormatter("hello").formatTo(dta, buf); in test_print_dateTime()
89 getFormatter("hello").formatTo(dta, buf); in test_print_emptyAppendable()
95 assertEquals(getFormatter("hello").toString(), "'hello'"); in test_toString()
99 assertEquals(getFormatter("o'clock").toString(), "'o''clock'"); in test_toString_apos()
DTestTextParser.java100 getFormatter(field, style).parseUnresolved(text, new ParsePosition(pos)); in test_parse_error()
109 assertEquals(getFormatter(DAY_OF_WEEK, TextStyle.FULL) in test_parse_midStr()
117 assertEquals(getFormatter(DAY_OF_WEEK, TextStyle.SHORT) in test_parse_remainderIgnored()
127 getFormatter(DAY_OF_WEEK, TextStyle.FULL).parseUnresolved("Munday", pos); in test_parse_noMatch1()
135 getFormatter(DAY_OF_WEEK, TextStyle.FULL).parseUnresolved("Monday", pos); in test_parse_noMatch2()
143 getFormatter(DAY_OF_WEEK, TextStyle.FULL).parseUnresolved("Monday", pos); in test_parse_noMatch_atEnd()
251 … assertEquals(getFormatter(field, style).parseUnresolved(input, pos).getLong(field), (long) value); in test_parseText()
258 … assertEquals(getFormatter(field, style).parseUnresolved(input, pos).getLong(field), (long) value); in test_parseNumber()
264 DateTimeFormatter formatter = getFormatter(field, style).withLocale(locale); in test_parseStandaloneText()
287 getFormatter(field, style).parseUnresolved(input.toUpperCase(Locale.ROOT), pos); in test_parse_strict_caseSensitive_parseUpper()
[all …]
DTestFractionPrinterParser.java84 …private DateTimeFormatter getFormatter(TemporalField field, int minWidth, int maxWidth, boolean de… in getFormatter() method in TestFractionPrinterParser
93 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
98 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(LocalTime.of(12, 30, 40, 3), buf); in test_print_append()
181getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).formatTo(new MockFieldValue(NANO_OF_SECOND… in test_print_nanos()
190getFormatter(NANO_OF_SECOND, minWidth, maxWidth, false).formatTo(new MockFieldValue(NANO_OF_SECON… in test_print_nanos_noDecimalPoint()
223getFormatter(SECOND_OF_MINUTE, minWidth, maxWidth, true).formatTo(new MockFieldValue(SECOND_OF_MIN… in test_print_seconds()
232getFormatter(SECOND_OF_MINUTE, minWidth, maxWidth, false).formatTo(new MockFieldValue(SECOND_OF_MI… in test_print_seconds_noDecimalPoint()
246 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).parseUnresolved(r… in test_reverseParse()
254 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, false).parseUnresolved(… in test_reverseParse_noDecimalPoint()
264 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).parseUnresolved(r… in test_reverseParse_followedByNonDigit()
[all …]
DTestNumberPrinter.java84 getFormatter(DAY_OF_MONTH, 1, 2, SignStyle.NEVER).formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
89 getFormatter(DAY_OF_MONTH, 1, 2, SignStyle.NEVER).formatTo(LocalDate.of(2012, 1, 3), buf); in test_print_append()
187getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NOT_NEGATIVE).formatTo(new MockFieldValue(DAY… in test_pad_NOT_NEGATIVE()
204getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NEVER).formatTo(new MockFieldValue(DAY_OF_MON… in test_pad_NEVER()
220getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NORMAL).formatTo(new MockFieldValue(DAY_OF_MO… in test_pad_NORMAL()
236getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.ALWAYS).formatTo(new MockFieldValue(DAY_OF_MO…
252getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.EXCEEDS_PAD).formatTo(new MockFieldValue(DAY_…
271 … assertEquals(getFormatter(HOUR_OF_DAY, 1, 19, SignStyle.NORMAL).toString(), "Value(HourOfDay)");
275 …assertEquals(getFormatter(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE).toString(), "Value(HourOfDay,…
279 …assertEquals(getFormatter(HOUR_OF_DAY, 1, 2, SignStyle.NOT_NEGATIVE).toString(), "Value(HourOfDay,…
DAbstractTestPrinterParser.java116 protected DateTimeFormatter getFormatter() { in getFormatter() method in AbstractTestPrinterParser
120 protected DateTimeFormatter getFormatter(char c) { in getFormatter() method in AbstractTestPrinterParser
124 protected DateTimeFormatter getFormatter(String s) { in getFormatter() method in AbstractTestPrinterParser
128 protected DateTimeFormatter getFormatter(TemporalField field) { in getFormatter() method in AbstractTestPrinterParser
132 protected DateTimeFormatter getFormatter(TemporalField field, TextStyle style) { in getFormatter() method in AbstractTestPrinterParser
136 …protected DateTimeFormatter getFormatter(TemporalField field, int minWidth, int maxWidth, SignStyl… in getFormatter() method in AbstractTestPrinterParser
140 protected DateTimeFormatter getFormatter(String pattern, String noOffsetText) { in getFormatter() method in AbstractTestPrinterParser
DTestTextPrinter.java93 getFormatter(DAY_OF_WEEK, TextStyle.FULL).formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
98 getFormatter(DAY_OF_WEEK, TextStyle.FULL).formatTo(LocalDate.of(2012, 4, 18), buf); in test_print_append()
248 getFormatter(field, style).formatTo(new MockFieldValue(field, value), buf); in test_format()
262 getFormatter(field, style).withChronology(JapaneseChronology.INSTANCE).formatTo(ld, buf); in test_formatJapaneseEra()
268 getFormatter(field, style).withLocale(locale).formatTo(LocalDate.of(2013, 1, 1), buf); in test_standaloneNames()
274getFormatter(MONTH_OF_YEAR, TextStyle.FULL).withLocale(Locale.FRENCH).formatTo(LocalDate.of(2012, … in test_print_french_long()
279getFormatter(MONTH_OF_YEAR, TextStyle.SHORT).withLocale(Locale.FRENCH).formatTo(LocalDate.of(2012,… in test_print_french_short()
285 assertEquals(getFormatter(MONTH_OF_YEAR, TextStyle.FULL).toString(), "Text(MonthOfYear)"); in test_toString1()
289 … assertEquals(getFormatter(MONTH_OF_YEAR, TextStyle.SHORT).toString(), "Text(MonthOfYear,SHORT)"); in test_toString2()
DTestZoneOffsetPrinter.java153 getFormatter(pattern, "NO-OFFSET").formatTo(offset, buf); in test_format()
159 …assertEquals(getFormatter(pattern, "NO-OFFSET").toString(), "Offset(" + pattern + ",'NO-OFFSET')"); in test_toString()
165 getFormatter("+HH:MM:ss", "Z").formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
169 getFormatter("+HH:MM:ss", "Z").formatTo(OFFSET_0130, buf); in test_print_emptyAppendable()
DTestCharLiteralParser.java108 TemporalAccessor parsed = getFormatter(c).parseUnresolved(text, ppos); in test_parse_success()
132 getFormatter(c).parseUnresolved(text, ppos); in test_parse_error()
DTestStringLiteralParser.java111 TemporalAccessor parsed = getFormatter(s).parseUnresolved(text, ppos); in test_parse_success()
135 getFormatter(s).parseUnresolved(text, ppos); in test_parse_error()
DTestZoneTextPrinterParser.java63 protected static DateTimeFormatter getFormatter(Locale locale, TextStyle style) { in getFormatter() method in TestZoneTextPrinterParser
114 String result = getFormatter(locale, style).format(zdt); in printText()
210 DateTimeFormatter fmt = getFormatter(locale, style, ci); in parseText()
248 private DateTimeFormatter getFormatter(Locale locale, TextStyle style, boolean ci) { in getFormatter() method in TestZoneTextPrinterParser
DTestNumberParser.java98 getFormatter(field, min, max, style).parseUnresolved(text, new ParsePosition(pos)); in test_parse_error()
169 DateTimeFormatter dtf = getFormatter(DAY_OF_MONTH, minWidth, maxWidth, signStyle); in test_parse_fresh()
189 DateTimeFormatter dtf = getFormatter(DAY_OF_WEEK, minWidth, maxWidth, signStyle); in test_parse_textField()
310 … TemporalAccessor parsed = getFormatter(DAY_OF_MONTH, min, max, style).parseUnresolved(input, pos); in test_parseSignsStrict()
420 … TemporalAccessor parsed = getFormatter(DAY_OF_MONTH, min, max, style).parseUnresolved(input, pos); in test_parseSignsLenient()
511 … TemporalAccessor parsed = getFormatter(DAY_OF_MONTH, min, max, style).parseUnresolved(input, pos); in test_parseDigitsLenient()
DTestDateTimeTextProvider.java184 DateTimeFormatter fmt = getFormatter(field, style).withLocale(locale); in test_getText()
/libcore/luni/src/test/java/libcore/java/util/logging/
DOldFileHandlerTest.java99 assertNotNull("Formatter is null", handler.getFormatter()); in testFileHandler()
123 assertNotNull("Formatter is null", handler.getFormatter()); in testFileHandler_1params()
154 assertFileContent(TEMPPATH + SEP + "log", "string", h.getFormatter()); in testFileHandler_1params()
155 assertFileContent(TEMPPATH + SEP + "log", "string.1", h.getFormatter()); in testFileHandler_1params()
156 assertFileContent(TEMPPATH + SEP + "log", "string.2", h.getFormatter()); in testFileHandler_1params()
157 assertFileContent(TEMPPATH + SEP + "log", "string.3", h.getFormatter()); in testFileHandler_1params()
168 assertFileContent(TEMPPATH + SEP + "log", "string0.log", h.getFormatter()); in testFileHandler_1params()
187 .getFormatter()); in testFileHandler_1params()
189 .getFormatter()); in testFileHandler_1params()
209 assertNotNull("Formatter is null", handler.getFormatter()); in testFileHandler_2params()
[all …]
DOldMemoryHandlerTest.java77 assertNotNull("Formatter should not be null", handler.getFormatter()); in testMemoryHandler()
/libcore/ojluni/src/main/java/java/util/logging/
DStreamHandler.java211 msg = getFormatter().format(record); in publish()
221 writer.write(getFormatter().getHead(this)); in publish()
273 writer.write(getFormatter().getHead(this)); in flushAndClose()
276 writer.write(getFormatter().getTail(this)); in flushAndClose()
DHandler.java132 public Formatter getFormatter() { in getFormatter() method in Handler
/libcore/luni/src/main/java/libcore/icu/
DRelativeDateTimeFormatter.java168 str = getFormatter(icuLocale, style, displayContext) in getRelativeTimeSpanString()
175 str = getFormatter(icuLocale, style, displayContext) in getRelativeTimeSpanString()
222 getFormatter(icuLocale, style, displayContext); in getRelativeTimeSpanString()
324 return getFormatter(icuLocale, style, capitalizationContext) in getRelativeDateTimeString()
337 private static android.icu.text.RelativeDateTimeFormatter getFormatter( in getFormatter() method in RelativeDateTimeFormatter
DDateIntervalFormat.java79 getFormatter(skeleton, icuLocale, icuTimeZone); in formatDateRange()
85 private static android.icu.text.DateIntervalFormat getFormatter(String skeleton, ULocale locale, in getFormatter() method in DateIntervalFormat