| 1 | use craterust-analyzer cargo rrule 0.14.0 crate/::testsrust-analyzer cargo rrule 0.14.0 tests/::commonrust-analyzer cargo rrule 0.14.0 tests/common/::{check_occurrencesrust-analyzer cargo rrule 0.14.0 tests/common/check_occurrences()., test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set()., ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().}; |
| 2 | use craterust-analyzer cargo rrule 0.14.0 crate/::{Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#, NWeekdayrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#, RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule#, RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#, Weekdayrust-analyzer cargo chrono 0.4.40 weekday/Weekday#}; |
| 3 | |
| 4 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 5 | #[cfg(feature = "exrule")] |
| 6 | fn rrule_and_exrulerust-analyzer cargo rrule 0.14.0 tests/rruleset/rrule_and_exrule().() { |
| 7 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0); |
| 8 | |
| 9 | let rrule1 = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 10 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 11 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(6), |
| 12 | by_weekdayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_weekday.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![NWeekdayrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#::Everyrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#Every#(Weekdayrust-analyzer cargo chrono 0.4.40 weekday/Weekday#::Tuerust-analyzer cargo chrono 0.4.40 weekday/Weekday#Tue#), NWeekdayrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#::Everyrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#Every#(Weekdayrust-analyzer cargo chrono 0.4.40 weekday/Weekday#::Thurust-analyzer cargo chrono 0.4.40 weekday/Weekday#Thu#)], |
| 13 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 14 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 15 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 16 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 17 | }; |
| 18 | let rrule = rrule1.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 19 | |
| 20 | let rrule2 = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 21 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 22 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(3), |
| 23 | by_weekdayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_weekday.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![NWeekdayrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#::Everyrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#Every#(Weekdayrust-analyzer cargo chrono 0.4.40 weekday/Weekday#::Thurust-analyzer cargo chrono 0.4.40 weekday/Weekday#Thu#)], |
| 24 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 25 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 26 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 27 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 28 | }; |
| 29 | let exrule = rrule2.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 30 | |
| 31 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule).exrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]exrule().(exrule); |
| 32 | |
| 33 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 34 | set, |
| 35 | &[ |
| 36 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0), |
| 37 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 9, 9, 0, 0), |
| 38 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 16, 9, 0, 0), |
| 39 | ], |
| 40 | ); |
| 41 | } |
| 42 | |
| 43 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 44 | #[cfg(feature = "exrule")] |
| 45 | fn setdate_and_exdaterust-analyzer cargo rrule 0.14.0 tests/rruleset/setdate_and_exdate().() { |
| 46 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1970, 1, 1, 0, 0, 0)) |
| 47 | .set_rdatesrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]set_rdates().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![ |
| 48 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0), |
| 49 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 4, 9, 0, 0), |
| 50 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 9, 9, 0, 0), |
| 51 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 11, 9, 0, 0), |
| 52 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 16, 9, 0, 0), |
| 53 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 18, 9, 0, 0), |
| 54 | ]) |
| 55 | .set_exdatesrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]set_exdates().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![ |
| 56 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 4, 9, 0, 0), |
| 57 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 11, 9, 0, 0), |
| 58 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 18, 9, 0, 0), |
| 59 | ]); |
| 60 | |
| 61 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 62 | set, |
| 63 | &[ |
| 64 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0), |
| 65 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 9, 9, 0, 0), |
| 66 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 16, 9, 0, 0), |
| 67 | ], |
| 68 | ); |
| 69 | } |
| 70 | |
| 71 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 72 | #[cfg(feature = "exrule")] |
| 73 | fn setdate_and_exrulerust-analyzer cargo rrule 0.14.0 tests/rruleset/setdate_and_exrule().() { |
| 74 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0); |
| 75 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 76 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 77 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(3), |
| 78 | by_weekdayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_weekday.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![NWeekdayrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#::Everyrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#Every#(Weekdayrust-analyzer cargo chrono 0.4.40 weekday/Weekday#::Thurust-analyzer cargo chrono 0.4.40 weekday/Weekday#Thu#)], |
| 79 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 80 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 81 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 82 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 83 | }; |
| 84 | let exrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 85 | |
| 86 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start) |
| 87 | .set_rdatesrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]set_rdates().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![ |
| 88 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0), |
| 89 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 4, 9, 0, 0), |
| 90 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 9, 9, 0, 0), |
| 91 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 11, 9, 0, 0), |
| 92 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 16, 9, 0, 0), |
| 93 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 18, 9, 0, 0), |
| 94 | ]) |
| 95 | .exrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]exrule().(exrule); |
| 96 | |
| 97 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 98 | set, |
| 99 | &[ |
| 100 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0), |
| 101 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 9, 9, 0, 0), |
| 102 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 16, 9, 0, 0), |
| 103 | ], |
| 104 | ); |
| 105 | } |
| 106 | |
| 107 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 108 | fn rrule_and_exdate_1rust-analyzer cargo rrule 0.14.0 tests/rruleset/rrule_and_exdate_1().() { |
| 109 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0); |
| 110 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 111 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 112 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(6), |
| 113 | by_weekdayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_weekday.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![NWeekdayrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#::Everyrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#Every#(Weekdayrust-analyzer cargo chrono 0.4.40 weekday/Weekday#::Tuerust-analyzer cargo chrono 0.4.40 weekday/Weekday#Tue#), NWeekdayrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#::Everyrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#Every#(Weekdayrust-analyzer cargo chrono 0.4.40 weekday/Weekday#::Thurust-analyzer cargo chrono 0.4.40 weekday/Weekday#Thu#)], |
| 114 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 115 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 116 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 117 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 118 | }; |
| 119 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 120 | |
| 121 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule).set_exdatesrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]set_exdates().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![ |
| 122 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0), |
| 123 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 4, 9, 0, 0), |
| 124 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 9, 9, 0, 0), |
| 125 | ]); |
| 126 | |
| 127 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 128 | set, |
| 129 | &[ |
| 130 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 11, 9, 0, 0), |
| 131 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 16, 9, 0, 0), |
| 132 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 18, 9, 0, 0), |
| 133 | ], |
| 134 | ); |
| 135 | } |
| 136 | |
| 137 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 138 | fn rrule_and_exdate_2rust-analyzer cargo rrule 0.14.0 tests/rruleset/rrule_and_exdate_2().() { |
| 139 | let dates = "DTSTART;TZID=Europe/Paris:20201214T093000\n\ |
| 140 | RRULE:FREQ=WEEKLY;UNTIL=20210308T083000Z;INTERVAL=2;BYDAY=MO;WKST=MO\n\ |
| 141 | EXDATE;TZID=Europe/Paris:20201228T093000,20210125T093000,20210208T093000" |
| 142 | .parserust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]parse().::<RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#>() |
| 143 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 144 | .allrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]all().(u16::MAXrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]MAX.) |
| 145 | .datesrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleResult#dates.; |
| 146 | // This results in the following set (minus exdate) |
| 147 | // [ |
| 148 | // 2020-12-14T09:30:00CET, |
| 149 | // 2020-12-28T09:30:00CET, // Removed because of exdate |
| 150 | // 2021-01-11T09:30:00CET, |
| 151 | // 2021-01-25T09:30:00CET, // Removed because of exdate |
| 152 | // 2021-02-08T09:30:00CET, // Removed because of exdate |
| 153 | // 2021-02-22T09:30:00CET, |
| 154 | // 2021-03-08T09:30:00CET, // same as `UNTIL` but different timezones |
| 155 | // ] |
| 156 | check_occurrencesrust-analyzer cargo rrule 0.14.0 tests/common/check_occurrences().( |
| 157 | &dates, |
| 158 | &[ |
| 159 | "2020-12-14T09:30:00+01:00", |
| 160 | "2021-01-11T09:30:00+01:00", |
| 161 | "2021-02-22T09:30:00+01:00", |
| 162 | "2021-03-08T09:30:00+01:00", |
| 163 | ], |
| 164 | ); |
| 165 | } |
| 166 | |
| 167 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 168 | #[cfg(feature = "exrule")] |
| 169 | fn rrule_and_exyearly_yearly_bigrust-analyzer cargo rrule 0.14.0 tests/rruleset/rrule_and_exyearly_yearly_big().() { |
| 170 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0); |
| 171 | |
| 172 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 173 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 174 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(13), |
| 175 | by_monthrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 176 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 177 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 178 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 179 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![2], |
| 180 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 181 | }; |
| 182 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 183 | |
| 184 | let exrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 185 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 186 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(10), |
| 187 | by_monthrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 188 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 189 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 190 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 191 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![2], |
| 192 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 193 | }; |
| 194 | let exrule = exrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 195 | |
| 196 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule).exrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]exrule().(exrule); |
| 197 | |
| 198 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 199 | set, |
| 200 | &[ |
| 201 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(2007, 9, 2, 9, 0, 0), |
| 202 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(2008, 9, 2, 9, 0, 0), |
| 203 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(2009, 9, 2, 9, 0, 0), |
| 204 | ], |
| 205 | ); |
| 206 | } |
| 207 | |
| 208 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 209 | #[cfg(feature = "exrule")] |
| 210 | fn beforerust-analyzer cargo rrule 0.14.0 tests/rruleset/before().() { |
| 211 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0); |
| 212 | |
| 213 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 214 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 215 | by_monthrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 216 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 217 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 218 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 219 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![2], |
| 220 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 221 | }; |
| 222 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 223 | |
| 224 | let exrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 225 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 226 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(10), |
| 227 | by_monthrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 228 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 229 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 230 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 231 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![2], |
| 232 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 233 | }; |
| 234 | let exrule = exrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 235 | |
| 236 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start) |
| 237 | .rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule) |
| 238 | .exrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]exrule().(exrule) |
| 239 | .beforerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]before().(ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(2015, 9, 2, 9, 0, 0)); |
| 240 | |
| 241 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 242 | set.all_uncheckedrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]all_unchecked().().lastrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]last().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().clonerust-analyzer cargo chrono 0.4.40 datetime/impl#[`DateTime<Tz>`][Clone]clone().(), |
| 243 | ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(2015, 9, 2, 9, 0, 0), |
| 244 | ); |
| 245 | } |
| 246 | |
| 247 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 248 | #[cfg(feature = "exrule")] |
| 249 | fn afterrust-analyzer cargo rrule 0.14.0 tests/rruleset/after().() { |
| 250 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0); |
| 251 | |
| 252 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 253 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 254 | by_monthrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 255 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 256 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 257 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 258 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![2], |
| 259 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 260 | }; |
| 261 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 262 | |
| 263 | let exrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 264 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 265 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(10), |
| 266 | by_monthrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 267 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 268 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 269 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 270 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![2], |
| 271 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 272 | }; |
| 273 | let exrule = exrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 274 | |
| 275 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start) |
| 276 | .rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule) |
| 277 | .exrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]exrule().(exrule) |
| 278 | .afterrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]after().(ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(2000, 9, 2, 9, 0, 0)); |
| 279 | |
| 280 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(set.allrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]all().(1).datesrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleResult#dates.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().0]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()., ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(2007, 9, 2, 9, 0, 0),); |
| 281 | } |
| 282 | |
| 283 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 284 | #[cfg(feature = "exrule")] |
| 285 | fn betweenrust-analyzer cargo rrule 0.14.0 tests/rruleset/between().() { |
| 286 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1997, 9, 2, 9, 0, 0); |
| 287 | |
| 288 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 289 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 290 | by_monthrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 291 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 292 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 293 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 294 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![2], |
| 295 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 296 | }; |
| 297 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 298 | |
| 299 | let exrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 300 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 301 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(10), |
| 302 | by_monthrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 303 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 304 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 305 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 306 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![2], |
| 307 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 308 | }; |
| 309 | let exrule = exrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 310 | |
| 311 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start) |
| 312 | .rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule) |
| 313 | .exrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]exrule().(exrule) |
| 314 | .afterrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]after().(ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(2000, 9, 2, 9, 0, 0)) |
| 315 | .beforerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]before().(ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(2010, 9, 2, 9, 0, 0)); |
| 316 | |
| 317 | check_occurrencesrust-analyzer cargo rrule 0.14.0 tests/common/check_occurrences().( |
| 318 | &set.allrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]all().(u16::MAXrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]MAX.).datesrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleResult#dates., |
| 319 | &[ |
| 320 | "2007-09-02T09:00:00-00:00", |
| 321 | "2008-09-02T09:00:00-00:00", |
| 322 | "2009-09-02T09:00:00-00:00", |
| 323 | "2010-09-02T09:00:00-00:00", |
| 324 | ], |
| 325 | ); |
| 326 | } |
| 327 | |
| 328 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 329 | fn before_70srust-analyzer cargo rrule 0.14.0 tests/rruleset/before_70s().() { |
| 330 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 331 | |
| 332 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 333 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 334 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 335 | by_monthrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1], |
| 336 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 337 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 338 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 339 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1], |
| 340 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 341 | }; |
| 342 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 343 | |
| 344 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 345 | |
| 346 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 347 | set, |
| 348 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1961, 1, 1, 9, 0, 0)], |
| 349 | ); |
| 350 | } |
| 351 | |
| 352 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 353 | fn secondly_with_interval_1rust-analyzer cargo rrule 0.14.0 tests/rruleset/secondly_with_interval_1().() { |
| 354 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 355 | |
| 356 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 357 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Secondlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Secondly#, |
| 358 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 359 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 360 | }; |
| 361 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 362 | |
| 363 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 364 | |
| 365 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 366 | set, |
| 367 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 1)], |
| 368 | ); |
| 369 | } |
| 370 | |
| 371 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 372 | fn secondly_with_interval_2rust-analyzer cargo rrule 0.14.0 tests/rruleset/secondly_with_interval_2().() { |
| 373 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 374 | |
| 375 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 376 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Secondlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Secondly#, |
| 377 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 378 | intervalrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#interval.: 2, |
| 379 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 380 | }; |
| 381 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 382 | |
| 383 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 384 | |
| 385 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 386 | set, |
| 387 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 2)], |
| 388 | ); |
| 389 | } |
| 390 | |
| 391 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 392 | fn minutely_with_interval_1rust-analyzer cargo rrule 0.14.0 tests/rruleset/minutely_with_interval_1().() { |
| 393 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 394 | |
| 395 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 396 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Minutelyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Minutely#, |
| 397 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 398 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 399 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 400 | }; |
| 401 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 402 | |
| 403 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 404 | |
| 405 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 406 | set, |
| 407 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 1, 0)], |
| 408 | ); |
| 409 | } |
| 410 | |
| 411 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 412 | fn minutely_with_interval_2rust-analyzer cargo rrule 0.14.0 tests/rruleset/minutely_with_interval_2().() { |
| 413 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 414 | |
| 415 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 416 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Minutelyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Minutely#, |
| 417 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 418 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 419 | intervalrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#interval.: 2, |
| 420 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 421 | }; |
| 422 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 423 | |
| 424 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 425 | |
| 426 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 427 | set, |
| 428 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 2, 0)], |
| 429 | ); |
| 430 | } |
| 431 | |
| 432 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 433 | fn hourly_with_interval_1rust-analyzer cargo rrule 0.14.0 tests/rruleset/hourly_with_interval_1().() { |
| 434 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 435 | |
| 436 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 437 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Hourlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Hourly#, |
| 438 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 439 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 440 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 441 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 442 | }; |
| 443 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 444 | |
| 445 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 446 | |
| 447 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 448 | set, |
| 449 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 10, 0, 0)], |
| 450 | ); |
| 451 | } |
| 452 | |
| 453 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 454 | fn hourly_with_interval_2rust-analyzer cargo rrule 0.14.0 tests/rruleset/hourly_with_interval_2().() { |
| 455 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 456 | |
| 457 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 458 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Hourlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Hourly#, |
| 459 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 460 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 461 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 462 | intervalrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#interval.: 2, |
| 463 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 464 | }; |
| 465 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 466 | |
| 467 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 468 | |
| 469 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 470 | set, |
| 471 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 11, 0, 0)], |
| 472 | ); |
| 473 | } |
| 474 | |
| 475 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 476 | fn daily_with_interval_1rust-analyzer cargo rrule 0.14.0 tests/rruleset/daily_with_interval_1().() { |
| 477 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 478 | |
| 479 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 480 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Dailyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Daily#, |
| 481 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 482 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 483 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 484 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 485 | }; |
| 486 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 487 | |
| 488 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 489 | |
| 490 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 491 | set, |
| 492 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 2, 9, 0, 0)], |
| 493 | ); |
| 494 | } |
| 495 | |
| 496 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 497 | fn daily_with_interval_2rust-analyzer cargo rrule 0.14.0 tests/rruleset/daily_with_interval_2().() { |
| 498 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 499 | |
| 500 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 501 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Dailyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Daily#, |
| 502 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 503 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 504 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 505 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 506 | intervalrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#interval.: 2, |
| 507 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 508 | }; |
| 509 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 510 | |
| 511 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 512 | |
| 513 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 514 | set, |
| 515 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 3, 9, 0, 0)], |
| 516 | ); |
| 517 | } |
| 518 | |
| 519 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 520 | fn weekly_with_interval_1rust-analyzer cargo rrule 0.14.0 tests/rruleset/weekly_with_interval_1().() { |
| 521 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 4, 9, 0, 0); |
| 522 | |
| 523 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 524 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Weeklyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Weekly#, |
| 525 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 526 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 527 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 528 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 529 | by_weekdayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_weekday.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![NWeekdayrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#::Everyrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#Every#(Weekdayrust-analyzer cargo chrono 0.4.40 weekday/Weekday#::Monrust-analyzer cargo chrono 0.4.40 weekday/Weekday#Mon#)], |
| 530 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 531 | }; |
| 532 | // 4th is Monday |
| 533 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 534 | |
| 535 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 536 | |
| 537 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 538 | set, |
| 539 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 4, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 11, 9, 0, 0)], |
| 540 | ); |
| 541 | } |
| 542 | |
| 543 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 544 | fn weekly_with_interval_2rust-analyzer cargo rrule 0.14.0 tests/rruleset/weekly_with_interval_2().() { |
| 545 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 4, 9, 0, 0); |
| 546 | |
| 547 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 548 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Weeklyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Weekly#, |
| 549 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 550 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 551 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 552 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 553 | by_weekdayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_weekday.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![NWeekdayrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#::Everyrust-analyzer cargo rrule 0.14.0 core/rrule/NWeekday#Every#(Weekdayrust-analyzer cargo chrono 0.4.40 weekday/Weekday#::Monrust-analyzer cargo chrono 0.4.40 weekday/Weekday#Mon#)], |
| 554 | intervalrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#interval.: 2, |
| 555 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 556 | }; |
| 557 | // 4th is Monday |
| 558 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 559 | |
| 560 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 561 | |
| 562 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 563 | set, |
| 564 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 4, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 18, 9, 0, 0)], |
| 565 | ); |
| 566 | } |
| 567 | |
| 568 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 569 | fn monthly_with_interval_1rust-analyzer cargo rrule 0.14.0 tests/rruleset/monthly_with_interval_1().() { |
| 570 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 571 | |
| 572 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 573 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Monthlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Monthly#, |
| 574 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 575 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 576 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 577 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 578 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1], |
| 579 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 580 | }; |
| 581 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 582 | |
| 583 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 584 | |
| 585 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 586 | set, |
| 587 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 2, 1, 9, 0, 0)], |
| 588 | ); |
| 589 | } |
| 590 | |
| 591 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 592 | fn monthly_with_interval_2rust-analyzer cargo rrule 0.14.0 tests/rruleset/monthly_with_interval_2().() { |
| 593 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 594 | |
| 595 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 596 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Monthlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Monthly#, |
| 597 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 598 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 599 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 600 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 601 | intervalrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#interval.: 2, |
| 602 | by_month_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_month_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1], |
| 603 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 604 | }; |
| 605 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 606 | |
| 607 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 608 | |
| 609 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 610 | set, |
| 611 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 3, 1, 9, 0, 0)], |
| 612 | ); |
| 613 | } |
| 614 | |
| 615 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 616 | fn yearly_with_interval_1rust-analyzer cargo rrule 0.14.0 tests/rruleset/yearly_with_interval_1().() { |
| 617 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 618 | |
| 619 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 620 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 621 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 622 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 623 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 624 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 625 | by_year_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_year_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1], |
| 626 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 627 | }; |
| 628 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 629 | |
| 630 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 631 | |
| 632 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 633 | set, |
| 634 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1961, 1, 1, 9, 0, 0)], |
| 635 | ); |
| 636 | } |
| 637 | |
| 638 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 639 | fn yearly_with_interval_2rust-analyzer cargo rrule 0.14.0 tests/rruleset/yearly_with_interval_2().() { |
| 640 | let dt_start = ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0); |
| 641 | |
| 642 | let rrule = RRulerust-analyzer cargo rrule 0.14.0 core/rrule/RRule# { |
| 643 | freqrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#freq.: Frequencyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#::Yearlyrust-analyzer cargo rrule 0.14.0 core/rrule/Frequency#Yearly#, |
| 644 | countrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#count.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2), |
| 645 | by_hourrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_hour.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![9], |
| 646 | by_minuterust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_minute.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 647 | by_secondrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_second.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0], |
| 648 | by_year_dayrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#by_year_day.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1], |
| 649 | intervalrust-analyzer cargo rrule 0.14.0 core/rrule/RRule#interval.: 2, |
| 650 | ..Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`][Default]default().() |
| 651 | }; |
| 652 | let rrule = rrule.validaterust-analyzer cargo rrule 0.14.0 core/rrule/impl#[`RRule<Unvalidated>`]validate().(dt_start).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 653 | |
| 654 | let set = RRuleSetrust-analyzer cargo rrule 0.14.0 core/rruleset/RRuleSet#::newrust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]new().(dt_start).rrulerust-analyzer cargo rrule 0.14.0 core/rruleset/impl#[RRuleSet]rrule().(rrule); |
| 655 | |
| 656 | test_recurring_rrule_setrust-analyzer cargo rrule 0.14.0 tests/common/test_recurring_rrule_set().( |
| 657 | set, |
| 658 | &[ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1960, 1, 1, 9, 0, 0), ymd_hmsrust-analyzer cargo rrule 0.14.0 tests/common/ymd_hms().(1962, 1, 1, 9, 0, 0)], |
| 659 | ); |
| 660 | } |