]>
Commit | Line | Data |
---|---|---|
1 | /******************************************************************** | |
2 | * COPYRIGHT: | |
3 | * Copyright (c) 2007, International Business Machines Corporation and | |
4 | * others. All Rights Reserved. | |
5 | ********************************************************************/ | |
6 | ||
7 | /** | |
8 | * DataDrivenCalendarTest is a test class that uses data stored in resource | |
9 | * bundles to perform testing. For more details on data structure, see | |
10 | * source/test/testdata/calendar.txt | |
11 | */ | |
12 | ||
13 | #ifndef _INTLTESTDATADRIVENCALENDAR | |
14 | #define _INTLTESTDATADRIVENCALENDAR | |
15 | ||
16 | #include "unicode/utypes.h" | |
17 | ||
18 | #if !UCONFIG_NO_FORMATTING | |
19 | ||
20 | #include "tsdate.h" | |
21 | #include "uvector.h" | |
22 | #include "unicode/calendar.h" | |
23 | #include "fldset.h" | |
24 | ||
25 | class TestDataModule; | |
26 | class TestData; | |
27 | class DataMap; | |
28 | class CalendarFieldsSet; | |
29 | ||
30 | class DataDrivenCalendarTest : public IntlTest { | |
31 | void runIndexedTest(int32_t index, UBool exec, const char* &name, | |
32 | char* par = NULL); | |
33 | public: | |
34 | DataDrivenCalendarTest(); | |
35 | virtual ~DataDrivenCalendarTest(); | |
36 | protected: | |
37 | ||
38 | void DataDrivenTest(char *par); | |
39 | void processTest(TestData *testData); | |
40 | private: | |
41 | void testConvert(TestData *testData, const DataMap *settings, UBool fwd); | |
42 | void testOps(TestData *testData, const DataMap *settings); | |
43 | void testConvert(int32_t n, const CalendarFieldsSet &fromSet, | |
44 | Calendar *fromCal, const CalendarFieldsSet &toSet, Calendar *toCal, | |
45 | UBool fwd); | |
46 | private: | |
47 | TestDataModule *driver; | |
48 | }; | |
49 | ||
50 | #endif /* #if !UCONFIG_NO_COLLATION */ | |
51 | ||
52 | #endif |