/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | ChoiceFormatTest.java | 404 ChoiceFormat fmt = new ChoiceFormat( in test_formatL() local 407 assertEquals("NEGATIVE_ONE", fmt.format(Long.MIN_VALUE)); in test_formatL() 408 assertEquals("NEGATIVE_ONE", fmt.format(-1)); in test_formatL() 409 assertEquals("ZERO", fmt.format(0)); in test_formatL() 410 assertEquals("ONE", fmt.format(1)); in test_formatL() 411 assertEquals("GREATER_THAN_ONE", fmt.format(Long.MAX_VALUE)); in test_formatL() 418 ChoiceFormat fmt = new ChoiceFormat( in test_formatD() local 420 assertEquals("NEGATIVE_ONE", fmt.format(Double.NEGATIVE_INFINITY)); in test_formatD() 421 assertEquals("NEGATIVE_ONE", fmt.format(-999999999D)); in test_formatD() 422 assertEquals("NEGATIVE_ONE", fmt.format(-1.1)); in test_formatD() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OldFormattableTest.java | 49 Formatter fmt = new Formatter(); in testFormatTo() local 52 assertTrue(fmt.format("%1.1s", mf).toString().equals("single precision ")); in testFormatTo() 53 assertTrue(fmt.format("%2.1s", mf).toString().equals("single precision single precision ")); in testFormatTo() 54 …assertTrue(fmt.format("%2.2s", mf).toString().equals("single precision single precision double pre… in testFormatTo()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKDateTimeFormatter.java | 125 private DateTimeFormatter fmt; field in TCKDateTimeFormatter 129 fmt = new DateTimeFormatterBuilder().appendLiteral("ONE") in setUp() 137 … DateTimeFormatter base = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); in test_withLocale() 144 … DateTimeFormatter base = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); in test_withLocale_null() 151 DateTimeFormatter test = fmt; in test_withChronology() 162 DateTimeFormatter test = fmt; in test_withZone() 403 … DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); in test_format_TemporalAccessor_simple() 410 … DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); in test_format_TemporalAccessor_noSuchField() 416 … DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); in test_format_TemporalAccessor_null() 423 … DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD); in test_print_TemporalAppendable() [all …]
|
D | TCKDateTimeParseResolver.java | 1169 DateTimeFormatter fmt = new DateTimeFormatterBuilder() in test_parse_fromField_InstantSeconds() local 1171 TemporalAccessor acc = fmt.parse("86402"); in test_parse_fromField_InstantSeconds() 1186 DateTimeFormatter fmt = new DateTimeFormatterBuilder() in test_parse_fromField_InstantSeconds_NanoOfSecond() local 1188 TemporalAccessor acc = fmt.parse("86402.123456789"); in test_parse_fromField_InstantSeconds_NanoOfSecond() 1204 DateTimeFormatter fmt = new DateTimeFormatterBuilder() in test_parse_fromField_SecondOfDay() local 1206 TemporalAccessor acc = fmt.parse("864"); in test_parse_fromField_SecondOfDay() 1219 DateTimeFormatter fmt = new DateTimeFormatterBuilder() in test_parse_fromField_SecondOfDay_NanoOfSecond() local 1221 TemporalAccessor acc = fmt.parse("864.123456789"); in test_parse_fromField_SecondOfDay_NanoOfSecond() 1235 DateTimeFormatter fmt = new DateTimeFormatterBuilder() in test_parse_fromField_SecondOfMinute() local 1237 TemporalAccessor acc = fmt.parse("32"); in test_parse_fromField_SecondOfMinute() [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | Console.java | 170 public Console format(String fmt, Object ...args) { in format() argument 171 formatter.format(fmt, args).flush(); in format() 244 public String readLine(String fmt, Object ... args) { in readLine() argument 248 if (fmt.length() != 0) in readLine() 249 pw.format(fmt, args); in readLine() 308 public char[] readPassword(String fmt, Object ... args) { in readPassword() argument 319 if (fmt.length() != 0) in readPassword() 320 pw.format(fmt, args); in readPassword()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | AbstractTCKTest.java | 212 Formatter fmt = new Formatter(sb); in dumpSerialStream() local 213 fmt.format(" byte[] bytes = {" ); in dumpSerialStream() 217 fmt.format("%n "); in dumpSerialStream() 219 fmt.format(" %3d,", bytes[i] & 0xff); in dumpSerialStream() 221 fmt.format(" /*"); in dumpSerialStream() 225 fmt.format(" %c", bytes[s + j] & 0xff); in dumpSerialStream() 227 fmt.format(" */"); in dumpSerialStream() 230 fmt.format("%n };%n"); in dumpSerialStream()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | SimpleDateFormatTest.java | 206 private static long parseTimeUtc(String fmt, String value) { in parseTimeUtc() argument 207 return parseDateUtc(Locale.ENGLISH, fmt, value).getTime().getTime(); in parseTimeUtc() 226 private String formatDateUtc(Locale l, String fmt) { in formatDateUtc() argument 227 return formatDate(l, fmt, UTC); in formatDateUtc() 230 private String formatDate(Locale l, String fmt, TimeZone tz) { in formatDate() argument 231 DateFormat dateFormat = new SimpleDateFormat(fmt, l); in formatDate() 236 private static void assertCannotParse(Locale l, String fmt, String value) { in assertCannotParse() argument 237 SimpleDateFormat sdf = new SimpleDateFormat(fmt, l); in assertCannotParse() 241 assertNull("Value " + value + " must not parse in locale " + l + " with format " + fmt, d); in assertCannotParse() 249 private static Calendar parseDateUtc(Locale l, String fmt, String value) { in parseDateUtc() argument [all …]
|
D | DateFormatSymbolsTest.java | 88 private String formatDate(Locale l, String fmt, DateFormatSymbols dfs) { in formatDate() argument 89 SimpleDateFormat sdf = new SimpleDateFormat(fmt, l); in formatDate()
|
/libcore/ojluni/src/main/java/java/text/ |
D | MessageFormat.java | 530 Format fmt = formats[i]; in toPattern() local 531 if (fmt == null) { in toPattern() 533 } else if (fmt instanceof NumberFormat) { in toPattern() 534 if (fmt.equals(NumberFormat.getInstance(locale))) { in toPattern() 536 } else if (fmt.equals(NumberFormat.getCurrencyInstance(locale))) { in toPattern() 538 } else if (fmt.equals(NumberFormat.getPercentInstance(locale))) { in toPattern() 540 } else if (fmt.equals(NumberFormat.getIntegerInstance(locale))) { in toPattern() 543 if (fmt instanceof DecimalFormat) { in toPattern() 544 result.append(",number,").append(((DecimalFormat)fmt).toPattern()); in toPattern() 545 } else if (fmt instanceof ChoiceFormat) { in toPattern() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestZoneTextPrinterParser.java | 192 DateTimeFormatter fmt = new DateTimeFormatterBuilder().appendZoneText(style, preferred) in test_ParseText() local 196 String ret = fmt.parse(text, TemporalQueries.zone()).getId(); in test_ParseText() 210 DateTimeFormatter fmt = getFormatter(locale, style, ci); in parseText() local 218 parse(fmt, zid, expected, zid, locale, style, ci); in parseText() 221 parse(fmt, zid, expected, names[i], locale, style, ci); in parseText() 226 private void parse(DateTimeFormatter fmt, in parse() argument 232 String ret = fmt.parse(text, TemporalQueries.zone()).getId(); in parse()
|
D | TestDateTimeTextProvider.java | 185 DateTimeFormatter fmt = getFormatter(field, style).withLocale(locale); in test_getText() local 186 assertEquals(fmt.format(ZonedDateTime.now().with(field, value.longValue())), expected); in test_getText()
|
/libcore/ojluni/annotations/hiddenapi/java/io/ |
D | Console.java | 50 public java.io.Console format(java.lang.String fmt, java.lang.Object... args) { in format() argument 58 public java.lang.String readLine(java.lang.String fmt, java.lang.Object... args) { in readLine() argument 66 public char[] readPassword(java.lang.String fmt, java.lang.Object... args) { in readPassword() argument
|
/libcore/luni/src/test/java/libcore/libcore/icu/ |
D | DateIntervalFormatTest.java | 441 BiFunction<Long, Long, String> fmt = (from, to) -> formatDateRange( in testEndAtMidnight_dateAndTime() local 445 assertEquals("February 27, 2007, 04:00 – 00:00", fmt.apply(1172548800000L, 1172620800000L)); in testEndAtMidnight_dateAndTime() 448 fmt.apply(1172534400000L, 1172620800000L)); in testEndAtMidnight_dateAndTime() 452 fmt.apply(1172548800000L, 1172620800001L)); in testEndAtMidnight_dateAndTime() 454 fmt.apply(1172548800000L, 1172707200000L)); in testEndAtMidnight_dateAndTime() 458 fmt.apply(1172534459999L, 1172620800000L)); in testEndAtMidnight_dateAndTime() 460 assertEquals("February 27, 2007, 00:01 – 00:00", fmt.apply(1172534460000L, 1172620800000L)); in testEndAtMidnight_dateAndTime() 465 BiFunction<Long, Long, String> fmt = (from, to) -> formatDateRange( in testEndAtMidnight_dateOnly() local 470 assertEquals("February 27 – March 1, 2007", fmt.apply(1172534400000L, 1172793600000L)); in testEndAtMidnight_dateOnly() 471 assertEquals("February 27 – March 1, 2007", fmt.apply(1172548800000L, 1172793600000L)); in testEndAtMidnight_dateOnly() [all …]
|
/libcore/luni/src/test/native/ |
D | libcore_libcore_icu_LocaleDataTest.cpp | 169 …std::unique_ptr<icu::DecimalFormat> fmt(static_cast<icu::DecimalFormat*>(icu::NumberFormat::create… in setNumberPatterns() local 170 pattern = fmt->toPattern(pattern.remove()); in setNumberPatterns() 173 …fmt.reset(static_cast<icu::DecimalFormat*>(icu::NumberFormat::createInstance(locale, UNUM_DECIMAL,… in setNumberPatterns() 174 pattern = fmt->toPattern(pattern.remove()); in setNumberPatterns() 177 …fmt.reset(static_cast<icu::DecimalFormat*>(icu::NumberFormat::createInstance(locale, UNUM_PERCENT,… in setNumberPatterns() 178 pattern = fmt->toPattern(pattern.remove()); in setNumberPatterns()
|
/libcore/ojluni/src/main/native/ |
D | UnixFileSystem_md.c | 133 int fmt = mode & S_IFMT; in Java_java_io_UnixFileSystem_getBooleanAttributes0() local 135 | ((fmt == S_IFREG) ? java_io_FileSystem_BA_REGULAR : 0) in Java_java_io_UnixFileSystem_getBooleanAttributes0() 136 | ((fmt == S_IFDIR) ? java_io_FileSystem_BA_DIRECTORY : 0)); in Java_java_io_UnixFileSystem_getBooleanAttributes0()
|
D | jvm.h | 1269 jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args); 1272 jio_snprintf(char *str, size_t count, const char *fmt, ...); 1275 jio_fprintf(FILE *, const char *fmt, ...); 1278 jio_vfprintf(FILE *, const char *fmt, va_list args);
|
/libcore/ojluni/src/main/java/java/util/ |
D | Formatter.java | 2968 Formatter fmt = Formatter.this; in printString() local 2969 if (fmt.locale() != l) in printString() 2970 fmt = new Formatter(fmt.out(), l); in printString() 2971 ((Formattable)arg).formatTo(fmt, f.valueOf(), width, precision); in printString()
|