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