From 8ba72cfdacddc5efd1d92fb5656231eee9d92497 Mon Sep 17 00:00:00 2001 From: rbasso Date: Tue, 7 Mar 2017 23:48:53 +0900 Subject: [PATCH 1/2] etl: Make canonical-data.json compliant --- exercises/etl/canonical-data.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/exercises/etl/canonical-data.json b/exercises/etl/canonical-data.json index a57e043128..30f637f662 100644 --- a/exercises/etl/canonical-data.json +++ b/exercises/etl/canonical-data.json @@ -1,6 +1,9 @@ { - "transform": { - "#": [ + "exercise": "etl", + "version": "1.0.0", + "cases": [ + { + "comments": [ "Note: The expected input data for these tests should have", "integer keys (not stringified numbers as shown in the JSON below", "Unless the language prohibits that, please implement these tests", @@ -11,6 +14,7 @@ "cases": [ { "description": "a single letter", + "property": "transform", "input": { "1": ["A"] }, @@ -20,6 +24,7 @@ }, { "description": "single score with multiple letters", + "property": "transform", "input": { "1": ["A", "E", "I", "O", "U" ] }, @@ -33,6 +38,7 @@ }, { "description": "multiple scores with multiple letters", + "property": "transform", "input": { "1": ["A", "E"], "2": ["D", "G"] @@ -46,6 +52,7 @@ }, { "description": "multiple scores with differing numbers of letters", + "property": "transform", "input": { "1": [ "A", "E", "I", "O", "U", "L", "N", "R", "S", "T" ], "2": [ "D", "G" ], @@ -66,4 +73,5 @@ } ] } + ] } From ca9ed5805734d7371a69cd3d3ac44550f33922e7 Mon Sep 17 00:00:00 2001 From: rbasso Date: Tue, 7 Mar 2017 23:57:29 +0900 Subject: [PATCH 2/2] etl: Fix canonical-data.json formatting --- exercises/etl/canonical-data.json | 126 +++++++++++++++--------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/exercises/etl/canonical-data.json b/exercises/etl/canonical-data.json index 30f637f662..ceef40e354 100644 --- a/exercises/etl/canonical-data.json +++ b/exercises/etl/canonical-data.json @@ -2,76 +2,76 @@ "exercise": "etl", "version": "1.0.0", "cases": [ - { - "comments": [ - "Note: The expected input data for these tests should have", + { + "comments": [ + "Note: The expected input data for these tests should have", "integer keys (not stringified numbers as shown in the JSON below", "Unless the language prohibits that, please implement these tests", "such that keys are integers. e.g. in JavaScript, it might look ", "like `transform( { 1: ['A'] } );`" - ], - "description": "transforms the a set of scrabble data previously indexed by the tile score to a set of data indexed by the tile letter", - "cases": [ - { - "description": "a single letter", - "property": "transform", - "input": { - "1": ["A"] + ], + "description": "transforms the a set of scrabble data previously indexed by the tile score to a set of data indexed by the tile letter", + "cases": [ + { + "description": "a single letter", + "property": "transform", + "input": { + "1": ["A"] + }, + "expected": { + "a": 1 + } }, - "expected": { - "a" : 1 - } - }, - { - "description": "single score with multiple letters", - "property": "transform", - "input": { - "1": ["A", "E", "I", "O", "U" ] - }, - "expected": { - "a" : 1, - "e" : 1, - "i" : 1, - "o" : 1, - "u" : 1 - } - }, - { - "description": "multiple scores with multiple letters", - "property": "transform", - "input": { - "1": ["A", "E"], - "2": ["D", "G"] + { + "description": "single score with multiple letters", + "property": "transform", + "input": { + "1": ["A", "E", "I", "O", "U"] + }, + "expected": { + "a": 1, + "e": 1, + "i": 1, + "o": 1, + "u": 1 + } }, - "expected": { - "a" : 1, - "d" : 2, - "e" : 1, - "g" : 2 - } - }, - { - "description": "multiple scores with differing numbers of letters", - "property": "transform", - "input": { - "1": [ "A", "E", "I", "O", "U", "L", "N", "R", "S", "T" ], - "2": [ "D", "G" ], - "3": [ "B", "C", "M", "P" ], - "4": [ "F", "H", "V", "W", "Y" ], - "5": [ "K" ], - "8": [ "J", "X" ], - "10": [ "Q", "Z" ] + { + "description": "multiple scores with multiple letters", + "property": "transform", + "input": { + "1": ["A", "E"], + "2": ["D", "G"] + }, + "expected": { + "a": 1, + "d": 2, + "e": 1, + "g": 2 + } }, - "expected": { - "a": 1, "b": 3, "c": 3, "d": 2, "e": 1, - "f": 4, "g": 2, "h": 4, "i": 1, "j": 8, - "k": 5, "l": 1, "m": 3, "n": 1, "o": 1, - "p": 3, "q": 10, "r": 1, "s": 1, "t": 1, - "u": 1, "v": 4, "w": 4, "x": 8, "y": 4, - "z": 10 + { + "description": "multiple scores with differing numbers of letters", + "property": "transform", + "input": { + "1": ["A", "E", "I", "O", "U", "L", "N", "R", "S", "T"], + "2": ["D", "G"], + "3": ["B", "C", "M", "P"], + "4": ["F", "H", "V", "W", "Y"], + "5": ["K"], + "8": ["J", "X"], + "10": ["Q", "Z"] + }, + "expected": { + "a": 1, "b": 3, "c": 3, "d": 2, "e": 1, + "f": 4, "g": 2, "h": 4, "i": 1, "j": 8, + "k": 5, "l": 1, "m": 3, "n": 1, "o": 1, + "p": 3, "q": 10, "r": 1, "s": 1, "t": 1, + "u": 1, "v": 4, "w": 4, "x": 8, "y": 4, + "z": 10 + } } - } - ] - } + ] + } ] }