From ea538f66abb219f0055489ea16401dab21c4191e Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Wed, 5 Jun 2019 21:38:01 +0800 Subject: [PATCH 1/4] Robot simulator descriptions too long Convert long descriptions into comments per... per https://github.com/exercism/problem-specifications/issues/1473 --- exercises/robot-simulator/canonical-data.json | 71 +++++++++++++------ 1 file changed, 48 insertions(+), 23 deletions(-) diff --git a/exercises/robot-simulator/canonical-data.json b/exercises/robot-simulator/canonical-data.json index 2740f764a8..e38ea501cd 100644 --- a/exercises/robot-simulator/canonical-data.json +++ b/exercises/robot-simulator/canonical-data.json @@ -10,10 +10,12 @@ ], "cases": [ { - "description": "A robot is created with a position and a direction", + "description": "Create", + "comments": [ "A robot is created with a position and a direction" ], "cases": [ { - "description": "Robots are created with a position and direction", + "description": "at origin facing north", + "comments": [ "Robots are created with a position and direction" ], "property": "create", "input": { "position": { @@ -31,7 +33,8 @@ } }, { - "description": "Negative positions are allowed", + "description": "at negative position facing South", + "comments": [ "Negative positions allowed" ], "property": "create", "input": { "position": { @@ -51,10 +54,12 @@ ] }, { - "description": "rotates the robot's direction 90 degrees clockwise", + "description": "Rotate clockwise", + "comments": [ "rotates the robot's direction 90 degrees clockwise" ], "cases": [ { - "description": "changes the direction from north to east", + "description": "north to east", + "comments": [ "changes the direction from north to east" ], "property": "move", "input": { "position": { @@ -73,7 +78,8 @@ } }, { - "description": "changes the direction from east to south", + "description": "east to south", + "comments": [ "changes the direction from east to south" ], "property": "move", "input": { "position": { @@ -92,7 +98,8 @@ } }, { - "description": "changes the direction from south to west", + "description": "south to west", + "comments": [ "changes the direction from south to west" ], "property": "move", "input": { "position": { @@ -111,7 +118,8 @@ } }, { - "description": "changes the direction from west to north", + "description": "west to north", + "comments": [ "changes the direction from west to north" ], "property": "move", "input": { "position": { @@ -132,10 +140,12 @@ ] }, { - "description": "rotates the robot's direction 90 degrees counter-clockwise", + "description": "Rotates counter-clockwise", + "comments": [ "rotates the robot's direction 90 degrees counter-clockwise" ], "cases": [ { - "description": "changes the direction from north to west", + "description": "north to west", + "comments": [ "changes the direction from north to west" ], "property": "move", "input": { "position": { @@ -154,7 +164,8 @@ } }, { - "description": "changes the direction from west to south", + "description": "west to south", + "comments": [ "changes the direction from west to south" ], "property": "move", "input": { "position": { @@ -173,7 +184,8 @@ } }, { - "description": "changes the direction from south to east", + "description": "south to east", + "comments": [ "changes the direction from south to east" ], "property": "move", "input": { "position": { @@ -192,7 +204,8 @@ } }, { - "description": "changes the direction from east to north", + "description": "east to north", + "comments": [ "changes the direction from east to north" ], "property": "move", "input": { "position": { @@ -213,10 +226,12 @@ ] }, { - "description": "moves the robot forward 1 space in the direction it is pointing", + "description": "Forward One", + "comments": [ "moves the robot forward 1 space in the direction it is pointing" ], "cases": [ { - "description": "increases the y coordinate one when facing north", + "description": "facing north", + "comments": [ "increases the y coordinate one when facing north" ], "property": "move", "input": { "position": { @@ -235,7 +250,8 @@ } }, { - "description": "decreases the y coordinate by one when facing south", + "description": "facing south", + "comments": [ "decreases the y coordinate by one when facing south" ], "property": "move", "input": { "position": { @@ -254,7 +270,8 @@ } }, { - "description": "increases the x coordinate by one when facing east", + "description": "facing east", + "comments": [ "increases the x coordinate by one when facing east" ], "property": "move", "input": { "position": { @@ -273,7 +290,8 @@ } }, { - "description": "decreases the x coordinate by one when facing west", + "description": "facing west", + "comments": [ "decreases the x coordinate by one when facing west" ], "property": "move", "input": { "position": { @@ -294,10 +312,14 @@ ] }, { - "description": "Where R = Turn Right, L = Turn Left and A = Advance, the robot can follow a series of instructions and end up with the correct position and direction", + "description": "Series of instructions", + "comments": [ "The robot can follow a series of instructions and end up with the correct position and direction.", + "Where R = Turn Right, L = Turn Left and A = Advance" + ] "cases": [ { - "description": "instructions to move east and north from README", + "description": "moving east and north", + "comments": [ "instructions to move east and north from README" ], "property": "move", "input": { "position": { @@ -316,7 +338,8 @@ } }, { - "description": "instructions to move west and north", + "description": "moving west and north", + "comments": [ "instructions to move west and north" ], "property": "move", "input": { "position": { @@ -335,7 +358,8 @@ } }, { - "description": "instructions to move west and south", + "description": "moving west and south", + "comments": [ "instructions to move west and south" ], "property": "move", "input": { "position": { @@ -354,7 +378,8 @@ } }, { - "description": "instructions to move east and north", + "description": "moving east and north", + "comments": [ "instructions to move east and north" ], "property": "move", "input": { "position": { From 12a2ccc06b1df2d102978641407b23f5afd2dd5b Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Wed, 5 Jun 2019 23:02:04 +0800 Subject: [PATCH 2/4] fix missing comma, thx @SleeplessByte --- exercises/robot-simulator/canonical-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/robot-simulator/canonical-data.json b/exercises/robot-simulator/canonical-data.json index e38ea501cd..be8f57e8ea 100644 --- a/exercises/robot-simulator/canonical-data.json +++ b/exercises/robot-simulator/canonical-data.json @@ -315,7 +315,7 @@ "description": "Series of instructions", "comments": [ "The robot can follow a series of instructions and end up with the correct position and direction.", "Where R = Turn Right, L = Turn Left and A = Advance" - ] + ], "cases": [ { "description": "moving east and north", From 99706b8bc961361182a53a367943f792768fcc44 Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Wed, 5 Jun 2019 23:36:44 +0800 Subject: [PATCH 3/4] update per suggestions from SleeplessByte --- exercises/robot-simulator/canonical-data.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/robot-simulator/canonical-data.json b/exercises/robot-simulator/canonical-data.json index be8f57e8ea..6520bc3a93 100644 --- a/exercises/robot-simulator/canonical-data.json +++ b/exercises/robot-simulator/canonical-data.json @@ -10,11 +10,11 @@ ], "cases": [ { - "description": "Create", + "description": "Creation", "comments": [ "A robot is created with a position and a direction" ], "cases": [ { - "description": "at origin facing north", + "description": "At origin", "comments": [ "Robots are created with a position and direction" ], "property": "create", "input": { @@ -33,7 +33,7 @@ } }, { - "description": "at negative position facing South", + "description": "Allows negative positions", "comments": [ "Negative positions allowed" ], "property": "create", "input": { From 8cf90213fc0d65500a7d2433634fa3f7896cb630 Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Wed, 12 Jun 2019 02:15:53 +0800 Subject: [PATCH 4/4] make descriptions a bit more verbose --- exercises/robot-simulator/canonical-data.json | 64 ++++++------------- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/exercises/robot-simulator/canonical-data.json b/exercises/robot-simulator/canonical-data.json index 6520bc3a93..fdbce2d1c2 100644 --- a/exercises/robot-simulator/canonical-data.json +++ b/exercises/robot-simulator/canonical-data.json @@ -1,6 +1,6 @@ { "exercise": "robot-simulator", - "version": "3.1.0", + "version": "3.2.0", "comments": [ "Some tests have two expectations: one for the position, one for the direction", "Optionally, you can also test", @@ -10,12 +10,10 @@ ], "cases": [ { - "description": "Creation", - "comments": [ "A robot is created with a position and a direction" ], + "description": "Create robot", "cases": [ { - "description": "At origin", - "comments": [ "Robots are created with a position and direction" ], + "description": "at origin facing north", "property": "create", "input": { "position": { @@ -33,8 +31,7 @@ } }, { - "description": "Allows negative positions", - "comments": [ "Negative positions allowed" ], + "description": "at negative position facing south", "property": "create", "input": { "position": { @@ -54,12 +51,10 @@ ] }, { - "description": "Rotate clockwise", - "comments": [ "rotates the robot's direction 90 degrees clockwise" ], + "description": "Rotating clockwise", "cases": [ { - "description": "north to east", - "comments": [ "changes the direction from north to east" ], + "description": "changes north to east", "property": "move", "input": { "position": { @@ -78,8 +73,7 @@ } }, { - "description": "east to south", - "comments": [ "changes the direction from east to south" ], + "description": "changes east to south", "property": "move", "input": { "position": { @@ -98,8 +92,7 @@ } }, { - "description": "south to west", - "comments": [ "changes the direction from south to west" ], + "description": "changes south to west", "property": "move", "input": { "position": { @@ -118,8 +111,7 @@ } }, { - "description": "west to north", - "comments": [ "changes the direction from west to north" ], + "description": "changes west to north", "property": "move", "input": { "position": { @@ -140,12 +132,10 @@ ] }, { - "description": "Rotates counter-clockwise", - "comments": [ "rotates the robot's direction 90 degrees counter-clockwise" ], + "description": "Rotating counter-clockwise", "cases": [ { - "description": "north to west", - "comments": [ "changes the direction from north to west" ], + "description": "changes north to west", "property": "move", "input": { "position": { @@ -164,8 +154,7 @@ } }, { - "description": "west to south", - "comments": [ "changes the direction from west to south" ], + "description": "changes west to south", "property": "move", "input": { "position": { @@ -184,8 +173,7 @@ } }, { - "description": "south to east", - "comments": [ "changes the direction from south to east" ], + "description": "changes south to east", "property": "move", "input": { "position": { @@ -204,8 +192,7 @@ } }, { - "description": "east to north", - "comments": [ "changes the direction from east to north" ], + "description": "changes east to north", "property": "move", "input": { "position": { @@ -226,12 +213,10 @@ ] }, { - "description": "Forward One", - "comments": [ "moves the robot forward 1 space in the direction it is pointing" ], + "description": "Moving forward one", "cases": [ { - "description": "facing north", - "comments": [ "increases the y coordinate one when facing north" ], + "description": "facing north increments Y", "property": "move", "input": { "position": { @@ -250,8 +235,7 @@ } }, { - "description": "facing south", - "comments": [ "decreases the y coordinate by one when facing south" ], + "description": "facing south decrements Y", "property": "move", "input": { "position": { @@ -270,8 +254,7 @@ } }, { - "description": "facing east", - "comments": [ "increases the x coordinate by one when facing east" ], + "description": "facing east increments X", "property": "move", "input": { "position": { @@ -290,8 +273,7 @@ } }, { - "description": "facing west", - "comments": [ "decreases the x coordinate by one when facing west" ], + "description": "facing west decrements X", "property": "move", "input": { "position": { @@ -312,14 +294,13 @@ ] }, { - "description": "Series of instructions", + "description": "Follow series of instructions", "comments": [ "The robot can follow a series of instructions and end up with the correct position and direction.", "Where R = Turn Right, L = Turn Left and A = Advance" ], "cases": [ { - "description": "moving east and north", - "comments": [ "instructions to move east and north from README" ], + "description": "moving east and north from README", "property": "move", "input": { "position": { @@ -339,7 +320,6 @@ }, { "description": "moving west and north", - "comments": [ "instructions to move west and north" ], "property": "move", "input": { "position": { @@ -359,7 +339,6 @@ }, { "description": "moving west and south", - "comments": [ "instructions to move west and south" ], "property": "move", "input": { "position": { @@ -379,7 +358,6 @@ }, { "description": "moving east and north", - "comments": [ "instructions to move east and north" ], "property": "move", "input": { "position": {