1 /********************************************************************
2  * COPYRIGHT:
3  * Copyright (c) 2008-2013, International Business Machines Corporation
4  * and others. All Rights Reserved.
5  ********************************************************************/
6 
7 #ifndef __INTLTESTTIMEUNITTEST__
8 #define __INTLTESTTIMEUNITTEST__
9 
10 
11 #if !UCONFIG_NO_FORMATTING
12 
13 #include "unicode/utypes.h"
14 #include "unicode/locid.h"
15 #include "intltest.h"
16 
17 /**
18  * Test basic functionality of various API functions
19  **/
20 class TimeUnitTest: public IntlTest {
21     void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
22 
23 public:
24     /**
25      * Performs basic tests
26      **/
27     void testBasic();
28 
29     /**
30      * Performs API tests
31      **/
32     void testAPI();
33 
34     /**
35      * Performs tests for Greek
36      * This tests that requests for short unit names correctly fall back
37      * to long unit names for a locale where the locale data does not
38      * provide short unit names. As of CLDR 1.9, Greek is one such language.
39      **/
40     void testGreekWithFallback();
41 
42     /**
43      * Performs tests for Greek
44      * This tests that if the plural count listed in time unit format does not
45      * match those in the plural rules for the locale, those plural count in
46      * time unit format will be ingored and subsequently, fall back will kick in
47      * which is tested above.
48      * Without data sanitization, setNumberFormat() would crash.
49      * As of CLDR shiped in ICU4.8, Greek is one such language.
50      */
51     void testGreekWithSanitization();
52 
53     /**
54      * Performs unit test for ticket 10219 making sure that plurals work
55      * correctly with rounding.
56      */
57     void test10219Plurals();
58 
59 };
60 
61 #endif /* #if !UCONFIG_NO_FORMATTING */
62 
63 #endif
64