1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/********************************************************************
* COPYRIGHT:
* Copyright (c) 2010-2012, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
//
// file: dcfmtest.h
//
// Data driven decimal formatter test.
// Includes testing of both parsing and formatting.
// Tests are in the text file dcfmtest.txt, in the source/test/testdata/ directory.
//
#ifndef DCFMTEST_H
#define DCFMTEST_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
#include "intltest.h"
class DecimalFormatTest: public IntlTest {
public:
DecimalFormatTest();
virtual ~DecimalFormatTest();
virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
// The following are test functions that are visible from the intltest test framework.
virtual void DataDrivenTests();
// The following functions are internal to the decimal format tests.
virtual UChar *ReadAndConvertFile(const char *fileName, int32_t &len, UErrorCode &status);
virtual const char *getPath(char buffer[2048], const char *filename);
virtual void execParseTest(int32_t lineNum,
const UnicodeString &inputText,
const UnicodeString &expectedType,
const UnicodeString &expectedDecimal,
UErrorCode &status);
private:
enum EFormatInputType {
kFormattable,
kStringPiece
};
public:
virtual void execFormatTest(int32_t lineNum,
const UnicodeString &pattern,
const UnicodeString &round,
const UnicodeString &input,
const UnicodeString &expected,
EFormatInputType inType,
UErrorCode &status);
};
#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS
#endif
|