1999-08-16 21:50:52 +00:00
|
|
|
|
2000-03-10 00:42:27 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2001-03-21 20:09:56 +00:00
|
|
|
* Copyright (c) 1997-2001, International Business Machines Corporation and
|
2000-03-10 00:42:27 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
#ifndef __TimeZoneTest__
|
|
|
|
#define __TimeZoneTest__
|
2001-10-08 23:26:58 +00:00
|
|
|
|
2002-09-21 00:43:14 +00:00
|
|
|
#include "unicode/utypes.h"
|
|
|
|
|
|
|
|
#if !UCONFIG_NO_FORMATTING
|
|
|
|
|
2001-10-08 23:26:58 +00:00
|
|
|
#include "unicode/simpletz.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "caltztst.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Various tests for TimeZone
|
|
|
|
**/
|
|
|
|
class TimeZoneTest: public CalendarTimeZoneTest {
|
|
|
|
// IntlTest override
|
2000-08-14 21:42:36 +00:00
|
|
|
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
|
1999-08-16 21:50:52 +00:00
|
|
|
public: // package
|
|
|
|
static const int32_t millisPerHour;
|
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Test the offset of the PRT timezone.
|
|
|
|
*/
|
|
|
|
virtual void TestPRTOffset(void);
|
|
|
|
/**
|
|
|
|
* Regress a specific bug with a sequence of API calls.
|
|
|
|
*/
|
|
|
|
virtual void TestVariousAPI518(void);
|
|
|
|
/**
|
|
|
|
* Test the call which retrieves the available IDs.
|
|
|
|
*/
|
|
|
|
virtual void TestGetAvailableIDs913(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Generic API testing for API coverage.
|
|
|
|
*/
|
|
|
|
virtual void TestGenericAPI(void);
|
|
|
|
/**
|
|
|
|
* Test the setStartRule/setEndRule API calls.
|
|
|
|
*/
|
|
|
|
virtual void TestRuleAPI(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* subtest used by TestRuleAPI
|
|
|
|
**/
|
|
|
|
void testUsingBinarySearch(SimpleTimeZone* tz, UDate min, UDate max, UDate expectedBoundary);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test short zone IDs for compliance
|
|
|
|
*/
|
|
|
|
virtual void TestShortZoneIDs(void);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test parsing custom zones
|
|
|
|
*/
|
|
|
|
virtual void TestCustomParse(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test new getDisplayName() API
|
|
|
|
*/
|
|
|
|
virtual void TestDisplayName(void);
|
|
|
|
|
|
|
|
void TestDSTSavings(void);
|
|
|
|
void TestAlternateRules(void);
|
|
|
|
|
2001-02-02 19:26:56 +00:00
|
|
|
void TestCountries(void);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
static const UDate INTERVAL;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// internal functions
|
|
|
|
static UnicodeString& formatMinutes(int32_t min, UnicodeString& rv);
|
|
|
|
};
|
2002-09-21 00:43:14 +00:00
|
|
|
|
|
|
|
#endif /* #if !UCONFIG_NO_FORMATTING */
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
#endif // __TimeZoneTest__
|