]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/cintltst/ccaltst.h
ICU-59173.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / ccaltst.h
CommitLineData
f3c0d7a5
A
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
b75a7d8f
A
3/********************************************************************
4 * COPYRIGHT:
4388f060 5 * Copyright (c) 1997-2012, International Business Machines Corporation and
b75a7d8f
A
6 * others. All Rights Reserved.
7 ********************************************************************/
8/********************************************************************************
9*
10* File CAPITEST.H
11*
12* Modification History:
13* Name Description
14* Madhu Katragadda Creation
15*********************************************************************************/
16/* C API TEST FOR CALENDAR */
17#ifndef _CCALTST
18#define _CCALTST
19
20#include "unicode/utypes.h"
f3c0d7a5
A
21#include "unicode/ucal.h"
22#include "unicode/udat.h"
b75a7d8f
A
23
24#if !UCONFIG_NO_FORMATTING
25
26#include "cintltst.h"
27
28
29 /**
30 * The function used to test the Calendar API
31 **/
32 static void TestCalendar(void);
33 /**
34 * The function used to test getMillis, setMillis, setDate and setDateTime functions extensively
35 **/
36 static void TestGetSetDateAPI(void);
37 /**
38 * This function is used to test and confirm the functioning of
39 * the calendar get and set functions of calendar fields.
40 **/
41 static void TestFieldGetSet(void);
42 /**
43 * Execute and test adding and rolling extensively.
44 **/
45 static void TestAddRollExtensive(void);
46 /**
47 *Testing the Limits for various Fields of Calendar
48 **/
49 static void TestGetLimits(void);
50 /**
51 * Test that the days of the week progress properly when add is called repeatedly
52 * for increments of 24 days.
53 **/
54 static void TestDOWProgression(void);
55 /**
56 * Confirm that the offset between local time and GMT behaves as expected.
57 **/
58 static void TestGMTvsLocal(void);
59 /**
60 * test subroutine used by TestGMTvsLocal()
61 */
62 static void testZones(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
729e4ab9
A
63 /**
64 * Test getKeywordValuesForLocale API
65 */
66 static void TestGetKeywordValuesForLocale(void);
67 /**
68 * Test weekend-related APIs
69 */
70 static void TestWeekend(void);
4388f060
A
71 /**
72 * Test ambiguous wall time
73 */
74 static void TestAmbiguousWallTime(void);
b75a7d8f
A
75
76/*Internal functions used*/
77 /**
78 * test subroutines used by TestAddRollExtensive()
79 **/
80 static void checkDate(UCalendar* c, int32_t y, int32_t m, int32_t d);
81
82 static void checkDateTime(UCalendar* c, int32_t y, int32_t m, int32_t d,
83 int32_t hr, int32_t min, int32_t sec, int32_t ms,
84 UCalendarDateFields field);
85
86 /**
87 * test subroutines used by TestGetSetDateAPI and TestFieldGetSet
88 **/
89 static void verify1(const char* msg, UCalendar* c, UDateFormat* dat, int32_t year, int32_t month, int32_t day);
90
91 static void verify2(const char* msg, UCalendar* c, UDateFormat* dat, int32_t year, int32_t month, int32_t day,
92 int32_t hour, int32_t min, int32_t sec, int32_t am_pm);
93
94#endif /* #if !UCONFIG_NO_FORMATTING */
95
96#endif