]>
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 | /******************************************************************** |
f3c0d7a5 | 4 | * COPYRIGHT: |
2ca993e8 | 5 | * Copyright (c) 2008-2016 International Business Machines Corporation and |
46f4442e A |
6 | * others. All Rights Reserved. |
7 | ********************************************************************/ | |
8 | ||
9 | #ifndef _INTLTESTDATEINTERVALFORMAT | |
10 | #define _INTLTESTDATEINTERVALFORMAT | |
11 | ||
12 | #include "unicode/utypes.h" | |
13 | #include "unicode/locid.h" | |
14 | ||
15 | #if !UCONFIG_NO_FORMATTING | |
16 | ||
17 | #include "intltest.h" | |
18 | ||
19 | /** | |
20 | * Test basic functionality of various API functions | |
21 | **/ | |
22 | class DateIntervalFormatTest: public IntlTest { | |
f3c0d7a5 | 23 | void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); |
46f4442e A |
24 | |
25 | public: | |
26 | /** | |
27 | * Performs tests on many API functions, see detailed comments in source code | |
28 | **/ | |
29 | void testAPI(); | |
30 | ||
31 | /** | |
32 | * Test formatting | |
33 | */ | |
34 | void testFormat(); | |
35 | ||
36 | /** | |
37 | * Test formatting using user defined DateIntervalInfo | |
38 | */ | |
39 | void testFormatUserDII(); | |
40 | ||
51004dcb A |
41 | /** |
42 | * Test for no unwanted side effects when setting | |
43 | * interval patterns. | |
44 | */ | |
45 | void testSetIntervalPatternNoSideEffect(); | |
46 | ||
57a6839d A |
47 | /** |
48 | * Tests different year formats. | |
49 | */ | |
50 | void testYearFormats(); | |
51 | ||
46f4442e A |
52 | /** |
53 | * Stress test -- stress test formatting on 40 locales | |
54 | */ | |
55 | void testStress(); | |
56 | ||
b331163b A |
57 | void testTicket11583_2(); |
58 | ||
2ca993e8 A |
59 | void testTicket11985(); |
60 | ||
61 | void testTicket11669(); | |
62 | void threadFunc11669(int32_t threadNum); | |
63 | ||
f3c0d7a5 A |
64 | void testTicket12065(); |
65 | ||
46f4442e A |
66 | private: |
67 | /** | |
68 | * Test formatting against expected result | |
69 | */ | |
70 | void expect(const char** data, int32_t data_length); | |
71 | ||
72 | /** | |
f3c0d7a5 | 73 | * Test formatting against expected result using user defined |
46f4442e A |
74 | * DateIntervalInfo |
75 | */ | |
76 | void expectUserDII(const char** data, int32_t data_length); | |
77 | ||
78 | /** | |
f3c0d7a5 | 79 | * Stress test formatting |
46f4442e | 80 | */ |
f3c0d7a5 | 81 | void stress(const char** data, int32_t data_length, const Locale& loc, |
46f4442e A |
82 | const char* locName); |
83 | }; | |
84 | ||
85 | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
86 | ||
87 | #endif |