Home | History | Annotate | Download | only in intltest

Lines Matching refs:rbtz

14 #include "unicode/rbtz.h"
149 * Compare SimpleTimeZone with equivalent RBTZ
193 errln("FAIL: couldn't complete RBTZ 1.");
214 errln("FAIL: couldn't complete RBTZ 2");
235 errln("FAIL: couldn't complete RBTZ 3");
426 * Test equivalency between OlsonTimeZone and custom RBTZ representing the
433 // Compare to America/New_York with equivalent RBTZ
436 //RBTZ
438 RuleBasedTimeZone *rbtz = new RuleBasedTimeZone("EST5EDT", ir);
447 rbtz->addTransitionRule(tzr, status);
455 rbtz->addTransitionRule(tzr, status);
464 rbtz->addTransitionRule(tzr, status);
472 rbtz->addTransitionRule(tzr, status);
480 rbtz->addTransitionRule(tzr, status);
488 rbtz->addTransitionRule(tzr, status);
496 rbtz->addTransitionRule(tzr, status);
504 rbtz->addTransitionRule(tzr, status);
509 rbtz->complete(status);
511 errln("FAIL: couldn't complete RBTZ.");
519 if (!ny->hasEquivalentTransitions(*rbtz, jan1_1967, jan1_2010, TRUE, status)) {
520 dataerrln("FAIL: The RBTZ must be equivalent to America/New_York between 1967 and 2010");
523 errln("FAIL: error returned from hasEquivalentTransitions for ny/rbtz 1967-2010");
525 if (ny->hasEquivalentTransitions(*rbtz, jan1_1950, jan1_2010, TRUE, status)) {
526 errln("FAIL: The RBTZ must not be equivalent to America/New_York between 1950 and 2010");
529 errln("FAIL: error returned from hasEquivalentTransitions for ny/rbtz 1950-2010");
532 // Same with above, but calling RBTZ#hasEquivalentTransitions against OlsonTimeZone
533 if (!rbtz->hasEquivalentTransitions(*ny, jan1_1967, jan1_2010, TRUE, status)) {
534 dataerrln("FAIL: The RBTZ must be equivalent to America/New_York between 1967 and 2010 ");
537 errln("FAIL: error returned from hasEquivalentTransitions for rbtz/ny 1967-2010");
539 if (rbtz->hasEquivalentTransitions(*ny, jan1_1950, jan1_2010, TRUE, status)) {
540 errln("FAIL: The RBTZ must not be equivalent to America/New_York between 1950 and 2010");
543 errln("FAIL: error returned from hasEquivalentTransitions for rbtz/ny 1950-2010");
547 if (ny->hasSameRules(*rbtz) || rbtz->hasSameRules(*ny)) {
550 RuleBasedTimeZone *rbtzc = (RuleBasedTimeZone*)rbtz->clone();
551 if (!rbtz->hasSameRules(*rbtzc) || !rbtz->hasEquivalentTransitions(*rbtzc, jan1_1950, jan1_2010, TRUE, status)) {
555 errln("FAIL: error returned from hasEquivalentTransitions for rbtz/rbtzc 1950-2010");
572 rbtz->getOffset(times[i], FALSE, offset1, dst1, status);
574 errln("FAIL: rbtz->getOffset failed");
581 dataerrln("FAIL: Incompatible time zone offset/dstSavings for ny and rbtz");
585 if (rbtz->inDaylightTime(times[i], status) != ny->inDaylightTime(times[i], status)) {
586 dataerrln("FAIL: Incompatible daylight saving time for ny and rbtz");
594 delete rbtz;
634 * Check if an OlsonTimeZone and its equivalent RBTZ have the exact same
667 RuleBasedTimeZone *rbtz = new RuleBasedTimeZone(*tzid, initial->clone());
672 rbtz->addTransitionRule(trsrules[i]->clone(), status);
674 errln((UnicodeString)"FAIL: failed to add a transition rule at index " + i + " to the RBTZ for " + *tzid);
677 rbtz->complete(status);
679 errln((UnicodeString)"FAIL: complete() failed for the RBTZ for " + *tzid);
685 // Compare the original OlsonTimeZone with the RBTZ starting the startTime for 20 years
688 compareTransitionsAscending(*tz, *rbtz, start, until, FALSE);
690 compareTransitionsAscending(*tz, *rbtz, start + 1, until, TRUE);
692 compareTransitionsDescending(*tz, *rbtz, start, until, FALSE);
694 compareTransitionsDescending(*tz, *rbtz, start + 1, until, TRUE);
697 delete rbtz;
1166 // Create an RBTZ from the rules and compare the offsets at the date
1167 RuleBasedTimeZone *rbtz = new RuleBasedTimeZone(*tzid, initial);
1169 rbtz->addTransitionRule(std, status);
1173 rbtz->addTransitionRule(dst, status);
1178 rbtz->complete(status);
1180 errln("FAIL: couldn't complete rbtz for " + *tzid);
1188 rbtz->getOffset(testTimes[i], FALSE, raw1, dst1, status);
1190 errln("FAIL: couldn't get offsets from rbtz for " + *tzid);
1193 errln("FAIL: rbtz created by simple rule does not match the original tz for tzid " + *tzid);
1195 delete rbtz;
2630 RuleBasedTimeZone *rbtz = new RuleBasedTimeZone(id, initialRule);
2634 rbtz->addTransitionRule(atzRule, status);
2638 rbtz->addTransitionRule(atzRule, status);
2642 rbtz->addTransitionRule(atzRule, status);
2646 rbtz->addTransitionRule(atzRule, status);
2647 rbtz->complete(status);
2653 rbtz->getOffset(1293822000000.0 /* 2010-12-31 19:00:00 UTC */, FALSE, raw, dst, status);
2661 delete rbtz;