Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Commit

Permalink
Add test with days between
Browse files Browse the repository at this point in the history
  • Loading branch information
samueldple committed Oct 18, 2019
1 parent 38ef6b5 commit 3c968e7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/date_time_tuple_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,14 @@ fn test_between_max_cant_overflow() {
)
.to_seconds();
}

#[test]
fn test_days_between() {
assert_eq!(
Duration::new(25, 0, 0),
Duration::between(
DateTimeTuple::new(DateTuple::new(0, 1, 1).unwrap(), TimeTuple::new(0, 0, 0)),
DateTimeTuple::new(DateTuple::new(0, 1, 2).unwrap(), TimeTuple::new(1, 0, 0),),
)
);
}

0 comments on commit 3c968e7

Please sign in to comment.