Skip to content

Commit 56c0eee

Browse files
Merge pull request #1441 from ErikSchierboom/space-age-limit-input-number-size
space-age: restrict seconds to fit within 32-bit int range
2 parents 1d1a29e + 28b3dac commit 56c0eee

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

exercises/space-age/canonical-data.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"exercise": "space-age",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"cases": [
55
{
66
"description": "age on Earth",
@@ -34,9 +34,9 @@
3434
"property": "age",
3535
"input": {
3636
"planet": "Mars",
37-
"seconds": 2329871239
37+
"seconds": 2129871239
3838
},
39-
"expected": 39.25
39+
"expected": 35.88
4040
},
4141
{
4242
"description": "age on Jupiter",
@@ -52,27 +52,27 @@
5252
"property": "age",
5353
"input": {
5454
"planet": "Saturn",
55-
"seconds": 3000000000
55+
"seconds": 2000000000
5656
},
57-
"expected": 3.23
57+
"expected": 2.15
5858
},
5959
{
6060
"description": "age on Uranus",
6161
"property": "age",
6262
"input": {
6363
"planet": "Uranus",
64-
"seconds": 3210123456
64+
"seconds": 1210123456
6565
},
66-
"expected": 1.21
66+
"expected": 0.46
6767
},
6868
{
6969
"description": "age on Neptune",
7070
"property": "age",
7171
"input": {
7272
"planet": "Neptune",
73-
"seconds": 8210123456
73+
"seconds": 1821023456
7474
},
75-
"expected": 1.58
75+
"expected": 0.35
7676
}
7777
]
7878
}

0 commit comments

Comments
 (0)