]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | ******************************************************************************* | |
b331163b | 3 | * Copyright (C) 1996-2015, International Business Machines Corporation and * |
b75a7d8f A |
4 | * others. All Rights Reserved. * |
5 | ******************************************************************************* | |
6 | */ | |
7 | ||
8 | #ifndef ITRBNF_H | |
9 | #define ITRBNF_H | |
10 | ||
11 | #include "unicode/utypes.h" | |
12 | ||
13 | #if !UCONFIG_NO_FORMATTING | |
14 | ||
15 | #include "intltest.h" | |
16 | #include "unicode/rbnf.h" | |
17 | ||
18 | ||
19 | class IntlTestRBNF : public IntlTest { | |
20 | public: | |
21 | ||
22 | // IntlTest override | |
23 | virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par); | |
24 | ||
25 | #if U_HAVE_RBNF | |
26 | /** | |
27 | * Perform an API test | |
28 | */ | |
29 | virtual void TestAPI(); | |
30 | ||
b331163b A |
31 | void TestMultiplePluralRules(); |
32 | ||
b75a7d8f A |
33 | /** |
34 | * Perform a simple spot check on the FractionalRuleSet logic | |
35 | */ | |
36 | virtual void TestFractionalRuleSet(); | |
37 | ||
38 | #if 0 | |
39 | /** | |
40 | * Perform API tests on llong | |
41 | */ | |
42 | virtual void TestLLong(); | |
43 | virtual void TestLLongConstructors(); | |
44 | virtual void TestLLongSimpleOperators(); | |
45 | #endif | |
46 | ||
47 | /** | |
48 | * Perform a simple spot check on the English spellout rules | |
49 | */ | |
2ca993e8 | 50 | void TestEnglishSpellout(); |
b75a7d8f A |
51 | |
52 | /** | |
53 | * Perform a simple spot check on the English ordinal-abbreviation rules | |
54 | */ | |
2ca993e8 | 55 | void TestOrdinalAbbreviations(); |
b75a7d8f A |
56 | |
57 | /** | |
58 | * Perform a simple spot check on the duration-formatting rules | |
59 | */ | |
2ca993e8 | 60 | void TestDurations(); |
b75a7d8f A |
61 | |
62 | /** | |
63 | * Perform a simple spot check on the Spanish spellout rules | |
64 | */ | |
2ca993e8 | 65 | void TestSpanishSpellout(); |
b75a7d8f A |
66 | |
67 | /** | |
68 | * Perform a simple spot check on the French spellout rules | |
69 | */ | |
2ca993e8 | 70 | void TestFrenchSpellout(); |
b75a7d8f A |
71 | |
72 | /** | |
73 | * Perform a simple spot check on the Swiss French spellout rules | |
74 | */ | |
2ca993e8 | 75 | void TestSwissFrenchSpellout(); |
b75a7d8f A |
76 | |
77 | /** | |
78 | * Check that Belgian French matches Swiss French spellout rules | |
79 | */ | |
2ca993e8 | 80 | void TestBelgianFrenchSpellout(); |
b75a7d8f A |
81 | |
82 | /** | |
83 | * Perform a simple spot check on the Italian spellout rules | |
84 | */ | |
2ca993e8 | 85 | void TestItalianSpellout(); |
b75a7d8f | 86 | |
46f4442e A |
87 | /** |
88 | * Perform a simple spot check on the Portuguese spellout rules | |
89 | */ | |
2ca993e8 | 90 | void TestPortugueseSpellout(); |
46f4442e | 91 | |
b75a7d8f A |
92 | /** |
93 | * Perform a simple spot check on the German spellout rules | |
94 | */ | |
2ca993e8 | 95 | void TestGermanSpellout(); |
b75a7d8f A |
96 | |
97 | /** | |
98 | * Perform a simple spot check on the Thai spellout rules | |
99 | */ | |
2ca993e8 | 100 | void TestThaiSpellout(); |
b75a7d8f A |
101 | |
102 | /** | |
103 | * Perform a simple spot check on the Swedish spellout rules | |
104 | */ | |
2ca993e8 | 105 | void TestSwedishSpellout(); |
b75a7d8f | 106 | |
374ca955 A |
107 | /** |
108 | * Perform a simple spot check on small values | |
109 | */ | |
2ca993e8 | 110 | void TestSmallValues(); |
374ca955 A |
111 | |
112 | /** | |
113 | * Test localizations using string data. | |
114 | */ | |
2ca993e8 | 115 | void TestLocalizations(); |
374ca955 | 116 | |
73c04bcf A |
117 | /** |
118 | * Test that all locales construct ok. | |
119 | */ | |
2ca993e8 | 120 | void TestAllLocales(); |
73c04bcf A |
121 | |
122 | /** | |
123 | * Test that hebrew fractions format without trailing '<' | |
124 | */ | |
2ca993e8 | 125 | void TestHebrewFraction(); |
73c04bcf | 126 | |
46f4442e A |
127 | /** |
128 | * Regression test, don't truncate | |
129 | * when doing multiplier substitution to a number format rule. | |
130 | */ | |
2ca993e8 | 131 | void TestMultiplierSubstitution(); |
46f4442e | 132 | |
4388f060 A |
133 | /** |
134 | * Test the setDecimalFormatSymbols in RBNF | |
135 | */ | |
2ca993e8 | 136 | void TestSetDecimalFormatSymbols(); |
4388f060 | 137 | |
b331163b A |
138 | /** |
139 | * Test the plural rules in RBNF | |
140 | */ | |
2ca993e8 | 141 | void TestPluralRules(); |
b331163b | 142 | |
2ca993e8 A |
143 | void TestInfinityNaN(); |
144 | void TestVariableDecimalPoint(); | |
145 | void TestRounding(); | |
146 | ||
147 | protected: | |
46f4442e | 148 | virtual void doTest(RuleBasedNumberFormat* formatter, const char* const testData[][2], UBool testParsing); |
b75a7d8f A |
149 | virtual void doLenientParseTest(RuleBasedNumberFormat* formatter, const char* testData[][2]); |
150 | ||
151 | /* U_HAVE_RBNF */ | |
152 | #else | |
153 | ||
154 | virtual void TestRBNFDisabled(); | |
155 | ||
156 | /* U_HAVE_RBNF */ | |
157 | #endif | |
158 | }; | |
159 | ||
160 | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
161 | ||
162 | // endif ITRBNF_H | |
163 | #endif |