]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /******************************************************************** |
2 | * COPYRIGHT: | |
3 | * Copyright (c) 1997-2001, 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 functions 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 repeatedly | |
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 | /*Internal functions used*/ | |
61 | /** | |
62 | * test subroutines used by TestAddRollExtensive() | |
63 | **/ | |
64 | static void checkDate(UCalendar* c, int32_t y, int32_t m, int32_t d); | |
65 | ||
66 | static void checkDateTime(UCalendar* c, int32_t y, int32_t m, int32_t d, | |
67 | int32_t hr, int32_t min, int32_t sec, int32_t ms, | |
68 | UCalendarDateFields field); | |
69 | ||
70 | /** | |
71 | * test subroutines used by TestGetSetDateAPI and TestFieldGetSet | |
72 | **/ | |
73 | static void verify1(const char* msg, UCalendar* c, UDateFormat* dat, int32_t year, int32_t month, int32_t day); | |
74 | ||
75 | static void verify2(const char* msg, UCalendar* c, UDateFormat* dat, int32_t year, int32_t month, int32_t day, | |
76 | int32_t hour, int32_t min, int32_t sec, int32_t am_pm); | |
77 | ||
78 | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
79 | ||
80 | #endif |