]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/itrbnf.h
ICU-551.41.tar.gz
[apple/icu.git] / icuSources / test / intltest / itrbnf.h
1 /*
2 *******************************************************************************
3 * Copyright (C) 1996-2015, International Business Machines Corporation and *
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
31 void TestMultiplePluralRules();
32
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 */
50 virtual void TestEnglishSpellout();
51
52 /**
53 * Perform a simple spot check on the English ordinal-abbreviation rules
54 */
55 virtual void TestOrdinalAbbreviations();
56
57 /**
58 * Perform a simple spot check on the duration-formatting rules
59 */
60 virtual void TestDurations();
61
62 /**
63 * Perform a simple spot check on the Spanish spellout rules
64 */
65 virtual void TestSpanishSpellout();
66
67 /**
68 * Perform a simple spot check on the French spellout rules
69 */
70 virtual void TestFrenchSpellout();
71
72 /**
73 * Perform a simple spot check on the Swiss French spellout rules
74 */
75 virtual void TestSwissFrenchSpellout();
76
77 /**
78 * Check that Belgian French matches Swiss French spellout rules
79 */
80 virtual void TestBelgianFrenchSpellout();
81
82 /**
83 * Perform a simple spot check on the Italian spellout rules
84 */
85 virtual void TestItalianSpellout();
86
87 /**
88 * Perform a simple spot check on the Portuguese spellout rules
89 */
90 virtual void TestPortugueseSpellout();
91
92 /**
93 * Perform a simple spot check on the German spellout rules
94 */
95 virtual void TestGermanSpellout();
96
97 /**
98 * Perform a simple spot check on the Thai spellout rules
99 */
100 virtual void TestThaiSpellout();
101
102 /**
103 * Perform a simple spot check on the Swedish spellout rules
104 */
105 virtual void TestSwedishSpellout();
106
107 /**
108 * Perform a simple spot check on small values
109 */
110 virtual void TestSmallValues();
111
112 /**
113 * Test localizations using string data.
114 */
115 virtual void TestLocalizations();
116
117 /**
118 * Test that all locales construct ok.
119 */
120 virtual void TestAllLocales();
121
122 /**
123 * Test that hebrew fractions format without trailing '<'
124 */
125 virtual void TestHebrewFraction();
126
127 /**
128 * Regression test, don't truncate
129 * when doing multiplier substitution to a number format rule.
130 */
131 virtual void TestMultiplierSubstitution();
132
133 /**
134 * Test the setDecimalFormatSymbols in RBNF
135 */
136 virtual void TestSetDecimalFormatSymbols();
137
138 /**
139 * Test the plural rules in RBNF
140 */
141 virtual void TestPluralRules();
142
143 protected:
144 virtual void doTest(RuleBasedNumberFormat* formatter, const char* const testData[][2], UBool testParsing);
145 virtual void doLenientParseTest(RuleBasedNumberFormat* formatter, const char* testData[][2]);
146
147 /* U_HAVE_RBNF */
148 #else
149
150 virtual void TestRBNFDisabled();
151
152 /* U_HAVE_RBNF */
153 #endif
154 };
155
156 #endif /* #if !UCONFIG_NO_FORMATTING */
157
158 // endif ITRBNF_H
159 #endif