1 /********************************************************************
3 * Copyright (c) 2003, International Business Machines Corporation
4 * and others. All Rights Reserved.
5 ********************************************************************
6 * Calendar Case Test is a type of CalendarTest which compares the
7 * behavior of a calendar to a certain set of 'test cases', involving
8 * conversion between julian-day to fields and vice versa.
9 ********************************************************************/
11 #ifndef __CalendarCaseTest__
12 #define __CalendarCaseTest__
14 #include "unicode/utypes.h"
16 #if !UCONFIG_NO_FORMATTING
18 #include "unicode/calendar.h"
19 #include "unicode/smpdtfmt.h"
22 class CalendarCaseTest
: public CalendarTest
{
24 virtual void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
);
26 /* Test case struct */
28 double julian
; // Julian Date
40 * @param cases array of items to test. Terminate with a "-1" for era.
42 void doTestCases(const TestCase
*cases
, Calendar
*cal
);
46 * Utility function to test out a specific field
48 * @param field which field
49 * @param value expected value
50 * @param status err status
51 * @return boolean indicating success (TRUE) or failure (FALSE) of the test.
53 UBool
checkField(Calendar
*cal
, UCalendarDateFields field
, int32_t value
, UErrorCode
&status
);