]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/intltest/itrbnf.h
ICU-64260.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / itrbnf.h
CommitLineData
f3c0d7a5
A
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
b75a7d8f
A
3/*
4 *******************************************************************************
b331163b 5 * Copyright (C) 1996-2015, International Business Machines Corporation and *
b75a7d8f
A
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
21class 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
b331163b
A
33 void TestMultiplePluralRules();
34
b75a7d8f
A
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 */
2ca993e8 52 void TestEnglishSpellout();
b75a7d8f
A
53
54 /**
55 * Perform a simple spot check on the English ordinal-abbreviation rules
56 */
2ca993e8 57 void TestOrdinalAbbreviations();
b75a7d8f
A
58
59 /**
60 * Perform a simple spot check on the duration-formatting rules
61 */
2ca993e8 62 void TestDurations();
b75a7d8f
A
63
64 /**
65 * Perform a simple spot check on the Spanish spellout rules
66 */
2ca993e8 67 void TestSpanishSpellout();
b75a7d8f
A
68
69 /**
70 * Perform a simple spot check on the French spellout rules
71 */
2ca993e8 72 void TestFrenchSpellout();
b75a7d8f
A
73
74 /**
75 * Perform a simple spot check on the Swiss French spellout rules
76 */
2ca993e8 77 void TestSwissFrenchSpellout();
b75a7d8f
A
78
79 /**
80 * Check that Belgian French matches Swiss French spellout rules
81 */
2ca993e8 82 void TestBelgianFrenchSpellout();
b75a7d8f
A
83
84 /**
85 * Perform a simple spot check on the Italian spellout rules
86 */
2ca993e8 87 void TestItalianSpellout();
b75a7d8f 88
46f4442e
A
89 /**
90 * Perform a simple spot check on the Portuguese spellout rules
91 */
2ca993e8 92 void TestPortugueseSpellout();
46f4442e 93
b75a7d8f
A
94 /**
95 * Perform a simple spot check on the German spellout rules
96 */
2ca993e8 97 void TestGermanSpellout();
b75a7d8f
A
98
99 /**
100 * Perform a simple spot check on the Thai spellout rules
101 */
2ca993e8 102 void TestThaiSpellout();
b75a7d8f
A
103
104 /**
105 * Perform a simple spot check on the Swedish spellout rules
106 */
2ca993e8 107 void TestSwedishSpellout();
b75a7d8f 108
374ca955
A
109 /**
110 * Perform a simple spot check on small values
111 */
2ca993e8 112 void TestSmallValues();
374ca955
A
113
114 /**
115 * Test localizations using string data.
116 */
2ca993e8 117 void TestLocalizations();
374ca955 118
73c04bcf
A
119 /**
120 * Test that all locales construct ok.
121 */
2ca993e8 122 void TestAllLocales();
73c04bcf
A
123
124 /**
125 * Test that hebrew fractions format without trailing '<'
126 */
2ca993e8 127 void TestHebrewFraction();
73c04bcf 128
46f4442e
A
129 /**
130 * Regression test, don't truncate
131 * when doing multiplier substitution to a number format rule.
132 */
2ca993e8 133 void TestMultiplierSubstitution();
46f4442e 134
4388f060
A
135 /**
136 * Test the setDecimalFormatSymbols in RBNF
137 */
2ca993e8 138 void TestSetDecimalFormatSymbols();
4388f060 139
b331163b
A
140 /**
141 * Test the plural rules in RBNF
142 */
2ca993e8 143 void TestPluralRules();
b331163b 144
2ca993e8
A
145 void TestInfinityNaN();
146 void TestVariableDecimalPoint();
147 void TestRounding();
f3c0d7a5
A
148 void TestLargeNumbers();
149 void TestCompactDecimalFormatStyle();
0f5d89e8
A
150 void TestParseFailure();
151 void TestMinMaxIntegerDigitsIgnored();
2ca993e8
A
152
153protected:
46f4442e 154 virtual void doTest(RuleBasedNumberFormat* formatter, const char* const testData[][2], UBool testParsing);
b75a7d8f
A
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