Lines Matching refs:Formattable
246 Formattable bla("Paja Patak"); // Donald Duck for non Serbian speakers in TestAPI()
289 …virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErro… in format() argument
293 Formattable& , in parse() argument
296 Formattable& , in parse() argument
532 Formattable af; in TestExponential()
536 if (af.getType() == Formattable::kLong) in TestExponential()
538 else if (af.getType() == Formattable::kDouble) { in TestExponential()
581 Formattable af; in TestExponential()
583 if (af.getType() == Formattable::kLong || in TestExponential()
584 af.getType() == Formattable::kInt64) { in TestExponential()
668 expect(fmt, (Formattable)(int64_t)0, "0E0"); in TestInt64()
669 expect(fmt, (Formattable)(int64_t)-1, "-1E0"); in TestInt64()
670 expect(fmt, (Formattable)(int64_t)1, "1E0"); in TestInt64()
671 expect(fmt, (Formattable)(int64_t)2147483647, "2.147483647E9"); in TestInt64()
672 expect(fmt, (Formattable)((int64_t)-2147483647-1), "-2.147483648E9"); in TestInt64()
673 expect(fmt, (Formattable)(int64_t)U_INT64_MAX, "9.223372036854775807E18"); in TestInt64()
674 expect(fmt, (Formattable)(int64_t)U_INT64_MIN, "-9.223372036854775808E18"); in TestInt64()
1006 Formattable n; format->parse(arg, n, status); in TestParse()
1008 if (n.getType() != Formattable::kLong || in TestParse()
1092 Formattable n; in TestLenientParse()
1104 if (U_FAILURE(status) || n.getType() != Formattable::kLong || in TestLenientParse()
1129 if (U_FAILURE(status) || n.getType() != Formattable::kLong || n.getLong() != -5) { in TestLenientParse()
1150 if (U_FAILURE(status) || n.getType() != Formattable::kLong || n.getLong() != -5) { in TestLenientParse()
1171 if (U_FAILURE(status) ||n.getType() != Formattable::kLong || in TestLenientParse()
1185 if (U_FAILURE(status) ||n.getType() != Formattable::kLong || in TestLenientParse()
1208 if (U_FAILURE(status) ||n.getType() != Formattable::kDouble || in TestLenientParse()
1223 if (U_FAILURE(status) ||n.getType() != Formattable::kDouble || in TestLenientParse()
1265 if (U_FAILURE(status) ||n.getType() != Formattable::kLong || in TestLenientParse()
2398 Formattable& result, in parseCurrencyAmount()
2404 Formattable n; in parseCurrencyAmount()
2422 Formattable n; in TestCases()
2486 Formattable m; in TestCases()
2498 Formattable exp, n; in TestCases()
2542 Formattable m; in TestCases()
2626 UBool NumberFormatTest::equalValue(const Formattable& a, const Formattable& b) { in equalValue()
2631 if (a.getType() == Formattable::kLong) { in equalValue()
2632 if (b.getType() == Formattable::kInt64) { in equalValue()
2634 } else if (b.getType() == Formattable::kDouble) { in equalValue()
2637 } else if (a.getType() == Formattable::kDouble) { in equalValue()
2638 if (b.getType() == Formattable::kLong) { in equalValue()
2640 } else if (b.getType() == Formattable::kInt64) { in equalValue()
2643 } else if (a.getType() == Formattable::kInt64) { in equalValue()
2644 if (b.getType() == Formattable::kLong) { in equalValue()
2646 } else if (b.getType() == Formattable::kDouble) { in equalValue()
2653 void NumberFormatTest::expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str) { in expect3()
2659 void NumberFormatTest::expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str) { in expect2()
2665 void NumberFormatTest::expect2(NumberFormat* fmt, const Formattable& n, in expect2()
2676 void NumberFormatTest::expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n) { in expect()
2678 Formattable num; in expect()
2697 void NumberFormatTest::expect_rbnf(NumberFormat& fmt, const UnicodeString& str, const Formattable& … in expect_rbnf()
2699 Formattable num; in expect_rbnf()
2714 void NumberFormatTest::expect_rbnf(NumberFormat& fmt, const Formattable& n, in expect_rbnf()
2729 Formattable n2; in expect_rbnf()
2750 void NumberFormatTest::expect(NumberFormat& fmt, const Formattable& n, in expect()
2767 Formattable n2; in expect()
2788 void NumberFormatTest::expect(NumberFormat* fmt, const Formattable& n, in expect()
2999 Formattable number(10.00); in TestHost()
3005 Formattable formattable; in TestHost()
3052 Formattable toFormat, result; in TestCurrencyFormat()
3189 Formattable result; in checkRound()
3320 Formattable result; in TestSpaceParsing()
3328 result.getType() == Formattable::kLong && in TestSpaceParsing()
3497 Formattable parseRes; in TestMultiCurrencySign()
3500 (parseRes.getType() == Formattable::kDouble && in TestMultiCurrencySign()
3502 (parseRes.getType() == Formattable::kLong && in TestMultiCurrencySign()
3533 Formattable result; in TestCurrencyFormatForMixParsing()
3538 } else if (result.getType() != Formattable::kObject || in TestCurrencyFormatForMixParsing()
3577 Formattable result; in TestMismatchedCurrencyFormatFail()
3625 Formattable result; in TestDecimalFormatCurrencyParse()
3629 (result.getType() == Formattable::kDouble && in TestDecimalFormatCurrencyParse()
3631 (result.getType() == Formattable::kLong && in TestDecimalFormatCurrencyParse()
3718 Formattable parseResult; in TestCurrencyIsoPluralFormat()
3721 (parseResult.getType() == Formattable::kDouble && in TestCurrencyIsoPluralFormat()
3723 (parseResult.getType() == Formattable::kLong && in TestCurrencyIsoPluralFormat()
3727 if (parseResult.getType() == Formattable::kDouble) { in TestCurrencyIsoPluralFormat()
3833 Formattable parseResult; in TestCurrencyParsing()
3837 (parseResult.getType() == Formattable::kDouble && in TestCurrencyParsing()
3839 (parseResult.getType() == Formattable::kLong && in TestCurrencyParsing()
3843 if (parseResult.getType() == Formattable::kDouble) { in TestCurrencyParsing()
6649 Formattable f("12.345678999987654321E666", status); in TestDecimal()
6659 Formattable f1("this is not a number", status); in TestDecimal()
6665 Formattable f; in TestDecimal()
6668 ASSERT_EQUALS( Formattable::kDouble, f.getType()); in TestDecimal()
6683 ASSERT_EQUALS( Formattable::kLong, f.getType()); in TestDecimal()
6693 ASSERT_EQUALS( Formattable::kInt64, f.getType()); in TestDecimal()
6757 Formattable result; in TestDecimal()
6779 Formattable result; in TestDecimal()
6820 Formattable result; in TestExponentParse()
6840 if(result.getType() != Formattable::kDouble && in TestExponentParse()
7083 if(sizeof(Formattable) > 112) { in TestFormattableSize()
7085 sizeof(Formattable), 112); in TestFormattableSize()
7086 } else if(sizeof(Formattable) < 112) { in TestFormattableSize()
7088 sizeof(Formattable), 112); in TestFormattableSize()
7091 sizeof(Formattable), 112); in TestFormattableSize()
7095 UBool NumberFormatTest::testFormattableAsUFormattable(const char *file, int line, Formattable &f) { in testFormattableAsUFormattable()
7115 case Formattable::kDate: in testFormattableAsUFormattable()
7120 case Formattable::kDouble: in testFormattableAsUFormattable()
7125 case Formattable::kLong: in testFormattableAsUFormattable()
7130 case Formattable::kString: in testFormattableAsUFormattable()
7145 case Formattable::kArray: in testFormattableAsUFormattable()
7151 const Formattable *array2 = f.getArray(count2); in testFormattableAsUFormattable()
7157 if(*Formattable::fromUFormattable(uu) != (array2[i])) { in testFormattableAsUFormattable()
7159 (const void*)Formattable::fromUFormattable(uu), (const void*)&(array2[i])); in testFormattableAsUFormattable()
7162 if(!testFormattableAsUFormattable("(sub item)",i,*Formattable::fromUFormattable(uu))) { in testFormattableAsUFormattable()
7170 case Formattable::kInt64: in testFormattableAsUFormattable()
7175 case Formattable::kObject: in testFormattableAsUFormattable()
7255 Formattable defaultFormattable; in TestUFormattable()
7258 == *(Formattable::fromUFormattable(defaultUFormattable.getAlias())))); in TestUFormattable()
7261 == *(Formattable::fromUFormattable(defaultUFormattable.getAlias())))); in TestUFormattable()
7264 == *(Formattable::fromUFormattable(defaultFormattable.toUFormattable())))); in TestUFormattable()
7267 == Formattable::fromUFormattable(defaultFormattable.toUFormattable()))); in TestUFormattable()
7270 == Formattable::fromUFormattable(defaultUFormattable.getAlias()))); in TestUFormattable()
7275 Formattable f(ucal_getNow(), Formattable::kIsDate); in TestUFormattable()
7279 Formattable f((double)1.61803398874989484820); // golden ratio in TestUFormattable()
7283 …Formattable f((int64_t)80994231587905127LL); // weight of the moon, in kilotons http://solarsystem… in TestUFormattable()
7287 Formattable f((int32_t)4); // random number, source: http://www.xkcd.com/221/ in TestUFormattable()
7291 Formattable f("Hello world."); // should be invariant? in TestUFormattable()
7296 Formattable f(StringPiece("73476730924573500000000.0"), status2); // weight of the moon, kg in TestUFormattable()
7303 Formattable f(obj); in TestUFormattable()
7308 const Formattable array[] = { in TestUFormattable()
7309 Formattable(ucal_getNow(), Formattable::kIsDate), in TestUFormattable()
7310 Formattable((int32_t)4), in TestUFormattable()
7311 Formattable((double)1.234), in TestUFormattable()
7314 Formattable fa(array, 3); in TestUFormattable()
7461 Formattable af; in TestParseNegativeWithFaLocale()
7477 Formattable af; in TestParseNegativeWithAlternateMinusSign()
7504 expect2(fmt, (Formattable)((double)1234.56), numstr); in TestCustomCurrencySignAndSeparator()
7602 Formattable fmtobj; in TestParseSignsAndMarks()
7883 (Formattable)(double)1234.5, "$1,234.50", TRUE, status); in TestAccountingCurrency()
7885 (Formattable)(double)-1234.5, "($1,234.50)", TRUE, status); in TestAccountingCurrency()
7887 (Formattable)(double)0, "$0.00", TRUE, status); in TestAccountingCurrency()
7889 (Formattable)(double)-0.2, "($0.20)", TRUE, status); in TestAccountingCurrency()
7891 (Formattable)(double)10000, UnicodeString("\\uFFE510,000").unescape(), TRUE, status); in TestAccountingCurrency()
7893 (Formattable)(double)-1000.5, UnicodeString("(\\uFFE51,000)").unescape(), FALSE, status); in TestAccountingCurrency()
7895 …(Formattable)(double)-23456.7, UnicodeString("-23.456,70\\u00A0\\u20AC").unescape(), TRUE, status); in TestAccountingCurrency()
8533 Formattable result; in Test13391_chakmaParsing()
8547 Formattable resultScientific; in Test13391_chakmaParsing()
8641 Formattable result; in TestParsePercentRegression()
8648 Formattable result; in TestParsePercentRegression()
8655 Formattable result; in TestParsePercentRegression()
8765 Formattable parseResult; in TestParseNaN()
8955 Formattable result; in Test20073_StrictPercentParseErrorIndex()
9036 Formattable number; in Test13148_ParseGroupingSeparators()
9048 Formattable result; in Test12753_PatternDecimalPoint()
9187 Formattable result; in Test13804_EmptyStringsWhenParsing()
9199 Formattable result; in Test13804_EmptyStringsWhenParsing()
9213 Formattable result; in Test20037_ScientificIntegerOverflow()
9223 result = Formattable(); in Test20037_ScientificIntegerOverflow()
9231 result = Formattable(); in Test20037_ScientificIntegerOverflow()
9245 Formattable result; in Test13840_ParseLongStringCrash()