2016-06-15 18:58:17 +00:00
|
|
|
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
|
|
|
// License & terms of use: http://www.unicode.org/copyright.html
|
2007-07-12 21:53:20 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2016-05-31 21:45:07 +00:00
|
|
|
* Copyright (c) 2007, International Business Machines Corporation and
|
|
|
|
* others. All Rights Reserved.
|
2007-07-12 21:53:20 +00:00
|
|
|
********************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DataDrivenCalendarTest is a test class that uses data stored in resource
|
|
|
|
* bundles to perform testing. For more details on data structure, see
|
|
|
|
* source/test/testdata/calendar.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INTLTESTDATADRIVENCALENDAR
|
|
|
|
#define _INTLTESTDATADRIVENCALENDAR
|
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
|
|
|
|
#if !UCONFIG_NO_FORMATTING
|
|
|
|
|
|
|
|
#include "tsdate.h"
|
|
|
|
#include "uvector.h"
|
|
|
|
#include "unicode/calendar.h"
|
2007-08-10 02:09:24 +00:00
|
|
|
#include "fldset.h"
|
2007-07-12 21:53:20 +00:00
|
|
|
|
|
|
|
class TestDataModule;
|
|
|
|
class TestData;
|
|
|
|
class DataMap;
|
|
|
|
class CalendarFieldsSet;
|
|
|
|
|
2007-07-17 14:54:46 +00:00
|
|
|
class DataDrivenCalendarTest : public IntlTest {
|
|
|
|
void runIndexedTest(int32_t index, UBool exec, const char* &name,
|
|
|
|
char* par = NULL);
|
2007-07-12 21:53:20 +00:00
|
|
|
public:
|
2007-07-17 14:54:46 +00:00
|
|
|
DataDrivenCalendarTest();
|
|
|
|
virtual ~DataDrivenCalendarTest();
|
2007-07-12 21:53:20 +00:00
|
|
|
protected:
|
|
|
|
|
2007-07-17 14:54:46 +00:00
|
|
|
void DataDrivenTest(char *par);
|
|
|
|
void processTest(TestData *testData);
|
2007-07-12 21:53:20 +00:00
|
|
|
private:
|
2007-07-17 14:54:46 +00:00
|
|
|
void testConvert(TestData *testData, const DataMap *settings, UBool fwd);
|
|
|
|
void testOps(TestData *testData, const DataMap *settings);
|
|
|
|
void testConvert(int32_t n, const CalendarFieldsSet &fromSet,
|
|
|
|
Calendar *fromCal, const CalendarFieldsSet &toSet, Calendar *toCal,
|
|
|
|
UBool fwd);
|
2007-07-12 21:53:20 +00:00
|
|
|
private:
|
2007-07-17 14:54:46 +00:00
|
|
|
TestDataModule *driver;
|
2007-07-12 21:53:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* #if !UCONFIG_NO_COLLATION */
|
|
|
|
|
|
|
|
#endif
|