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