|
1 | 1 | {
|
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", |
22 | 27 | "input": "2011-04-25",
|
23 | 28 | "expected": "2043-01-01T01:46:40"
|
24 |
| - }, |
25 |
| - { |
| 29 | + }, |
| 30 | + { |
| 31 | + "description": "second test for date only specification of time", |
| 32 | + "property": "integer", |
26 | 33 | "input": "1977-06-13",
|
27 | 34 | "expected": "2009-02-19T01:46:40"
|
28 |
| - }, |
29 |
| - { |
| 35 | + }, |
| 36 | + { |
| 37 | + "description": "third test for date only specification of time", |
| 38 | + "property": "integer", |
30 | 39 | "input": "1959-07-19",
|
31 | 40 | "expected": "1991-03-27T01:46:40"
|
32 |
| - }, |
33 |
| - { |
34 |
| - "#": "full time specified", |
| 41 | + }, |
| 42 | + { |
| 43 | + "description": "full time specified", |
| 44 | + "property": "integer", |
35 | 45 | "input": "2015-01-24T22:00:00",
|
36 | 46 | "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", |
40 | 51 | "input": "2015-01-24T23:59:59",
|
41 | 52 | "expected": "2046-10-03T01:46:39"
|
42 |
| - } |
43 |
| - ] |
44 |
| - } |
| 53 | + } |
| 54 | + ] |
| 55 | + } |
| 56 | + } |
| 57 | + ] |
45 | 58 | }
|
0 commit comments