Lines Matching refs:formattable
145 Formattable bla("Paja Patak"); // Donald Duck for non Serbian speakers
183 virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErrorCode& ) const {
187 Formattable& ,
190 Formattable& ,
374 Formattable af;
378 if (af.getType() == Formattable::kLong)
380 else if (af.getType() == Formattable::kDouble) {
394 errln((UnicodeString)"FAIL: Non-numeric Formattable returned");
422 Formattable af;
424 if (af.getType() == Formattable::kLong ||
425 af.getType() == Formattable::kInt64) {
438 errln((UnicodeString)"FAIL: Non-long Formattable returned for " + s
505 expect(fmt, (Formattable)(int64_t)0, "0E0");
506 expect(fmt, (Formattable)(int64_t)-1, "-1E0");
507 expect(fmt, (Formattable)(int64_t)1, "1E0");
508 expect(fmt, (Formattable)(int64_t)2147483647, "2.147483647E9");
509 expect(fmt, (Formattable)((int64_t)-2147483647-1), "-2.147483648E9");
510 expect(fmt, (Formattable)(int64_t)U_INT64_MAX, "9.223372036854775807E18");
511 expect(fmt, (Formattable)(int64_t)U_INT64_MIN, "-9.223372036854775808E18");
842 Formattable n; format->parse(arg, n, status);
844 if (n.getType() != Formattable::kLong ||
929 Formattable n;
941 if (U_FAILURE(status) || n.getType() != Formattable::kLong ||
965 if (U_FAILURE(status) || n.getType() != Formattable::kLong || n.getLong() != -5) {
985 if (U_FAILURE(status) || n.getType() != Formattable::kLong || n.getLong() != -5) {
1005 if (U_FAILURE(status) ||n.getType() != Formattable::kLong ||
1018 if (U_FAILURE(status) ||n.getType() != Formattable::kLong ||
1040 if (U_FAILURE(status) ||n.getType() != Formattable::kDouble ||
1053 if (U_FAILURE(status) ||n.getType() != Formattable::kDouble ||
1092 if (U_FAILURE(status) ||n.getType() != Formattable::kLong ||
2132 Formattable& result,
2138 Formattable n;
2156 Formattable n;
2220 Formattable m;
2232 Formattable exp, n;
2270 Formattable m;
2354 UBool NumberFormatTest::equalValue(const Formattable& a, const Formattable& b) {
2359 if (a.getType() == Formattable::kLong) {
2360 if (b.getType() == Formattable::kInt64) {
2362 } else if (b.getType() == Formattable::kDouble) {
2365 } else if (a.getType() == Formattable::kDouble) {
2366 if (b.getType() == Formattable::kLong) {
2368 } else if (b.getType() == Formattable::kInt64) {
2371 } else if (a.getType() == Formattable::kInt64) {
2372 if (b.getType() == Formattable::kLong) {
2374 } else if (b.getType() == Formattable::kDouble) {
2381 void NumberFormatTest::expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str) {
2387 void NumberFormatTest::expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str) {
2393 void NumberFormatTest::expect2(NumberFormat* fmt, const Formattable& n,
2404 void NumberFormatTest::expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n) {
2406 Formattable num;
2425 void NumberFormatTest::expect_rbnf(NumberFormat& fmt, const UnicodeString& str, const Formattable& n) {
2427 Formattable num;
2442 void NumberFormatTest::expect_rbnf(NumberFormat& fmt, const Formattable& n,
2457 Formattable n2;
2478 void NumberFormatTest::expect(NumberFormat& fmt, const Formattable& n,
2495 Formattable n2;
2516 void NumberFormatTest::expect(NumberFormat* fmt, const Formattable& n,
2659 Formattable number(10.00);
2665 Formattable formattable;
2666 full->parse(result1, formattable, status);
2712 Formattable toFormat, result;
2849 Formattable result;
2984 Formattable result;
2991 result.getType() == Formattable::kLong &&
3156 Formattable parseRes;
3159 (parseRes.getType() == Formattable::kDouble &&
3161 (parseRes.getType() == Formattable::kLong &&
3192 Formattable result;
3197 } else if (result.getType() != Formattable::kObject ||
3248 Formattable result;
3251 (result.getType() == Formattable::kDouble &&
3253 (result.getType() == Formattable::kLong &&
3338 Formattable parseResult;
3341 (parseResult.getType() == Formattable::kDouble &&
3343 (parseResult.getType() == Formattable::kLong &&
3347 if (parseResult.getType() == Formattable::kDouble) {
3439 Formattable parseResult;
3442 (parseResult.getType() == Formattable::kDouble &&
3444 (parseResult.getType() == Formattable::kLong &&
3449 if (parseResult.getType() == Formattable::kDouble) {
6262 Formattable f("12.345678999987654321E666", status);
6272 Formattable f1("this is not a number", status);
6278 Formattable f;
6281 ASSERT_EQUALS( Formattable::kDouble, f.getType());
6296 ASSERT_EQUALS( Formattable::kLong, f.getType());
6306 ASSERT_EQUALS( Formattable::kInt64, f.getType());
6370 Formattable result;
6392 Formattable result;
6433 Formattable result;
6453 if(result.getType() != Formattable::kDouble &&