]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/dcfmtest.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /********************************************************************
5 * Copyright (c) 2010-2012, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 ********************************************************************/
12 // Data driven decimal formatter test.
13 // Includes testing of both parsing and formatting.
14 // Tests are in the text file dcfmtest.txt, in the source/test/testdata/ directory.
20 #include "unicode/utypes.h"
21 #if !UCONFIG_NO_REGULAR_EXPRESSIONS
26 class DecimalFormatTest
: public IntlTest
{
30 virtual ~DecimalFormatTest();
32 virtual void runIndexedTest(int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
34 // The following are test functions that are visible from the intltest test framework.
35 virtual void DataDrivenTests();
37 // The following functions are internal to the decimal format tests.
38 virtual UChar
*ReadAndConvertFile(const char *fileName
, int32_t &len
, UErrorCode
&status
);
39 virtual const char *getPath(char buffer
[2048], const char *filename
);
40 virtual void execParseTest(int32_t lineNum
,
41 const UnicodeString
&inputText
,
42 const UnicodeString
&expectedType
,
43 const UnicodeString
&expectedDecimal
,
47 enum EFormatInputType
{
53 virtual void execFormatTest(int32_t lineNum
,
54 const UnicodeString
&pattern
,
55 const UnicodeString
&round
,
56 const UnicodeString
&input
,
57 const UnicodeString
&expected
,
58 EFormatInputType inType
,
62 #endif // !UCONFIG_NO_REGULAR_EXPRESSIONS