summaryrefslogtreecommitdiff
path: root/src/monthinfo.rs
diff options
context:
space:
mode:
authorFredrik Meringdal <fmeringdal@hotmail.com>2020-10-15 20:46:09 +0200
committerFredrik Meringdal <fmeringdal@hotmail.com>2020-10-15 20:46:09 +0200
commit3575783180b9faa54e6973f2dadaa4a8bd5a66eb (patch)
tree7f4f489cd3e5f76165a977cd789fab7ced47a908 /src/monthinfo.rs
parent37cc6eac78444d4abdb4988a8f6eeca3beacf7bd (diff)
downloadrust_rrule-3575783180b9faa54e6973f2dadaa4a8bd5a66eb.zip
easier building of options
Diffstat (limited to 'src/monthinfo.rs')
-rw-r--r--src/monthinfo.rs33
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);
- }
-}