Lines Matching refs:Formattable
387 Formattable result; in isParsePass()
443 Formattable resultFormattable(currAmt->getNumber()); in isParseCurrencyPass()
608 Formattable bla("Paja Patak"); // Donald Duck for non Serbian speakers in TestAPI()
646 …virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErro… in format() argument
650 Formattable& , in parse() argument
653 Formattable& , in parse() argument
837 Formattable af; in TestExponential()
841 if (af.getType() == Formattable::kLong) in TestExponential()
843 else if (af.getType() == Formattable::kDouble) { in TestExponential()
885 Formattable af; in TestExponential()
887 if (af.getType() == Formattable::kLong || in TestExponential()
888 af.getType() == Formattable::kInt64) { in TestExponential()
972 expect(fmt, (Formattable)(int64_t)0, "0E0"); in TestInt64()
973 expect(fmt, (Formattable)(int64_t)-1, "-1E0"); in TestInt64()
974 expect(fmt, (Formattable)(int64_t)1, "1E0"); in TestInt64()
975 expect(fmt, (Formattable)(int64_t)2147483647, "2.147483647E9"); in TestInt64()
976 expect(fmt, (Formattable)((int64_t)-2147483647-1), "-2.147483648E9"); in TestInt64()
977 expect(fmt, (Formattable)(int64_t)U_INT64_MAX, "9.223372036854775807E18"); in TestInt64()
978 expect(fmt, (Formattable)(int64_t)U_INT64_MIN, "-9.223372036854775808E18"); in TestInt64()
1310 Formattable n; format->parse(arg, n, status); in TestParse()
1312 if (n.getType() != Formattable::kLong || in TestParse()
1396 Formattable n; in TestLenientParse()
1408 if (U_FAILURE(status) || n.getType() != Formattable::kLong || in TestLenientParse()
1432 if (U_FAILURE(status) || n.getType() != Formattable::kLong || n.getLong() != -5) { in TestLenientParse()
1452 if (U_FAILURE(status) || n.getType() != Formattable::kLong || n.getLong() != -5) { in TestLenientParse()
1472 if (U_FAILURE(status) ||n.getType() != Formattable::kLong || in TestLenientParse()
1485 if (U_FAILURE(status) ||n.getType() != Formattable::kLong || in TestLenientParse()
1507 if (U_FAILURE(status) ||n.getType() != Formattable::kDouble || in TestLenientParse()
1520 if (U_FAILURE(status) ||n.getType() != Formattable::kDouble || in TestLenientParse()
1559 if (U_FAILURE(status) ||n.getType() != Formattable::kLong || in TestLenientParse()
2619 Formattable& result, in parseCurrencyAmount()
2625 Formattable n; in parseCurrencyAmount()
2643 Formattable n; in TestCases()
2707 Formattable m; in TestCases()
2719 Formattable exp, n; in TestCases()
2763 Formattable m; in TestCases()
2847 UBool NumberFormatTest::equalValue(const Formattable& a, const Formattable& b) { in equalValue()
2852 if (a.getType() == Formattable::kLong) { in equalValue()
2853 if (b.getType() == Formattable::kInt64) { in equalValue()
2855 } else if (b.getType() == Formattable::kDouble) { in equalValue()
2858 } else if (a.getType() == Formattable::kDouble) { in equalValue()
2859 if (b.getType() == Formattable::kLong) { in equalValue()
2861 } else if (b.getType() == Formattable::kInt64) { in equalValue()
2864 } else if (a.getType() == Formattable::kInt64) { in equalValue()
2865 if (b.getType() == Formattable::kLong) { in equalValue()
2867 } else if (b.getType() == Formattable::kDouble) { in equalValue()
2874 void NumberFormatTest::expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str) { in expect3()
2880 void NumberFormatTest::expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str) { in expect2()
2886 void NumberFormatTest::expect2(NumberFormat* fmt, const Formattable& n, in expect2()
2897 void NumberFormatTest::expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n) { in expect()
2899 Formattable num; in expect()
2918 void NumberFormatTest::expect_rbnf(NumberFormat& fmt, const UnicodeString& str, const Formattable& … in expect_rbnf()
2920 Formattable num; in expect_rbnf()
2935 void NumberFormatTest::expect_rbnf(NumberFormat& fmt, const Formattable& n, in expect_rbnf()
2950 Formattable n2; in expect_rbnf()
2971 void NumberFormatTest::expect(NumberFormat& fmt, const Formattable& n, in expect()
2988 Formattable n2; in expect()
3009 void NumberFormatTest::expect(NumberFormat* fmt, const Formattable& n, in expect()
3220 Formattable number(10.00); in TestHost()
3226 Formattable formattable; in TestHost()
3273 Formattable toFormat, result; in TestCurrencyFormat()
3410 Formattable result; in checkRound()
3545 Formattable result; in TestSpaceParsing()
3552 result.getType() == Formattable::kLong && in TestSpaceParsing()
3721 Formattable parseRes; in TestMultiCurrencySign()
3724 (parseRes.getType() == Formattable::kDouble && in TestMultiCurrencySign()
3726 (parseRes.getType() == Formattable::kLong && in TestMultiCurrencySign()
3757 Formattable result; in TestCurrencyFormatForMixParsing()
3762 } else if (result.getType() != Formattable::kObject || in TestCurrencyFormatForMixParsing()
3813 Formattable result; in TestDecimalFormatCurrencyParse()
3816 (result.getType() == Formattable::kDouble && in TestDecimalFormatCurrencyParse()
3818 (result.getType() == Formattable::kLong && in TestDecimalFormatCurrencyParse()
3901 Formattable parseResult; in TestCurrencyIsoPluralFormat()
3904 (parseResult.getType() == Formattable::kDouble && in TestCurrencyIsoPluralFormat()
3906 (parseResult.getType() == Formattable::kLong && in TestCurrencyIsoPluralFormat()
3910 if (parseResult.getType() == Formattable::kDouble) { in TestCurrencyIsoPluralFormat()
4015 Formattable parseResult; in TestCurrencyParsing()
4019 (parseResult.getType() == Formattable::kDouble && in TestCurrencyParsing()
4021 (parseResult.getType() == Formattable::kLong && in TestCurrencyParsing()
4025 if (parseResult.getType() == Formattable::kDouble) { in TestCurrencyParsing()
6837 Formattable f("12.345678999987654321E666", status); in TestDecimal()
6847 Formattable f1("this is not a number", status); in TestDecimal()
6853 Formattable f; in TestDecimal()
6856 ASSERT_EQUALS( Formattable::kDouble, f.getType()); in TestDecimal()
6871 ASSERT_EQUALS( Formattable::kLong, f.getType()); in TestDecimal()
6881 ASSERT_EQUALS( Formattable::kInt64, f.getType()); in TestDecimal()
6945 Formattable result; in TestDecimal()
6967 Formattable result; in TestDecimal()
7008 Formattable result; in TestExponentParse()
7028 if(result.getType() != Formattable::kDouble && in TestExponentParse()
7292 UBool NumberFormatTest::testFormattableAsUFormattable(const char *file, int line, Formattable &f) { in testFormattableAsUFormattable()
7312 case Formattable::kDate: in testFormattableAsUFormattable()
7317 case Formattable::kDouble: in testFormattableAsUFormattable()
7322 case Formattable::kLong: in testFormattableAsUFormattable()
7327 case Formattable::kString: in testFormattableAsUFormattable()
7342 case Formattable::kArray: in testFormattableAsUFormattable()
7348 const Formattable *array2 = f.getArray(count2); in testFormattableAsUFormattable()
7354 if(*Formattable::fromUFormattable(uu) != (array2[i])) { in testFormattableAsUFormattable()
7356 (const void*)Formattable::fromUFormattable(uu), (const void*)&(array2[i])); in testFormattableAsUFormattable()
7359 if(!testFormattableAsUFormattable("(sub item)",i,*Formattable::fromUFormattable(uu))) { in testFormattableAsUFormattable()
7367 case Formattable::kInt64: in testFormattableAsUFormattable()
7372 case Formattable::kObject: in testFormattableAsUFormattable()
7452 Formattable defaultFormattable; in TestUFormattable()
7455 == *(Formattable::fromUFormattable(defaultUFormattable.getAlias())))); in TestUFormattable()
7458 == *(Formattable::fromUFormattable(defaultUFormattable.getAlias())))); in TestUFormattable()
7461 == *(Formattable::fromUFormattable(defaultFormattable.toUFormattable())))); in TestUFormattable()
7464 == Formattable::fromUFormattable(defaultFormattable.toUFormattable()))); in TestUFormattable()
7467 == Formattable::fromUFormattable(defaultUFormattable.getAlias()))); in TestUFormattable()
7472 Formattable f(ucal_getNow(), Formattable::kIsDate); in TestUFormattable()
7476 Formattable f((double)1.61803398874989484820); // golden ratio in TestUFormattable()
7480 …Formattable f((int64_t)80994231587905127LL); // weight of the moon, in kilotons http://solarsystem… in TestUFormattable()
7484 Formattable f((int32_t)4); // random number, source: http://www.xkcd.com/221/ in TestUFormattable()
7488 Formattable f("Hello world."); // should be invariant? in TestUFormattable()
7493 Formattable f(StringPiece("73476730924573500000000.0"), status2); // weight of the moon, kg in TestUFormattable()
7500 Formattable f(obj); in TestUFormattable()
7505 const Formattable array[] = { in TestUFormattable()
7506 Formattable(ucal_getNow(), Formattable::kIsDate), in TestUFormattable()
7507 Formattable((int32_t)4), in TestUFormattable()
7508 Formattable((double)1.234), in TestUFormattable()
7511 Formattable fa(array, 3); in TestUFormattable()
7629 Formattable af; in TestParseNegativeWithFaLocale()
7645 Formattable af; in TestParseNegativeWithAlternateMinusSign()
7672 expect2(fmt, (Formattable)((double)1234.56), numstr); in TestCustomCurrencySignAndSeparator()
7770 Formattable fmtobj; in TestParseSignsAndMarks()
8061 (Formattable)(double)1234.5, "$1,234.50", TRUE, status); in TestAccountingCurrency()
8063 (Formattable)(double)-1234.5, "($1,234.50)", TRUE, status); in TestAccountingCurrency()
8065 (Formattable)(double)0, "$0.00", TRUE, status); in TestAccountingCurrency()
8067 (Formattable)(double)-0.2, "($0.20)", TRUE, status); in TestAccountingCurrency()
8069 (Formattable)(double)10000, UnicodeString("\\uFFE510,000").unescape(), TRUE, status); in TestAccountingCurrency()
8071 (Formattable)(double)-1000.5, UnicodeString("(\\uFFE51,000)").unescape(), FALSE, status); in TestAccountingCurrency()
8073 …(Formattable)(double)-23456.7, UnicodeString("-23.456,70\\u00A0\\u20AC").unescape(), TRUE, status); in TestAccountingCurrency()