]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/intltest/tztest.h
ICU-8.11.4.tar.gz
[apple/icu.git] / icuSources / test / intltest / tztest.h
CommitLineData
b75a7d8f
A
1
2/********************************************************************
3 * COPYRIGHT:
73c04bcf 4 * Copyright (c) 1997-2005, International Business Machines Corporation and
b75a7d8f
A
5 * others. All Rights Reserved.
6 ********************************************************************/
7
8#ifndef __TimeZoneTest__
9#define __TimeZoneTest__
10
11#include "unicode/utypes.h"
12
13#if !UCONFIG_NO_FORMATTING
14
15#include "unicode/simpletz.h"
16#include "caltztst.h"
17
18/**
19 * Various tests for TimeZone
20 **/
21class TimeZoneTest: public CalendarTimeZoneTest {
22 // IntlTest override
23 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
24public: // package
25 static const int32_t millisPerHour;
26
27public:
28 /**
29 * Test the offset of the PRT timezone.
30 */
31 virtual void TestPRTOffset(void);
32 /**
33 * Regress a specific bug with a sequence of API calls.
34 */
35 virtual void TestVariousAPI518(void);
36 /**
37 * Test the call which retrieves the available IDs.
38 */
39 virtual void TestGetAvailableIDs913(void);
40
41 /**
42 * Generic API testing for API coverage.
43 */
44 virtual void TestGenericAPI(void);
45 /**
46 * Test the setStartRule/setEndRule API calls.
47 */
48 virtual void TestRuleAPI(void);
374ca955
A
49
50 void findTransition(const TimeZone& tz,
51 UDate min, UDate max);
b75a7d8f 52
374ca955 53 /**
b75a7d8f
A
54 * subtest used by TestRuleAPI
55 **/
374ca955
A
56 void testUsingBinarySearch(const TimeZone& tz,
57 UDate min, UDate max,
58 UDate expectedBoundary);
b75a7d8f
A
59
60
61 /**
62 * Test short zone IDs for compliance
63 */
64 virtual void TestShortZoneIDs(void);
65
66
67 /**
68 * Test parsing custom zones
69 */
70 virtual void TestCustomParse(void);
71
72 /**
73 * Test new getDisplayName() API
74 */
75 virtual void TestDisplayName(void);
76
77 void TestDSTSavings(void);
78 void TestAlternateRules(void);
79
80 void TestCountries(void);
81
374ca955
A
82 void TestHistorical(void);
83
84 void TestEquivalentIDs(void);
85
73c04bcf
A
86 void TestAliasedNames(void);
87
88 void TestFractionalDST(void);
89
b75a7d8f
A
90 static const UDate INTERVAL;
91
92private:
93 // internal functions
94 static UnicodeString& formatMinutes(int32_t min, UnicodeString& rv);
95};
96
97#endif /* #if !UCONFIG_NO_FORMATTING */
98
99#endif // __TimeZoneTest__