]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/intltest/tmsgfmt.h
ICU-461.12.tar.gz
[apple/icu.git] / icuSources / test / intltest / tmsgfmt.h
CommitLineData
729e4ab9 1/********************************************************************
b75a7d8f 2 * COPYRIGHT:
729e4ab9
A
3 * Copyright (c) 1997-2010, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
b75a7d8f
A
6#ifndef _TESTMESSAGEFORMAT
7#define _TESTMESSAGEFORMAT
8
9#include "unicode/utypes.h"
10
11#if !UCONFIG_NO_FORMATTING
12
13#include "unicode/unistr.h"
14#include "unicode/fmtable.h"
729e4ab9 15#include "unicode/msgfmt.h"
b75a7d8f
A
16#include "intltest.h"
17
18/**
19 * TestMessageFormat tests MessageFormat, and also a few unctions in ChoiceFormat
20 */
21class TestMessageFormat: public IntlTest {
22public:
23 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
24
25 /**
26 * regression test for a specific bug regarding ChoiceFormat boundaries
27 **/
28 void testBug1(void);
29 /**
30 * regression test for a specific bug regarding MessageFormat using ChoiceFormat
31 **/
32 void testBug2(void);
33 /**
34 * regression test for a specific bug involving NumberFormat and Locales
35 **/
36 void testBug3(void);
37 /**
38 * test MessageFormat with various given patterns
39 **/
40 void PatternTest(void);
41 /**
42 * test MesageFormat formatting functionality in a simple example
43 **/
44 void sample(void);
45
46 /**
47 * tests the static MessageFormat::format method
48 **/
49 void testStaticFormat(/* char* par */);
50 /**
51 * tests MesageFormat functionality with a simple format
52 **/
53 void testSimpleFormat(/* char* par */);
54 /**
55 * tests MesageFormat functionality with a format including a ChoiceFormat
56 **/
57 void testMsgFormatChoice(/* char* par */);
46f4442e
A
58 /**
59 * tests MesageFormat functionality with a PluralFormat.
60 **/
61 void testMsgFormatPlural(/* char* par */);
b75a7d8f 62
729e4ab9
A
63 /**
64 * tests MessageFormat functionality with a SelectFormat.
65 **/
66 void testMsgFormatSelect(/* char* par */);
67
68 /**
69 * Internal method to format a MessageFormat object with passed args
70 **/
71 void internalFormat(MessageFormat* msgFmt ,
72 Formattable* args , int32_t numOfArgs ,
73 UnicodeString expected ,char* errMsg);
74
75 /**
76 * Internal method to create a MessageFormat object with passed args
77 **/
78 MessageFormat* internalCreate(
79 UnicodeString pattern ,Locale locale , UErrorCode& err, char* errMsg);
80
b75a7d8f
A
81 /**
82 * Verify that MessageFormat accomodates more than 10 arguments
83 * and more than 10 subformats.
84 */
85 void TestUnlimitedArgsAndSubformats();
86
374ca955
A
87 /**
88 * Test RBNF extensions to MessageFormat.
89 */
90 void TestRBNF();
91
b75a7d8f
A
92 //
93 /**
94 * ------------ API tests ----------
95 * These routines test various API functionality.
96 * In addition to the methods their name suggests,
97 * they often test other methods as well.
98 **/
99 void testCopyConstructor(void);
100 void testCopyConstructor2(void);
101 void testAssignment(void);
102 void testClone(void);
103 void testEquals(void);
104 void testNotEquals(void);
105 void testSetLocale(void);
106 void testFormat(void);
107 void testParse(void);
108 void testAdopt(void);
73c04bcf
A
109 void TestTurkishCasing(void);
110 void testAutoQuoteApostrophe(void);
b75a7d8f 111
729e4ab9
A
112 /* Provide better code coverage */
113 void testCoverage(void);
114
b75a7d8f
A
115private:
116};
117
118#endif /* #if !UCONFIG_NO_FORMATTING */
119
120#endif