Skip to content

Commit 94a06cb

Browse files
committed
Add test to dominoes for uniform order swapping
1 parent ae6a54b commit 94a06cb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

exercises/dominoes/canonical-data.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,21 @@
170170
"dominoes": [[1, 2], [2, 3], [3, 1], [4, 5], [5, 6], [6, 4]]
171171
},
172172
"expected": false
173+
},
174+
{
175+
"uuid": "25c9ae19-cfd3-42bd-a7df-c02e512ac82a",
176+
"description": "dominoes can only be used either swapped or unswapped",
177+
"comments": [
178+
"Solutions might just check if any of the numbers of two dominoes match",
179+
"and still handle the special case of only one domino being present.",
180+
"This is caught by this test since no matter if a domino is swapped or not,",
181+
"they are not chainable."
182+
],
183+
"property": "canChain",
184+
"input": {
185+
"dominoes": [[1, 2], [3, 2]]
186+
},
187+
"expected": false
173188
}
174189
]
175190
}

0 commit comments

Comments
 (0)