summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFredrik Meringdal <fmeringdal@hotmail.com>2020-10-24 15:06:32 +0200
committerFredrik Meringdal <fmeringdal@hotmail.com>2020-10-24 15:06:32 +0200
commit3545c981ac92e277574b29ef4de03aa2f2cc62c3 (patch)
tree8802c5f17dd77d3e8fb815874f7964af38f54248 /tests
parenta4c2f576ad0462b3bc8989512a608557c9287723 (diff)
downloadrust_rrule-3545c981ac92e277574b29ef4de03aa2f2cc62c3.zip
removed unused code
Diffstat (limited to 'tests')
-rw-r--r--tests/rrule.rs70
1 files changed, 63 insertions, 7 deletions
diff --git a/tests/rrule.rs b/tests/rrule.rs
index 65aed6c..6365abc 100644
--- a/tests/rrule.rs
+++ b/tests/rrule.rs
@@ -40,7 +40,27 @@ mod test {
#[test]
fn yearly() {
- let options = ParsedOptions::new(Frequenzy::YEARLY, &ymd_hms(1997, 9, 2, 9, 0, 0)).count(3);
+ let options = ParsedOptions {
+ freq: Frequenzy::YEARLY,
+ count: Some(3),
+ bymonth: vec![9],
+ dtstart: ymd_hms(1997, 9, 2, 9, 0, 0),
+ byweekday: vec![],
+ byhour: vec![9],
+ bysetpos: vec![],
+ byweekno: vec![],
+ byminute: vec![0],
+ bysecond: vec![0],
+ byyearday: vec![],
+ bymonthday: vec![2],
+ bynweekday: vec![],
+ bynmonthday: vec![],
+ until: None,
+ wkst: 0,
+ tzid: None,
+ interval: 1,
+ byeaster: None,
+ };
test_recurring(
options,
&vec![
@@ -53,9 +73,27 @@ mod test {
#[test]
fn yearly_interval() {
- let options = ParsedOptions::new(Frequenzy::YEARLY, &ymd_hms(1997, 9, 2, 9, 0, 0))
- .count(3)
- .interval(2);
+ let options = ParsedOptions {
+ freq: Frequenzy::YEARLY,
+ count: Some(3),
+ bymonth: vec![9],
+ dtstart: ymd_hms(1997, 9, 2, 9, 0, 0),
+ byweekday: vec![],
+ byhour: vec![9],
+ bysetpos: vec![],
+ byweekno: vec![],
+ byminute: vec![0],
+ bysecond: vec![0],
+ byyearday: vec![],
+ bymonthday: vec![2],
+ bynweekday: vec![],
+ bynmonthday: vec![],
+ until: None,
+ wkst: 0,
+ tzid: None,
+ interval: 2,
+ byeaster: None,
+ };
test_recurring(
options,
&vec![
@@ -68,9 +106,27 @@ mod test {
#[test]
fn yearly_interval_large() {
- let options = ParsedOptions::new(Frequenzy::YEARLY, &ymd_hms(1997, 9, 2, 9, 0, 0))
- .count(3)
- .interval(40);
+ let options = ParsedOptions {
+ freq: Frequenzy::YEARLY,
+ count: Some(3),
+ bymonth: vec![9],
+ dtstart: ymd_hms(1997, 9, 2, 9, 0, 0),
+ byweekday: vec![],
+ byhour: vec![9],
+ bysetpos: vec![],
+ byweekno: vec![],
+ byminute: vec![0],
+ bysecond: vec![0],
+ byyearday: vec![],
+ bymonthday: vec![2],
+ bynweekday: vec![],
+ bynmonthday: vec![],
+ until: None,
+ wkst: 0,
+ tzid: None,
+ interval: 40,
+ byeaster: None,
+ };
test_recurring(
options,
&vec![