]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/dcfmtest.h
1 /********************************************************************
3 * Copyright (c) 2010, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
10 // Data driven decimal formatter test.
11 // Includes testing of both parsing and formatting.
12 // Tests are in the text file dcfmtest.txt, in the source/test/testdata/ directory.
18 #include "unicode/utypes.h"
19 #if !UCONFIG_NO_REGULAR_EXPRESSIONS
24 class DecimalFormatTest
: public IntlTest
{
28 virtual ~DecimalFormatTest();
30 virtual void runIndexedTest(int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
32 // The following are test functions that are visible from the intltest test framework.
33 virtual void DataDrivenTests();
35 // The following functions are internal to the decimal format tests.
36 virtual UChar
*ReadAndConvertFile(const char *fileName
, int32_t &len
, UErrorCode
&status
);
37 virtual const char *getPath(char buffer
[2048], const char *filename
);
38 virtual void execParseTest(int32_t lineNum
,
39 const UnicodeString
&inputText
,
40 const UnicodeString
&expectedType
,
41 const UnicodeString
&expectedDecimal
,
44 virtual void execFormatTest(int32_t lineNum
,
45 const UnicodeString
&pattern
,
46 const UnicodeString
&round
,
47 const UnicodeString
&input
,
48 const UnicodeString
&expected
,
52 #endif // !UCONFIG_NO_REGULAR_EXPRESSIONS