OLD | NEW |
(Empty) | |
| 1 /******************************************************************** |
| 2 * COPYRIGHT: |
| 3 * Copyright (c) 1997-2010, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. |
| 5 ********************************************************************/ |
| 6 /*******************************************************************************
* |
| 7 * |
| 8 * File CAPITEST.H |
| 9 * |
| 10 * Modification History: |
| 11 * Name Description |
| 12 * Madhu Katragadda Creation |
| 13 ********************************************************************************
*/ |
| 14 /* C API TEST FOR CALENDAR */ |
| 15 #ifndef _CCALTST |
| 16 #define _CCALTST |
| 17 |
| 18 #include "unicode/utypes.h" |
| 19 |
| 20 #if !UCONFIG_NO_FORMATTING |
| 21 |
| 22 #include "cintltst.h" |
| 23 |
| 24 |
| 25 /** |
| 26 * The function used to test the Calendar API |
| 27 **/ |
| 28 static void TestCalendar(void); |
| 29 /** |
| 30 * The function used to test getMillis, setMillis, setDate and setDateTime f
unctions extensively |
| 31 **/ |
| 32 static void TestGetSetDateAPI(void); |
| 33 /** |
| 34 * This function is used to test and confirm the functioning of |
| 35 * the calendar get and set functions of calendar fields. |
| 36 **/ |
| 37 static void TestFieldGetSet(void); |
| 38 /** |
| 39 * Execute and test adding and rolling extensively. |
| 40 **/ |
| 41 static void TestAddRollExtensive(void); |
| 42 /** |
| 43 *Testing the Limits for various Fields of Calendar |
| 44 **/ |
| 45 static void TestGetLimits(void); |
| 46 /** |
| 47 * Test that the days of the week progress properly when add is called repea
tedly |
| 48 * for increments of 24 days. |
| 49 **/ |
| 50 static void TestDOWProgression(void); |
| 51 /** |
| 52 * Confirm that the offset between local time and GMT behaves as expected. |
| 53 **/ |
| 54 static void TestGMTvsLocal(void); |
| 55 /** |
| 56 * test subroutine used by TestGMTvsLocal() |
| 57 */ |
| 58 static void testZones(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); |
| 59 /** |
| 60 * Test getKeywordValuesForLocale API |
| 61 */ |
| 62 static void TestGetKeywordValuesForLocale(void); |
| 63 /** |
| 64 * Test weekend-related APIs |
| 65 */ |
| 66 static void TestWeekend(void); |
| 67 |
| 68 /*Internal functions used*/ |
| 69 /** |
| 70 * test subroutines used by TestAddRollExtensive() |
| 71 **/ |
| 72 static void checkDate(UCalendar* c, int32_t y, int32_t m, int32_t d); |
| 73 |
| 74 static void checkDateTime(UCalendar* c, int32_t y, int32_t m, int32_t d, |
| 75 int32_t hr, int32_t min, int32_t sec, int32_t ms, |
| 76 UCalendarDateFields field); |
| 77 |
| 78 /** |
| 79 * test subroutines used by TestGetSetDateAPI and TestFieldGetSet |
| 80 **/ |
| 81 static void verify1(const char* msg, UCalendar* c, UDateFormat* dat, int32_t
year, int32_t month, int32_t day); |
| 82 |
| 83 static void verify2(const char* msg, UCalendar* c, UDateFormat* dat, int32_t
year, int32_t month, int32_t day, |
| 84 int32_t hour, in
t32_t min, int32_t sec, int32_t am_pm); |
| 85 |
| 86 #endif /* #if !UCONFIG_NO_FORMATTING */ |
| 87 |
| 88 #endif |
OLD | NEW |