Skip to content

Commit 610b01d

Browse files
authored
clock: Add a test case for some edge case (#952)
Edge case: Negative minutes that make the hours negative
1 parent ee5f3ff commit 610b01d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

exercises/clock/tests/clock.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ fn test_negative_hour_and_minutes_both_roll_over_continuously() {
123123
assert_eq!(Clock::new(-121, -5810).to_string(), "22:10");
124124
}
125125

126+
#[test]
127+
#[ignore]
128+
fn test_zero_hour_and_negative_minutes() {
129+
assert_eq!(Clock::new(0, -22).to_string(), "23:38");
130+
}
131+
126132
//
127133
// Clock Math
128134
//

0 commit comments

Comments
 (0)