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