Skip to content

state-of-tic-tac-toe: tweak error nessage and add test case #2012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions exercises/state-of-tic-tac-toe/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,38 @@
"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: X won and O kept playing",
"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"
}
},
{
"uuid": "4801cda2-f5b7-4c36-8317-3cdd167ac22c",
"description": "Invalid board: players kept playing after a win",
"property": "gamestate",
"input": {
"board": [
"XXX",
"OOO",
"XOX"
]
},
"expected": {
"error": "Impossible board: game should have ended after the game was won"
}
}
]
}
Expand Down