]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | // © 2016 and later: Unicode, Inc. and others. |
2 | // License & terms of use: http://www.unicode.org/copyright.html | |
51004dcb A |
3 | /* |
4 | ******************************************************************************* | |
5 | * | |
57a6839d | 6 | * Copyright (C) 2012-2013, International Business Machines |
51004dcb A |
7 | * Corporation and others. All Rights Reserved. |
8 | * | |
9 | ******************************************************************************* | |
10 | * file name: listformattertest.cpp | |
f3c0d7a5 | 11 | * encoding: UTF-8 |
51004dcb A |
12 | * tab size: 8 (not used) |
13 | * indentation:4 | |
14 | * | |
15 | * created on: 2012aug27 | |
16 | * created by: Umesh P. Nair | |
17 | */ | |
18 | ||
19 | #ifndef __LISTFORMATTERTEST_H__ | |
20 | #define __LISTFORMATTERTEST_H__ | |
21 | ||
22 | #include "unicode/listformatter.h" | |
23 | #include "intltest.h" | |
24 | ||
25 | class ListFormatterTest : public IntlTest { | |
26 | public: | |
27 | ListFormatterTest(); | |
28 | virtual ~ListFormatterTest() {} | |
29 | ||
30 | void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0); | |
31 | ||
32 | void TestRoot(); | |
33 | void TestBogus(); | |
34 | void TestEnglish(); | |
35 | void TestEnglishUS(); | |
f3c0d7a5 A |
36 | void TestEnglishGB(); |
37 | void TestNynorsk(); | |
38 | void TestChineseTradHK(); | |
51004dcb A |
39 | void TestRussian(); |
40 | void TestMalayalam(); | |
41 | void TestZulu(); | |
42 | void TestOutOfOrderPatterns(); | |
57a6839d | 43 | void Test9946(); |
51004dcb A |
44 | |
45 | private: | |
46 | void CheckFormatting(const ListFormatter* formatter, UnicodeString data[], int32_t data_size, const UnicodeString& expected_result); | |
47 | void CheckFourCases( | |
48 | const char* locale_string, | |
49 | UnicodeString one, | |
50 | UnicodeString two, | |
51 | UnicodeString three, | |
52 | UnicodeString four, | |
53 | UnicodeString results[4]); | |
54 | UBool RecordFourCases( | |
55 | const Locale& locale, | |
56 | UnicodeString one, | |
57 | UnicodeString two, | |
58 | UnicodeString three, | |
59 | UnicodeString four, | |
60 | UnicodeString results[4]); | |
61 | ||
62 | private: | |
63 | // Reused test data. | |
64 | const UnicodeString prefix; | |
65 | const UnicodeString one; | |
66 | const UnicodeString two; | |
67 | const UnicodeString three; | |
68 | const UnicodeString four; | |
69 | }; | |
70 | ||
71 | #endif |