Lines Matching defs:fmt
92 NumberFormat *fmt = NULL;
96 fmt = NumberFormat::createInstance(status);
98 test(fmt);
100 delete fmt;
102 fmt = NumberFormat::createCurrencyInstance(status);
104 test(fmt);
106 delete fmt;
108 fmt = NumberFormat::createPercentInstance(status);
110 test(fmt);
112 delete fmt;
126 fmt = NumberFormat::createInstance(loc[i], status);
128 test(fmt);
129 delete fmt;
131 fmt = NumberFormat::createCurrencyInstance(loc[i], status);
133 test(fmt);
134 delete fmt;
136 fmt = NumberFormat::createPercentInstance(loc[i], status);
138 test(fmt);
139 delete fmt;
147 NumberFormatRoundTripTest::test(NumberFormat *fmt)
150 test(fmt, uprv_getNaN());
151 test(fmt, uprv_getInfinity());
152 test(fmt, -uprv_getInfinity());
155 test(fmt, (int32_t)500);
156 test(fmt, (int32_t)0);
157 test(fmt, (int32_t)-0);
158 test(fmt, 0.0);
160 test(fmt, negZero);
161 test(fmt, 9223372036854775808.0);
162 test(fmt, -9223372036854775809.0);
165 test(fmt, randomDouble(1));
166 test(fmt, randomDouble(10000));
167 test(fmt, uprv_floor((randomDouble(10000))));
168 test(fmt, randomDouble(1e50));
169 test(fmt, randomDouble(1e-50));
171 test(fmt, randomDouble(1e100));
173 test(fmt, randomDouble(1e75));
184 //if(fmt->getMultipler() == 1)
185 DecimalFormat *df = dynamic_cast<DecimalFormat *>(fmt);
190 test(fmt, randomDouble(DBL_MAX/2.0) / df->getMultiplier());
192 test(fmt, randomDouble(1e75) / df->getMultiplier());
194 test(fmt, randomDouble(1e65) / df->getMultiplier());
200 test(fmt, randomDouble(1e-292));
201 test(fmt, randomDouble(1e-100));
205 test(fmt, randomDouble(1e-78));
206 test(fmt, randomDouble(1e-78));
211 test(fmt, randomDouble(DBL_MIN)); /* Usually 2.2250738585072014e-308 */
212 test(fmt, randomDouble(1e-100));
218 NumberFormatRoundTripTest::test(NumberFormat *fmt, double value)
220 test(fmt, Formattable(value));
224 NumberFormatRoundTripTest::test(NumberFormat *fmt, int32_t value)
226 test(fmt, Formattable(value));
230 NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value)
232 fmt->setMaximumFractionDigits(999);
233 DecimalFormat *df = dynamic_cast<DecimalFormat *>(fmt);
240 s = fmt->format(value.getDouble(), s);
242 s = fmt->format(value.getLong(), s);
249 fmt->parse(s, n, status);
250 failure(status, "fmt->parse");
255 s2 = fmt->format(n.getDouble(), s2);
257 s2 = fmt->format(n.getLong(), s2);