From dcc5fb49d2f3502bc45ba35c3bf1ad5799687d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Gillet?= Date: Mon, 18 Apr 2022 10:20:33 +0900 Subject: [PATCH 1/4] Tweak error nessage and add test case --- .../state-of-tic-tac-toe/canonical-data.json | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/exercises/state-of-tic-tac-toe/canonical-data.json b/exercises/state-of-tic-tac-toe/canonical-data.json index a1794a42c1..3a77b4573d 100644 --- a/exercises/state-of-tic-tac-toe/canonical-data.json +++ b/exercises/state-of-tic-tac-toe/canonical-data.json @@ -360,7 +360,23 @@ ] }, "expected": { - "error": "Impossible board: game should have ended after X won" + "error": "Impossible board: game should have ended after the game was won" + } + } + }, + { + "uuid": "4801cda2-f5b7-4c36-8317-3cdd167ac22c", + "description": "Invalid board", + "property": "gamestate", + "input": { + "board": [ + "XXX", + "OOO", + "XOX" + ] + }, + "expected": { + "error": "Impossible board: game should have ended after the game was won" } } ] From 86cea4754cf7c517741a8476539790f3d9f53b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Gillet?= Date: Mon, 18 Apr 2022 10:33:16 +0900 Subject: [PATCH 2/4] Fix format --- exercises/state-of-tic-tac-toe/canonical-data.json | 1 - 1 file changed, 1 deletion(-) diff --git a/exercises/state-of-tic-tac-toe/canonical-data.json b/exercises/state-of-tic-tac-toe/canonical-data.json index 3a77b4573d..a4d12ad78d 100644 --- a/exercises/state-of-tic-tac-toe/canonical-data.json +++ b/exercises/state-of-tic-tac-toe/canonical-data.json @@ -362,7 +362,6 @@ "expected": { "error": "Impossible board: game should have ended after the game was won" } - } }, { "uuid": "4801cda2-f5b7-4c36-8317-3cdd167ac22c", From 9b08e672c580d8b575305d31d7f132a493be29f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Gillet?= Date: Mon, 18 Apr 2022 10:41:09 +0900 Subject: [PATCH 3/4] Reimplement instead of mutate --- .../state-of-tic-tac-toe/canonical-data.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/exercises/state-of-tic-tac-toe/canonical-data.json b/exercises/state-of-tic-tac-toe/canonical-data.json index a4d12ad78d..cddaed8159 100644 --- a/exercises/state-of-tic-tac-toe/canonical-data.json +++ b/exercises/state-of-tic-tac-toe/canonical-data.json @@ -359,6 +359,23 @@ " " ] }, + "expected": { + "error": "Impossible board: game should have ended after X won" + } + }, + { + "uuid": "6c1920f2-ab5c-4648-a0c9-997414dda5eb", + "reimplements": "6c1920f2-ab5c-4648-a0c9-997414dda5eb", + "description": "Invalid board", + "comments": ["Error message was changed to be more general"], + "property": "gamestate", + "input": { + "board": [ + "XXX", + "OOO", + " " + ] + }, "expected": { "error": "Impossible board: game should have ended after the game was won" } From aa340757aa45440e1657c867795945cb89b5456e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Gillet?= Date: Wed, 20 Apr 2022 08:27:21 +0900 Subject: [PATCH 4/4] Unique descriptions --- exercises/state-of-tic-tac-toe/canonical-data.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/state-of-tic-tac-toe/canonical-data.json b/exercises/state-of-tic-tac-toe/canonical-data.json index cddaed8159..fbab9b562a 100644 --- a/exercises/state-of-tic-tac-toe/canonical-data.json +++ b/exercises/state-of-tic-tac-toe/canonical-data.json @@ -366,7 +366,7 @@ { "uuid": "6c1920f2-ab5c-4648-a0c9-997414dda5eb", "reimplements": "6c1920f2-ab5c-4648-a0c9-997414dda5eb", - "description": "Invalid board", + "description": "Invalid board: X won and O kept playing", "comments": ["Error message was changed to be more general"], "property": "gamestate", "input": { @@ -382,7 +382,7 @@ }, { "uuid": "4801cda2-f5b7-4c36-8317-3cdd167ac22c", - "description": "Invalid board", + "description": "Invalid board: players kept playing after a win", "property": "gamestate", "input": { "board": [