Lines Matching refs:Formattable

275     Formattable bla("Paja Patak"); // Donald Duck for non Serbian speakers  in TestAPI()
318 …virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErro… in format() argument
322 Formattable& , in parse() argument
325 Formattable& , in parse() argument
580 Formattable af; in TestExponential()
584 if (af.getType() == Formattable::kLong) in TestExponential()
586 else if (af.getType() == Formattable::kDouble) { in TestExponential()
629 Formattable af; in TestExponential()
631 if (af.getType() == Formattable::kLong || in TestExponential()
632 af.getType() == Formattable::kInt64) { in TestExponential()
716 expect(fmt, (Formattable)(int64_t)0, "0E0"); in TestInt64()
717 expect(fmt, (Formattable)(int64_t)-1, "-1E0"); in TestInt64()
718 expect(fmt, (Formattable)(int64_t)1, "1E0"); in TestInt64()
719 expect(fmt, (Formattable)(int64_t)2147483647, "2.147483647E9"); in TestInt64()
720 expect(fmt, (Formattable)((int64_t)-2147483647-1), "-2.147483648E9"); in TestInt64()
721 expect(fmt, (Formattable)(int64_t)U_INT64_MAX, "9.223372036854775807E18"); in TestInt64()
722 expect(fmt, (Formattable)(int64_t)U_INT64_MIN, "-9.223372036854775808E18"); in TestInt64()
1054 Formattable n; format->parse(arg, n, status); in TestParse()
1056 if (n.getType() != Formattable::kLong || in TestParse()
1140 Formattable n; in TestLenientParse()
1152 if (U_FAILURE(status) || n.getType() != Formattable::kLong || in TestLenientParse()
1177 if (U_FAILURE(status) || n.getType() != Formattable::kLong || n.getLong() != -5) { in TestLenientParse()
1198 if (U_FAILURE(status) || n.getType() != Formattable::kLong || n.getLong() != -5) { in TestLenientParse()
1219 if (U_FAILURE(status) ||n.getType() != Formattable::kLong || in TestLenientParse()
1233 if (U_FAILURE(status) ||n.getType() != Formattable::kLong || in TestLenientParse()
1256 if (U_FAILURE(status) ||n.getType() != Formattable::kDouble || in TestLenientParse()
1271 if (U_FAILURE(status) ||n.getType() != Formattable::kDouble || in TestLenientParse()
1313 if (U_FAILURE(status) ||n.getType() != Formattable::kLong || in TestLenientParse()
2583 Formattable& result, in parseCurrencyAmount()
2589 Formattable n; in parseCurrencyAmount()
2607 Formattable n; in TestCases()
2671 Formattable m; in TestCases()
2683 Formattable exp, n; in TestCases()
2727 Formattable m; in TestCases()
2811 UBool NumberFormatTest::equalValue(const Formattable& a, const Formattable& b) { in equalValue()
2816 if (a.getType() == Formattable::kLong) { in equalValue()
2817 if (b.getType() == Formattable::kInt64) { in equalValue()
2819 } else if (b.getType() == Formattable::kDouble) { in equalValue()
2822 } else if (a.getType() == Formattable::kDouble) { in equalValue()
2823 if (b.getType() == Formattable::kLong) { in equalValue()
2825 } else if (b.getType() == Formattable::kInt64) { in equalValue()
2828 } else if (a.getType() == Formattable::kInt64) { in equalValue()
2829 if (b.getType() == Formattable::kLong) { in equalValue()
2831 } else if (b.getType() == Formattable::kDouble) { in equalValue()
2838 void NumberFormatTest::expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str) { in expect3()
2844 void NumberFormatTest::expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str) { in expect2()
2850 void NumberFormatTest::expect2(NumberFormat* fmt, const Formattable& n, in expect2()
2861 void NumberFormatTest::expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n) { in expect()
2863 Formattable num; in expect()
2882 void NumberFormatTest::expect_rbnf(NumberFormat& fmt, const UnicodeString& str, const Formattable& … in expect_rbnf()
2884 Formattable num; in expect_rbnf()
2899 void NumberFormatTest::expect_rbnf(NumberFormat& fmt, const Formattable& n, in expect_rbnf()
2914 Formattable n2; in expect_rbnf()
2935 void NumberFormatTest::expect(NumberFormat& fmt, const Formattable& n, in expect()
2952 Formattable n2; in expect()
2973 void NumberFormatTest::expect(NumberFormat* fmt, const Formattable& n, in expect()
3184 Formattable number(10.00); in TestHost()
3190 Formattable formattable; in TestHost()
3237 Formattable toFormat, result; in TestCurrencyFormat()
3374 Formattable result; in checkRound()
3505 Formattable result; in TestSpaceParsing()
3513 result.getType() == Formattable::kLong && in TestSpaceParsing()
3682 Formattable parseRes; in TestMultiCurrencySign()
3685 (parseRes.getType() == Formattable::kDouble && in TestMultiCurrencySign()
3687 (parseRes.getType() == Formattable::kLong && in TestMultiCurrencySign()
3718 Formattable result; in TestCurrencyFormatForMixParsing()
3723 } else if (result.getType() != Formattable::kObject || in TestCurrencyFormatForMixParsing()
3762 Formattable result; in TestMismatchedCurrencyFormatFail()
3810 Formattable result; in TestDecimalFormatCurrencyParse()
3814 (result.getType() == Formattable::kDouble && in TestDecimalFormatCurrencyParse()
3816 (result.getType() == Formattable::kLong && in TestDecimalFormatCurrencyParse()
3903 Formattable parseResult; in TestCurrencyIsoPluralFormat()
3906 (parseResult.getType() == Formattable::kDouble && in TestCurrencyIsoPluralFormat()
3908 (parseResult.getType() == Formattable::kLong && in TestCurrencyIsoPluralFormat()
3912 if (parseResult.getType() == Formattable::kDouble) { in TestCurrencyIsoPluralFormat()
4018 Formattable parseResult; in TestCurrencyParsing()
4022 (parseResult.getType() == Formattable::kDouble && in TestCurrencyParsing()
4024 (parseResult.getType() == Formattable::kLong && in TestCurrencyParsing()
4028 if (parseResult.getType() == Formattable::kDouble) { in TestCurrencyParsing()
6834 Formattable f("12.345678999987654321E666", status); in TestDecimal()
6844 Formattable f1("this is not a number", status); in TestDecimal()
6850 Formattable f; in TestDecimal()
6853 ASSERT_EQUALS( Formattable::kDouble, f.getType()); in TestDecimal()
6868 ASSERT_EQUALS( Formattable::kLong, f.getType()); in TestDecimal()
6878 ASSERT_EQUALS( Formattable::kInt64, f.getType()); in TestDecimal()
6942 Formattable result; in TestDecimal()
6964 Formattable result; in TestDecimal()
7005 Formattable result; in TestExponentParse()
7025 if(result.getType() != Formattable::kDouble && in TestExponentParse()
7282 if(sizeof(Formattable) > 112) { in TestFormattableSize()
7284 sizeof(Formattable), 112); in TestFormattableSize()
7285 } else if(sizeof(Formattable) < 112) { in TestFormattableSize()
7287 sizeof(Formattable), 112); in TestFormattableSize()
7290 sizeof(Formattable), 112); in TestFormattableSize()
7294 UBool NumberFormatTest::testFormattableAsUFormattable(const char *file, int line, Formattable &f) { in testFormattableAsUFormattable()
7314 case Formattable::kDate: in testFormattableAsUFormattable()
7319 case Formattable::kDouble: in testFormattableAsUFormattable()
7324 case Formattable::kLong: in testFormattableAsUFormattable()
7329 case Formattable::kString: in testFormattableAsUFormattable()
7344 case Formattable::kArray: in testFormattableAsUFormattable()
7350 const Formattable *array2 = f.getArray(count2); in testFormattableAsUFormattable()
7356 if(*Formattable::fromUFormattable(uu) != (array2[i])) { in testFormattableAsUFormattable()
7358 (const void*)Formattable::fromUFormattable(uu), (const void*)&(array2[i])); in testFormattableAsUFormattable()
7361 if(!testFormattableAsUFormattable("(sub item)",i,*Formattable::fromUFormattable(uu))) { in testFormattableAsUFormattable()
7369 case Formattable::kInt64: in testFormattableAsUFormattable()
7374 case Formattable::kObject: in testFormattableAsUFormattable()
7454 Formattable defaultFormattable; in TestUFormattable()
7457 == *(Formattable::fromUFormattable(defaultUFormattable.getAlias())))); in TestUFormattable()
7460 == *(Formattable::fromUFormattable(defaultUFormattable.getAlias())))); in TestUFormattable()
7463 == *(Formattable::fromUFormattable(defaultFormattable.toUFormattable())))); in TestUFormattable()
7466 == Formattable::fromUFormattable(defaultFormattable.toUFormattable()))); in TestUFormattable()
7469 == Formattable::fromUFormattable(defaultUFormattable.getAlias()))); in TestUFormattable()
7474 Formattable f(ucal_getNow(), Formattable::kIsDate); in TestUFormattable()
7478 Formattable f((double)1.61803398874989484820); // golden ratio in TestUFormattable()
7482Formattable f((int64_t)80994231587905127LL); // weight of the moon, in kilotons http://solarsystem… in TestUFormattable()
7486 Formattable f((int32_t)4); // random number, source: http://www.xkcd.com/221/ in TestUFormattable()
7490 Formattable f("Hello world."); // should be invariant? in TestUFormattable()
7495 Formattable f(StringPiece("73476730924573500000000.0"), status2); // weight of the moon, kg in TestUFormattable()
7502 Formattable f(obj); in TestUFormattable()
7507 const Formattable array[] = { in TestUFormattable()
7508 Formattable(ucal_getNow(), Formattable::kIsDate), in TestUFormattable()
7509 Formattable((int32_t)4), in TestUFormattable()
7510 Formattable((double)1.234), in TestUFormattable()
7513 Formattable fa(array, 3); in TestUFormattable()
7660 Formattable af; in TestParseNegativeWithFaLocale()
7676 Formattable af; in TestParseNegativeWithAlternateMinusSign()
7703 expect2(fmt, (Formattable)((double)1234.56), numstr); in TestCustomCurrencySignAndSeparator()
7801 Formattable fmtobj; in TestParseSignsAndMarks()
8082 (Formattable)(double)1234.5, "$1,234.50", TRUE, status); in TestAccountingCurrency()
8084 (Formattable)(double)-1234.5, "($1,234.50)", TRUE, status); in TestAccountingCurrency()
8086 (Formattable)(double)0, "$0.00", TRUE, status); in TestAccountingCurrency()
8088 (Formattable)(double)-0.2, "($0.20)", TRUE, status); in TestAccountingCurrency()
8090 (Formattable)(double)10000, UnicodeString("\\uFFE510,000").unescape(), TRUE, status); in TestAccountingCurrency()
8092 (Formattable)(double)-1000.5, UnicodeString("(\\uFFE51,000)").unescape(), FALSE, status); in TestAccountingCurrency()
8094 …(Formattable)(double)-23456.7, UnicodeString("-23.456,70\\u00A0\\u20AC").unescape(), TRUE, status); in TestAccountingCurrency()
8096 (Formattable)(double)0, UnicodeString("IDR\\u00A00.00").unescape(), TRUE, status); in TestAccountingCurrency()
8098 (Formattable)(double)-0.2, UnicodeString("(IDR\\u00A00.20)").unescape(), TRUE, status); in TestAccountingCurrency()
8100 (Formattable)(double)0, UnicodeString("0,00\\u00A0\\u20AC").unescape(), TRUE, status); in TestAccountingCurrency()
8102 (Formattable)(double)-0.2, UnicodeString("(0,20\\u00A0\\u20AC)").unescape(), TRUE, status); in TestAccountingCurrency()
8781 Formattable result; in Test13391_chakmaParsing()
8795 Formattable resultScientific; in Test13391_chakmaParsing()
8887 Formattable result; in TestParsePercentRegression()
8894 Formattable result; in TestParsePercentRegression()
8901 Formattable result; in TestParsePercentRegression()
9011 Formattable parseResult; in TestParseNaN()
9046 Formattable result; in TestParseCaseSensitive()
9063 Formattable result; in TestParseNoExponent()
9323 Formattable result; in Test20073_StrictPercentParseErrorIndex()
9404 Formattable number; in Test13148_ParseGroupingSeparators()
9416 Formattable result; in Test12753_PatternDecimalPoint()
9555 Formattable result; in Test13804_EmptyStringsWhenParsing()
9567 Formattable result; in Test13804_EmptyStringsWhenParsing()
9581 Formattable result; in Test20037_ScientificIntegerOverflow()
9591 result = Formattable(); in Test20037_ScientificIntegerOverflow()
9599 result = Formattable(); in Test20037_ScientificIntegerOverflow()
9607 result = Formattable(); in Test20037_ScientificIntegerOverflow()
9624 result = Formattable(); in Test20037_ScientificIntegerOverflow()
9639 Formattable result; in Test13840_ParseLongStringCrash()
9867 Formattable result; in Test13734_StrictFlexibleWhitespace()
9876 Formattable result; in Test13734_StrictFlexibleWhitespace()
10032 Formattable parsedNumber_lenient = ca_lenient->getNumber(); in Test13733_StrictAndLenient()
10061 Formattable result; in Test21232_ParseTimeout()