Home
last modified time | relevance | path

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

/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DScientificNumberFormatterTest.java59 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); in TestPlusSignInExponentMarkup() local
60 decfmt.applyPattern("0.00E+0"); in TestPlusSignInExponentMarkup()
62 decfmt, "<sup>", "</sup>"); in TestPlusSignInExponentMarkup()
73 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); in TestPlusSignInExponentSuperscript() local
74 decfmt.applyPattern("0.00E+0"); in TestPlusSignInExponentSuperscript()
76 decfmt); in TestPlusSignInExponentSuperscript()
85 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); in TestFixedDecimalMarkup() local
87 decfmt, "<sup>", "</sup>"); in TestFixedDecimalMarkup()
96 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); in TestFixedDecimalSuperscript() local
97 ScientificNumberFormatter fmt = ScientificNumberFormatter.getSuperscriptInstance(decfmt); in TestFixedDecimalSuperscript()
DIntlTestDecimalFormatAPI.java276 DecimalFormat decfmt = new DecimalFormat(); in testJB6134() local
280 decfmt.format(123, buf, fposByInt); in testJB6134()
284 decfmt.format(123, buf, fposByField); in testJB6134()
296 DecimalFormat decfmt = new DecimalFormat(); in testJB4971() local
300 resultICU = decfmt.getMathContextICU(); in testJB4971()
311 decfmt.setMathContextICU(comp2); in testJB4971()
312 resultICU = decfmt.getMathContextICU(); in testJB4971()
325 decfmt.setMathContext(comp3); in testJB4971()
326 result = decfmt.getMathContext(); in testJB4971()
DNumberFormatTest.java970 …DecimalFormat decfmt = (DecimalFormat)NumberFormat.getInstance(new ULocale("en_US"), NumberFormat.… in TestParseCurrPatternWithDecStyle() local
971 decfmt.applyPattern(currpat); in TestParseCurrPatternWithDecStyle()
973 Number value = decfmt.parse(parsetxt, ppos); in TestParseCurrPatternWithDecStyle()
3160 private final DecimalFormat decfmt; field in NumberFormatTest.ParseThreadJB5358
3165 … public ParseThreadJB5358(DecimalFormat decfmt, String numstr, double expect, ArrayList errors) { in ParseThreadJB5358() argument
3166 this.decfmt = decfmt; in ParseThreadJB5358()
3176 Number n = decfmt.parse(numstr); in run()
4410 DecimalFormat decfmt = new DecimalFormat("\u00A4#,##0.00;-\u00A4#,##0.00", decfmtsym);
4411 String currFmtResult = decfmt.format(-100.0);
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DScientificNumberFormatterTest.java56 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); in TestPlusSignInExponentMarkup() local
57 decfmt.applyPattern("0.00E+0"); in TestPlusSignInExponentMarkup()
59 decfmt, "<sup>", "</sup>"); in TestPlusSignInExponentMarkup()
70 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); in TestPlusSignInExponentSuperscript() local
71 decfmt.applyPattern("0.00E+0"); in TestPlusSignInExponentSuperscript()
73 decfmt); in TestPlusSignInExponentSuperscript()
82 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); in TestFixedDecimalMarkup() local
84 decfmt, "<sup>", "</sup>"); in TestFixedDecimalMarkup()
93 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); in TestFixedDecimalSuperscript() local
94 ScientificNumberFormatter fmt = ScientificNumberFormatter.getSuperscriptInstance(decfmt); in TestFixedDecimalSuperscript()
DIntlTestDecimalFormatAPI.java273 DecimalFormat decfmt = new DecimalFormat(); in testJB6134() local
277 decfmt.format(123, buf, fposByInt); in testJB6134()
281 decfmt.format(123, buf, fposByField); in testJB6134()
293 DecimalFormat decfmt = new DecimalFormat(); in testJB4971() local
297 resultICU = decfmt.getMathContextICU(); in testJB4971()
308 decfmt.setMathContextICU(comp2); in testJB4971()
309 resultICU = decfmt.getMathContextICU(); in testJB4971()
322 decfmt.setMathContext(comp3); in testJB4971()
323 result = decfmt.getMathContext(); in testJB4971()
DNumberFormatTest.java967 …DecimalFormat decfmt = (DecimalFormat)NumberFormat.getInstance(new ULocale("en_US"), NumberFormat.… in TestParseCurrPatternWithDecStyle() local
968 decfmt.applyPattern(currpat); in TestParseCurrPatternWithDecStyle()
970 Number value = decfmt.parse(parsetxt, ppos); in TestParseCurrPatternWithDecStyle()
3157 private final DecimalFormat decfmt; field in NumberFormatTest.ParseThreadJB5358
3162 … public ParseThreadJB5358(DecimalFormat decfmt, String numstr, double expect, ArrayList errors) { in ParseThreadJB5358() argument
3163 this.decfmt = decfmt; in ParseThreadJB5358()
3173 Number n = decfmt.parse(numstr); in run()
4407 DecimalFormat decfmt = new DecimalFormat("\u00A4#,##0.00;-\u00A4#,##0.00", decfmtsym);
4408 String currFmtResult = decfmt.format(-100.0);
/external/icu/icu4c/source/test/intltest/
Dscientificnumberformattertest.cpp120 …LocalPointer<DecimalFormat> decfmt((DecimalFormat *) NumberFormat::createScientificInstance("en", … in TestPlusSignInExponentMarkup() local
125 decfmt->applyPattern("0.00E+0", status); in TestPlusSignInExponentMarkup()
132 new DecimalFormat(*decfmt), "<sup>", "</sup>", status)); in TestPlusSignInExponentMarkup()
147 …LocalPointer<DecimalFormat> decfmt((DecimalFormat *) NumberFormat::createScientificInstance("en", … in TestPlusSignInExponentSuperscript() local
152 decfmt->applyPattern("0.00E+0", status); in TestPlusSignInExponentSuperscript()
159 new DecimalFormat(*decfmt), status)); in TestPlusSignInExponentSuperscript()
174 … LocalPointer<DecimalFormat> decfmt((DecimalFormat *) NumberFormat::createInstance("en", status)); in TestFixedDecimalMarkup() local
180 new DecimalFormat(*decfmt), "<sup>", "</sup>", status)); in TestFixedDecimalMarkup()
196 … LocalPointer<DecimalFormat> decfmt((DecimalFormat *) NumberFormat::createInstance("en", status)); in TestFixedDecimalSuperscript() local
202 new DecimalFormat(*decfmt), status)); in TestFixedDecimalSuperscript()
Dnumfmtst.cpp7639 …LocalPointer<DecimalFormat> decfmt((DecimalFormat *) NumberFormat::createInstance(Locale("en_US"),… in Test10419RoundingWith0FractionDigits() local
7645 decfmt->setRoundingMode(items[i].mode); in Test10419RoundingWith0FractionDigits()
7646 decfmt->setMaximumFractionDigits(0); in Test10419RoundingWith0FractionDigits()
7648 if (items[i].expected != decfmt->format(items[i].value, actual)) { in Test10419RoundingWith0FractionDigits()
/external/icu/icu4c/source/i18n/
Dmeasfmt.cpp541 DecimalFormat *decfmt = dynamic_cast<DecimalFormat *>(inf); in createObject() local
542 if (decfmt != NULL) { in createObject()
543 decfmt->setRoundingMode(DecimalFormat::kRoundDown); in createObject()
Dsmpdtfmt.cpp258 DecimalFormat* decfmt = dynamic_cast<DecimalFormat*>(&nf); in fixNumberFormatForDates() local
259 if (decfmt != NULL) { in fixNumberFormatForDates()
260 decfmt->setDecimalSeparatorAlwaysShown(FALSE); in fixNumberFormatForDates()
4065 DecimalFormat* decfmt = dynamic_cast<DecimalFormat*>(fNumberFormat); in checkIntSuffix() local
4066 if (decfmt != NULL) { in checkIntSuffix()
4068 suf = decfmt->getNegativeSuffix(suf); in checkIntSuffix()
4071 suf = decfmt->getPositiveSuffix(suf); in checkIntSuffix()
Dmsgfmt.cpp1715 auto* decfmt = dynamic_cast<DecimalFormat*>(fmt); in createAppropriateFormat() local
1716 if (decfmt != nullptr) { in createAppropriateFormat()
1717 decfmt->applyPattern(style, parseError, ec); in createAppropriateFormat()