]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/tztest.h
2 /********************************************************************
4 * Copyright (c) 1997-2003, International Business Machines Corporation and
5 * others. All Rights Reserved.
6 ********************************************************************/
8 #ifndef __TimeZoneTest__
9 #define __TimeZoneTest__
11 #include "unicode/utypes.h"
13 #if !UCONFIG_NO_FORMATTING
15 #include "unicode/simpletz.h"
19 * Various tests for TimeZone
21 class TimeZoneTest
: public CalendarTimeZoneTest
{
23 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
);
25 static const int32_t millisPerHour
;
29 * Test the offset of the PRT timezone.
31 virtual void TestPRTOffset(void);
33 * Regress a specific bug with a sequence of API calls.
35 virtual void TestVariousAPI518(void);
37 * Test the call which retrieves the available IDs.
39 virtual void TestGetAvailableIDs913(void);
42 * Generic API testing for API coverage.
44 virtual void TestGenericAPI(void);
46 * Test the setStartRule/setEndRule API calls.
48 virtual void TestRuleAPI(void);
50 void findTransition(const TimeZone
& tz
,
51 UDate min
, UDate max
);
54 * subtest used by TestRuleAPI
56 void testUsingBinarySearch(const TimeZone
& tz
,
58 UDate expectedBoundary
);
62 * Test short zone IDs for compliance
64 virtual void TestShortZoneIDs(void);
68 * Test parsing custom zones
70 virtual void TestCustomParse(void);
73 * Test new getDisplayName() API
75 virtual void TestDisplayName(void);
77 void TestDSTSavings(void);
78 void TestAlternateRules(void);
80 void TestCountries(void);
82 void TestHistorical(void);
84 void TestEquivalentIDs(void);
86 static const UDate INTERVAL
;
90 static UnicodeString
& formatMinutes(int32_t min
, UnicodeString
& rv
);
93 #endif /* #if !UCONFIG_NO_FORMATTING */
95 #endif // __TimeZoneTest__