1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 /* 4 ******************************************************************************* 5 * Copyright (C) 2007-2011, International Business Machines Corporation and * 6 * others. All Rights Reserved. * 7 ******************************************************************************* 8 */ 9 10 #ifndef _TIMEZONERULETEST_ 11 #define _TIMEZONERULETEST_ 12 13 #include "unicode/utypes.h" 14 #include "caltztst.h" 15 16 #if !UCONFIG_NO_FORMATTING 17 18 /** 19 * Tests for TimeZoneRule, RuleBasedTimeZone and VTimeZone 20 */ 21 class TimeZoneRuleTest : public CalendarTimeZoneTest { 22 // IntlTest override 23 void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par) override; 24 public: 25 void TestSimpleRuleBasedTimeZone(); 26 void TestHistoricalRuleBasedTimeZone(); 27 void TestOlsonTransition(); 28 void TestRBTZTransition(); 29 void TestHasEquivalentTransitions(); 30 void TestVTimeZoneRoundTrip(); 31 void TestVTimeZoneRoundTripPartial(); 32 void TestVTimeZoneSimpleWrite(); 33 void TestVTimeZoneHeaderProps(); 34 void TestGetSimpleRules(); 35 void TestTimeZoneRuleCoverage(); 36 void TestSimpleTimeZoneCoverage(); 37 void TestVTimeZoneCoverage(); 38 void TestVTimeZoneParse(); 39 void TestT6216(); 40 void TestT6669(); 41 void TestVTimeZoneWrapper(); 42 void TestT8943(); 43 44 private: 45 void verifyTransitions(BasicTimeZone& icutz, UDate start, UDate end); 46 void compareTransitionsAscending(BasicTimeZone& z1, BasicTimeZone& z2, 47 UDate start, UDate end, UBool inclusive); 48 void compareTransitionsDescending(BasicTimeZone& z1, BasicTimeZone& z2, 49 UDate start, UDate end, UBool inclusive); 50 UDate getUTCMillis(int32_t year, int32_t month, int32_t dom, 51 int32_t hour=0, int32_t min=0, int32_t sec=0, int32_t msec=0); 52 }; 53 54 #endif /* #if !UCONFIG_NO_FORMATTING */ 55 56 #endif // _TIMEZONERULETEST_ 57