Skip to content

Commit a9bd2c2

Browse files
committed
Add test case for exactly negative sixty minutes.
I encountered a solution that passed all provided test cases but would have failed this test.
1 parent 5ab242e commit a9bd2c2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

exercises/clock/canonical-data.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"exercise": "clock",
3-
"version": "2.3.0",
3+
"version": "2.4.0",
44
"comments": [
55
"Most languages require constructing a clock with initial values,",
66
"adding or subtracting some number of minutes, and testing equality",
@@ -164,6 +164,15 @@
164164
},
165165
"expected": "16:40"
166166
},
167+
{
168+
"description": "negative sixty minutes is previous hour",
169+
"property": "create",
170+
"input": {
171+
"hour": 2,
172+
"minute": -60
173+
},
174+
"expected": "01:00"
175+
},
167176
{
168177
"description": "negative hour and minutes both roll over",
169178
"property": "create",

0 commit comments

Comments
 (0)