]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | // © 2016 and later: Unicode, Inc. and others. |
2 | // License & terms of use: http://www.unicode.org/copyright.html | |
46f4442e | 3 | /******************************************************************** |
4388f060 | 4 | * COPYRIGHT: |
57a6839d | 5 | * Copyright (c) 1997-2013, International Business Machines Corporation and |
46f4442e A |
6 | * others. All Rights Reserved. |
7 | ********************************************************************/ | |
8 | ||
9 | #ifndef _PluralRulesTest | |
10 | #define _PluralRulesTest | |
11 | ||
12 | #include "unicode/utypes.h" | |
13 | ||
14 | #if !UCONFIG_NO_FORMATTING | |
15 | ||
16 | #include "intltest.h" | |
57a6839d A |
17 | #include "unicode/localpointer.h" |
18 | #include "unicode/plurrule.h" | |
46f4442e A |
19 | |
20 | /** | |
21 | * Test basic functionality of various API functions | |
22 | **/ | |
23 | class PluralRulesTest : public IntlTest { | |
4388f060 | 24 | void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); |
46f4442e A |
25 | |
26 | private: | |
27 | /** | |
28 | * Performs tests on many API functions, see detailed comments in source code | |
29 | **/ | |
4388f060 A |
30 | void testAPI(); |
31 | void testGetUniqueKeywordValue(); | |
32 | void testGetSamples(); | |
33 | void testWithin(); | |
34 | void testGetAllKeywordValues(); | |
51004dcb | 35 | void testOrdinal(); |
57a6839d A |
36 | void testSelect(); |
37 | void testAvailbleLocales(); | |
38 | void testParseErrors(); | |
39 | void testFixedDecimal(); | |
4388f060 A |
40 | |
41 | void assertRuleValue(const UnicodeString& rule, double expected); | |
42 | void assertRuleKeyValue(const UnicodeString& rule, const UnicodeString& key, | |
43 | double expected); | |
57a6839d A |
44 | void checkSelect(const LocalPointer<PluralRules> &rules, UErrorCode &status, |
45 | int32_t line, const char *keyword, ...); | |
46f4442e A |
46 | }; |
47 | ||
48 | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
49 | ||
50 | #endif |