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