diff options
author | dfhoughton <dfhoughton@gmail.com> | 2019-02-17 17:12:09 -0500 |
---|---|---|
committer | dfhoughton <dfhoughton@gmail.com> | 2019-02-17 17:12:09 -0500 |
commit | e3df19074be7c5f4a175b415291434048eb811e1 (patch) | |
tree | b217b4370f3dc79b1bce47d64f098b80204cbf70 /tests | |
parent | 06c54e9a128441a078b41a6d66076c8db63be0e0 (diff) | |
download | two-timer-e3df19074be7c5f4a175b415291434048eb811e1.zip |
making test a bit more thorough
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.rs | 22 |
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 |