Skip to content

Commit

Permalink
clock: Add a test case for some edge case (exercism#952)
Browse files Browse the repository at this point in the history
Edge case: Negative minutes that make the hours negative
  • Loading branch information
danieljl authored Jun 9, 2020
1 parent ee5f3ff commit 610b01d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions exercises/clock/tests/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ fn test_negative_hour_and_minutes_both_roll_over_continuously() {
assert_eq!(Clock::new(-121, -5810).to_string(), "22:10");
}

#[test]
#[ignore]
fn test_zero_hour_and_negative_minutes() {
assert_eq!(Clock::new(0, -22).to_string(), "23:38");
}

//
// Clock Math
//
Expand Down

0 comments on commit 610b01d

Please sign in to comment.