diff options
author | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-15 20:46:09 +0200 |
---|---|---|
committer | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-15 20:46:09 +0200 |
commit | 3575783180b9faa54e6973f2dadaa4a8bd5a66eb (patch) | |
tree | 7f4f489cd3e5f76165a977cd789fab7ced47a908 /src/monthinfo.rs | |
parent | 37cc6eac78444d4abdb4988a8f6eeca3beacf7bd (diff) | |
download | rust_rrule-3575783180b9faa54e6973f2dadaa4a8bd5a66eb.zip |
easier building of options
Diffstat (limited to 'src/monthinfo.rs')
-rw-r--r-- | src/monthinfo.rs | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/src/monthinfo.rs b/src/monthinfo.rs index 3b82ee5..4b70c17 100644 --- a/src/monthinfo.rs +++ b/src/monthinfo.rs @@ -1,4 +1,5 @@ use crate::masks::Masks; +use crate::options::*; use crate::yearinfo::*; use chrono::prelude::*; use chrono::{DateTime, Duration}; @@ -72,35 +73,3 @@ pub fn rebuild_month( result } - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn it_works() { - let options = ParsedOptions { - freq: Frequenzy::YEARLY, - interval: 1, - count: Some(10), - until: None, - tzid: None, - dtstart: Utc.ymd(2020, 1, 1).and_hms(0, 0, 0), - wkst: 0, - bysetpos: vec![], - bymonth: vec![], - bymonthday: vec![], - bynmonthday: vec![], - byyearday: vec![], - byweekno: vec![1], - byweekday: vec![], - byhour: vec![], - byminute: vec![], - bysecond: vec![], - bynweekday: vec![], - }; - let res = rebuild_month(2020, 1, 366, &vec![], &vec![], &options); - println!("Res: {:?}", res); - assert_eq!(2 + 2, 4); - } -} |