Skip to content

Commit ad22547

Browse files
authored
Merge pull request #679 from exercism/gigasecond_make-exercise-schema-compliant
Gigasecond: Schema Compliance
2 parents 067ef4e + 614a9b5 commit ad22547

File tree

1 file changed

+46
-33
lines changed

1 file changed

+46
-33
lines changed
Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,58 @@
11
{
2-
"#": [
3-
"The basic test is to add one gigasecond to a few ordinary dates.",
4-
"Most test programs currently check only the date and ignore the time.",
5-
"For languages with a native date-time type though, expected times",
6-
"here show the correct seconds, ignoring leap seconds.",
7-
"The date and time formats here are per",
8-
"http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15.",
9-
"",
10-
"Finally, as a demonstration but not really a test,",
11-
"some languages demonstrate the add function by inviting the",
12-
"solver to include their birthdate in either the solution code",
13-
"or test program. The test program then shows or tests their",
14-
"gigasecond anniversay."
15-
],
16-
"add": {
17-
"description": [
18-
"Add one gigasecond to the input."
19-
],
20-
"cases": [
21-
{
2+
"exercise": "gigasecond",
3+
"version": "1.0.0",
4+
"comments": [
5+
"The basic test is to add one gigasecond to a few ordinary dates.",
6+
"Most test programs currently check only the date and ignore the time.",
7+
"For languages with a native date-time type though, expected times",
8+
"here show the correct seconds, ignoring leap seconds.",
9+
"The date and time formats here are per",
10+
"http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15.",
11+
"",
12+
"Finally, as a demonstration but not really a test,",
13+
"some languages demonstrate the add function by inviting the",
14+
"solver to include their birthdate in either the solution code",
15+
"or test program. The test program then shows or tests their",
16+
"gigasecond anniversary."
17+
],
18+
"cases": [
19+
{
20+
"add":
21+
{
22+
"comments": "Add one gigasecond to the input.",
23+
"cases": [
24+
{
25+
"description": "date only specification of time",
26+
"property": "integer",
2227
"input": "2011-04-25",
2328
"expected": "2043-01-01T01:46:40"
24-
},
25-
{
29+
},
30+
{
31+
"description": "second test for date only specification of time",
32+
"property": "integer",
2633
"input": "1977-06-13",
2734
"expected": "2009-02-19T01:46:40"
28-
},
29-
{
35+
},
36+
{
37+
"description": "third test for date only specification of time",
38+
"property": "integer",
3039
"input": "1959-07-19",
3140
"expected": "1991-03-27T01:46:40"
32-
},
33-
{
34-
"#": "full time specified",
41+
},
42+
{
43+
"description": "full time specified",
44+
"property": "integer",
3545
"input": "2015-01-24T22:00:00",
3646
"expected": "2046-10-02T23:46:40"
37-
},
38-
{
39-
"#": "full time with day roll-over",
47+
},
48+
{
49+
"description": "full time with day roll-over",
50+
"property": "integer",
4051
"input": "2015-01-24T23:59:59",
4152
"expected": "2046-10-03T01:46:39"
42-
}
43-
]
44-
}
53+
}
54+
]
55+
}
56+
}
57+
]
4558
}

0 commit comments

Comments
 (0)