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