• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /********************************************************************
4  * COPYRIGHT:
5  * Copyright (c) 1997-2013, International Business Machines Corporation and
6  * others. All Rights Reserved.
7  ********************************************************************/
8 
9 #ifndef _PLURALFORMATTEST
10 #define _PLURALFORMATTEST
11 
12 #include "unicode/utypes.h"
13 #include "unicode/plurrule.h"
14 #include "unicode/plurfmt.h"
15 
16 
17 #if !UCONFIG_NO_FORMATTING
18 
19 #include "intltest.h"
20 
21 /**
22  * Test basic functionality of various API functions
23  **/
24 class PluralFormatTest : public IntlTest {
25     void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
26 
27 private:
28     /**
29      * Performs tests on many API functions, see detailed comments in source code
30      **/
31     void pluralFormatBasicTest(/* char* par */);
32     void pluralFormatUnitTest(/* char* par */);
33     void pluralFormatLocaleTest(/* char* par */);
34     void pluralFormatExtendedTest();
35     void pluralFormatExtendedParseTest();
36     void ordinalFormatTest();
37     void TestDecimals();
38     void numberFormatTest(PluralFormat* plFmt,
39                           NumberFormat *numFmt,
40                           int32_t start,
41                           int32_t end,
42                           UnicodeString* numOddAppendStr,
43                           UnicodeString* numEvenAppendStr,
44                           UBool overwrite, // overwrite the numberFormat.format result
45                           UnicodeString *message);
46     void helperTestResults(const char** localeArray,
47                            int32_t capacityOfArray,
48                            UnicodeString& testPattern,
49                            int8_t *expectingResults);
50 };
51 
52 #endif /* #if !UCONFIG_NO_FORMATTING */
53 
54 #endif
55