summaryrefslogtreecommitdiff
path: root/tests/tests.rs
diff options
context:
space:
mode:
authordfhoughton <dfhoughton@gmail.com>2019-02-17 17:12:09 -0500
committerdfhoughton <dfhoughton@gmail.com>2019-02-17 17:12:09 -0500
commite3df19074be7c5f4a175b415291434048eb811e1 (patch)
treeb217b4370f3dc79b1bce47d64f098b80204cbf70 /tests/tests.rs
parent06c54e9a128441a078b41a6d66076c8db63be0e0 (diff)
downloadtwo-timer-e3df19074be7c5f4a175b415291434048eb811e1.zip
making test a bit more thorough
Diffstat (limited to 'tests/tests.rs')
-rw-r--r--tests/tests.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index 9f7f1ca..902cce3 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -1479,4 +1479,26 @@ fn no_space_before_pm() {
assert!(false, "didn't match");
}
}
+ let d2 = d1 + Duration::minutes(1);
+ match parse("1969-05-06 at 1:00PM", None) {
+ Ok((start, end, _)) => {
+ assert_eq!(d1, start);
+ assert_eq!(d2, end);
+ }
+ Err(e) => {
+ println!("{:?}", e);
+ assert!(false, "didn't match");
+ }
+ }
+ let d2 = d1 + Duration::seconds(1);
+ match parse("1969-05-06 at 1:00:00PM", None) {
+ Ok((start, end, _)) => {
+ assert_eq!(d1, start);
+ assert_eq!(d2, end);
+ }
+ Err(e) => {
+ println!("{:?}", e);
+ assert!(false, "didn't match");
+ }
+ }
} \ No newline at end of file