From 98da8bdc6f403f03ee8edfbf707db9bb4979c5f2 Mon Sep 17 00:00:00 2001 From: rbasso Date: Wed, 8 Mar 2017 14:34:10 +0900 Subject: [PATCH 1/2] secret-handshake: Make canonical-data.json compliant --- .../secret-handshake/canonical-data.json | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/exercises/secret-handshake/canonical-data.json b/exercises/secret-handshake/canonical-data.json index 7cd03be42b..96356537c5 100644 --- a/exercises/secret-handshake/canonical-data.json +++ b/exercises/secret-handshake/canonical-data.json @@ -1,67 +1,83 @@ { - "commands": { - "description": ["Create a handshake for a number"], + "exercise": "secret-handshake", + "version": "1.0.0", + "cases": [ + { + "description": "Create a handshake for a number", "cases": [ { "description": "wink for 1", + "property": "commands", "input": 1, "expected": ["wink"] }, { "description": "double blink for 10", + "property": "commands", "input": 2, "expected": ["double blink"] }, { "description": "close your eyes for 100", + "property": "commands", "input": 4, "expected": ["close your eyes"] }, { "description": "jump for 1000", + "property": "commands", "input": 8, "expected": ["jump"] }, { "description": "combine two actions", + "property": "commands", "input": 3, "expected": ["wink", "double blink"] }, { "description": "reverse two actions", + "property": "commands", "input": 19, "expected": ["double blink", "wink"] }, { "description": "reversing one action gives the same action", + "property": "commands", "input": 24, "expected": ["jump"] }, { "description": "reversing no actions still gives no actions", + "property": "commands", "input": 16, "expected": [] }, { "description": "all possible actions", + "property": "commands", "input": 15, "expected": ["wink", "double blink", "close your eyes", "jump"] }, { "description": "reverse all possible actions", + "property": "commands", "input": 31, "expected": ["jump", "close your eyes", "double blink", "wink"] }, { "description": "do nothing for zero", + "property": "commands", "input": 0, "expected": [] }, { "description": "do nothing if lower 5 bits not set", + "property": "commands", "input": 32, "expected": [] } ] } + ] } From 48b1e7a80f2938163ad132191993feb9479b6dfc Mon Sep 17 00:00:00 2001 From: rbasso Date: Wed, 8 Mar 2017 14:37:02 +0900 Subject: [PATCH 2/2] secret-handshake: Fix canonical-data.json formatting --- .../secret-handshake/canonical-data.json | 150 +++++++++--------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/exercises/secret-handshake/canonical-data.json b/exercises/secret-handshake/canonical-data.json index 96356537c5..1b4ef56677 100644 --- a/exercises/secret-handshake/canonical-data.json +++ b/exercises/secret-handshake/canonical-data.json @@ -3,81 +3,81 @@ "version": "1.0.0", "cases": [ { - "description": "Create a handshake for a number", - "cases": [ - { - "description": "wink for 1", - "property": "commands", - "input": 1, - "expected": ["wink"] - }, - { - "description": "double blink for 10", - "property": "commands", - "input": 2, - "expected": ["double blink"] - }, - { - "description": "close your eyes for 100", - "property": "commands", - "input": 4, - "expected": ["close your eyes"] - }, - { - "description": "jump for 1000", - "property": "commands", - "input": 8, - "expected": ["jump"] - }, - { - "description": "combine two actions", - "property": "commands", - "input": 3, - "expected": ["wink", "double blink"] - }, - { - "description": "reverse two actions", - "property": "commands", - "input": 19, - "expected": ["double blink", "wink"] - }, - { - "description": "reversing one action gives the same action", - "property": "commands", - "input": 24, - "expected": ["jump"] - }, - { - "description": "reversing no actions still gives no actions", - "property": "commands", - "input": 16, - "expected": [] - }, - { - "description": "all possible actions", - "property": "commands", - "input": 15, - "expected": ["wink", "double blink", "close your eyes", "jump"] - }, - { - "description": "reverse all possible actions", - "property": "commands", - "input": 31, - "expected": ["jump", "close your eyes", "double blink", "wink"] - }, - { - "description": "do nothing for zero", - "property": "commands", - "input": 0, - "expected": [] - }, - { - "description": "do nothing if lower 5 bits not set", - "property": "commands", - "input": 32, - "expected": [] - } - ] + "description": "Create a handshake for a number", + "cases": [ + { + "description": "wink for 1", + "property": "commands", + "input": 1, + "expected": ["wink"] + }, + { + "description": "double blink for 10", + "property": "commands", + "input": 2, + "expected": ["double blink"] + }, + { + "description": "close your eyes for 100", + "property": "commands", + "input": 4, + "expected": ["close your eyes"] + }, + { + "description": "jump for 1000", + "property": "commands", + "input": 8, + "expected": ["jump"] + }, + { + "description": "combine two actions", + "property": "commands", + "input": 3, + "expected": ["wink", "double blink"] + }, + { + "description": "reverse two actions", + "property": "commands", + "input": 19, + "expected": ["double blink", "wink"] + }, + { + "description": "reversing one action gives the same action", + "property": "commands", + "input": 24, + "expected": ["jump"] + }, + { + "description": "reversing no actions still gives no actions", + "property": "commands", + "input": 16, + "expected": [] + }, + { + "description": "all possible actions", + "property": "commands", + "input": 15, + "expected": ["wink", "double blink", "close your eyes", "jump"] + }, + { + "description": "reverse all possible actions", + "property": "commands", + "input": 31, + "expected": ["jump", "close your eyes", "double blink", "wink"] + }, + { + "description": "do nothing for zero", + "property": "commands", + "input": 0, + "expected": [] + }, + { + "description": "do nothing if lower 5 bits not set", + "property": "commands", + "input": 32, + "expected": [] + } + ] } ] }