Lines Matching refs:fmt
94 NumberFormat *fmt = NULL; in start() local
98 fmt = NumberFormat::createInstance(status); in start()
100 test(fmt); in start()
102 delete fmt; in start()
104 fmt = NumberFormat::createCurrencyInstance(status); in start()
106 test(fmt); in start()
108 delete fmt; in start()
110 fmt = NumberFormat::createPercentInstance(status); in start()
112 test(fmt); in start()
114 delete fmt; in start()
128 fmt = NumberFormat::createInstance(loc[i], status); in start()
130 test(fmt); in start()
131 delete fmt; in start()
133 fmt = NumberFormat::createCurrencyInstance(loc[i], status); in start()
135 test(fmt); in start()
136 delete fmt; in start()
138 fmt = NumberFormat::createPercentInstance(loc[i], status); in start()
140 test(fmt); in start()
141 delete fmt; in start()
149 NumberFormatRoundTripTest::test(NumberFormat *fmt) in test() argument
152 test(fmt, uprv_getNaN()); in test()
153 test(fmt, uprv_getInfinity()); in test()
154 test(fmt, -uprv_getInfinity()); in test()
157 test(fmt, (int32_t)500); in test()
158 test(fmt, (int32_t)0); in test()
159 test(fmt, (int32_t)-0); in test()
160 test(fmt, 0.0); in test()
162 test(fmt, negZero); in test()
163 test(fmt, 9223372036854775808.0); in test()
164 test(fmt, -9223372036854775809.0); in test()
167 test(fmt, randomDouble(1)); in test()
168 test(fmt, randomDouble(10000)); in test()
169 test(fmt, uprv_floor((randomDouble(10000)))); in test()
170 test(fmt, randomDouble(1e50)); in test()
171 test(fmt, randomDouble(1e-50)); in test()
173 test(fmt, randomDouble(1e100)); in test()
175 test(fmt, randomDouble(1e75)); in test()
187 DecimalFormat *df = dynamic_cast<DecimalFormat *>(fmt); in test()
192 test(fmt, randomDouble(DBL_MAX/2.0) / df->getMultiplier()); in test()
194 test(fmt, randomDouble(1e75) / df->getMultiplier()); in test()
196 test(fmt, randomDouble(1e65) / df->getMultiplier()); in test()
202 test(fmt, randomDouble(1e-292)); in test()
203 test(fmt, randomDouble(1e-100)); in test()
207 test(fmt, randomDouble(1e-78)); in test()
208 test(fmt, randomDouble(1e-78)); in test()
213 test(fmt, randomDouble(DBL_MIN)); /* Usually 2.2250738585072014e-308 */ in test()
214 test(fmt, randomDouble(1e-100)); in test()
220 NumberFormatRoundTripTest::test(NumberFormat *fmt, double value) in test() argument
222 test(fmt, Formattable(value)); in test()
226 NumberFormatRoundTripTest::test(NumberFormat *fmt, int32_t value) in test() argument
228 test(fmt, Formattable(value)); in test()
232 NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value) in test() argument
234 fmt->setMaximumFractionDigits(999); in test()
235 DecimalFormat *df = dynamic_cast<DecimalFormat *>(fmt); in test()
242 s = fmt->format(value.getDouble(), s); in test()
244 s = fmt->format(value.getLong(), s); in test()
251 fmt->parse(s, n, status); in test()
257 s2 = fmt->format(n.getDouble(), s2); in test()
259 s2 = fmt->format(n.getLong(), s2); in test()