summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu/icu-4.4/test/intltest/dcfmtest.h
blob: 87444b3dfda178d385e5d020a8c4b5aec9f139b5 (plain)
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
/********************************************************************
 * COPYRIGHT:
 * Copyright (c) 2010, 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);

    virtual void execFormatTest(int32_t lineNum,
                               const UnicodeString &pattern,
                               const UnicodeString &round, 
                               const UnicodeString &input,
                               const UnicodeString &expected,
                               UErrorCode &status);
};

#endif   // !UCONFIG_NO_REGULAR_EXPRESSIONS
#endif