From 614a9b593af3a164d123b999cfc1243e88a4ab50 Mon Sep 17 00:00:00 2001 From: kotp Date: Fri, 10 Mar 2017 04:17:06 -0500 Subject: [PATCH] Gigasecond: Schema Compliance --- exercises/gigasecond/canonical-data.json | 79 ++++++++++++++---------- 1 file changed, 46 insertions(+), 33 deletions(-) diff --git a/exercises/gigasecond/canonical-data.json b/exercises/gigasecond/canonical-data.json index 40653d507a..50adb159ca 100644 --- a/exercises/gigasecond/canonical-data.json +++ b/exercises/gigasecond/canonical-data.json @@ -1,45 +1,58 @@ { - "#": [ - "The basic test is to add one gigasecond to a few ordinary dates.", - "Most test programs currently check only the date and ignore the time.", - "For languages with a native date-time type though, expected times", - "here show the correct seconds, ignoring leap seconds.", - "The date and time formats here are per", - "http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15.", - "", - "Finally, as a demonstration but not really a test,", - "some languages demonstrate the add function by inviting the", - "solver to include their birthdate in either the solution code", - "or test program. The test program then shows or tests their", - "gigasecond anniversay." - ], - "add": { - "description": [ - "Add one gigasecond to the input." - ], - "cases": [ - { + "exercise": "gigasecond", + "version": "1.0.0", + "comments": [ + "The basic test is to add one gigasecond to a few ordinary dates.", + "Most test programs currently check only the date and ignore the time.", + "For languages with a native date-time type though, expected times", + "here show the correct seconds, ignoring leap seconds.", + "The date and time formats here are per", + "http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15.", + "", + "Finally, as a demonstration but not really a test,", + "some languages demonstrate the add function by inviting the", + "solver to include their birthdate in either the solution code", + "or test program. The test program then shows or tests their", + "gigasecond anniversary." + ], + "cases": [ + { + "add": + { + "comments": "Add one gigasecond to the input.", + "cases": [ + { + "description": "date only specification of time", + "property": "integer", "input": "2011-04-25", "expected": "2043-01-01T01:46:40" - }, - { + }, + { + "description": "second test for date only specification of time", + "property": "integer", "input": "1977-06-13", "expected": "2009-02-19T01:46:40" - }, - { + }, + { + "description": "third test for date only specification of time", + "property": "integer", "input": "1959-07-19", "expected": "1991-03-27T01:46:40" - }, - { - "#": "full time specified", + }, + { + "description": "full time specified", + "property": "integer", "input": "2015-01-24T22:00:00", "expected": "2046-10-02T23:46:40" - }, - { - "#": "full time with day roll-over", + }, + { + "description": "full time with day roll-over", + "property": "integer", "input": "2015-01-24T23:59:59", "expected": "2046-10-03T01:46:39" - } - ] - } + } + ] + } + } + ] }