File: tzrulets.h

package info (click to toggle)
icu 78.2-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 123,988 kB
  • sloc: cpp: 527,891; ansic: 112,789; sh: 4,983; makefile: 4,657; perl: 3,199; python: 2,933; xml: 749; sed: 36; lisp: 12
file content (56 lines) | stat: -rw-r--r-- 1,976 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2007-2011, International Business Machines Corporation and    *
* others. All Rights Reserved.                                                *
*******************************************************************************
*/

#ifndef _TIMEZONERULETEST_
#define _TIMEZONERULETEST_

#include "unicode/utypes.h"
#include "caltztst.h"

#if !UCONFIG_NO_FORMATTING

/**
 * Tests for TimeZoneRule, RuleBasedTimeZone and VTimeZone
 */
class TimeZoneRuleTest : public CalendarTimeZoneTest {
    // IntlTest override
    void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par) override;
public:
    void TestSimpleRuleBasedTimeZone();
    void TestHistoricalRuleBasedTimeZone();
    void TestOlsonTransition();
    void TestRBTZTransition();
    void TestHasEquivalentTransitions();
    void TestVTimeZoneRoundTrip();
    void TestVTimeZoneRoundTripPartial();
    void TestVTimeZoneSimpleWrite();
    void TestVTimeZoneHeaderProps();
    void TestGetSimpleRules();
    void TestTimeZoneRuleCoverage();
    void TestSimpleTimeZoneCoverage();
    void TestVTimeZoneCoverage();
    void TestVTimeZoneParse();
    void TestT6216();
    void TestT6669();
    void TestVTimeZoneWrapper();
    void TestT8943();

private:
    void verifyTransitions(BasicTimeZone& icutz, UDate start, UDate end);
    void compareTransitionsAscending(BasicTimeZone& z1, BasicTimeZone& z2,
        UDate start, UDate end, UBool inclusive);
    void compareTransitionsDescending(BasicTimeZone& z1, BasicTimeZone& z2,
        UDate start, UDate end, UBool inclusive);
    UDate getUTCMillis(int32_t year, int32_t month, int32_t dom,
        int32_t hour=0, int32_t min=0, int32_t sec=0, int32_t msec=0);
};

#endif /* #if !UCONFIG_NO_FORMATTING */
 
#endif // _TIMEZONERULETEST_