Skip to content

Commit c75cd3e

Browse files
author
Jegors Čemisovs
committed
Add additional test cases to Mazy Mice exercise
Expanded test coverage for the 'generateMaze' functionality in the Mazy Mice exercise. This includes tests for maze dimensions, character validity, maze entrance and exit, and more. Additionally, replaced 'createMaze' with 'generateMaze' in existing test cases to ensure consistency. These changes aim to provide a more comprehensive evaluation of the generateMaze function's correctness and robustness.
1 parent 181ece6 commit c75cd3e

File tree

1 file changed

+50
-10
lines changed

1 file changed

+50
-10
lines changed

exercises/mazy-mice/canonican-data.json

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,50 @@
1919
" - two mazes with different seeds should not be equal "
2020
],
2121
"cases": [
22+
{
23+
"uuid": "e01f6db6-613c-4b55-9c09-e87edc0b04dd",
24+
"description": "The dimensions of the maze are correct",
25+
"property": "generateMaze",
26+
"input": {
27+
"rows": 6,
28+
"cols": 18
29+
},
30+
"expected": "the generated maze has 13 lines and 37 columns"
31+
},
32+
{
33+
"uuid": "4782cea6-a1e3-48b2-b825-a805890b5118",
34+
"description": "The maze contains only valid characters",
35+
"property": "generateMaze",
36+
"input": {
37+
"rows": 6,
38+
"cols": 18
39+
},
40+
"expected": "the generated maze has only valid characters"
41+
},
42+
{
43+
"uuid": "1433a6ff-d18e-4ade-b37c-40b286218f07",
44+
"description": "The maze has a single entrance on the left side",
45+
"property": "generateMaze",
46+
"input": {
47+
"rows": 6,
48+
"cols": 18
49+
},
50+
"expected": "the generated maze has a single entrance on the left side"
51+
},
52+
{
53+
"uuid": "a0be2a1c-4ec1-412a-8a30-36d6b1d96df2",
54+
"description": "The maze has a single exit on the right side",
55+
"property": "generateMaze",
56+
"input": {
57+
"rows": 6,
58+
"cols": 18
59+
},
60+
"expected": "the generated maze has a single exit on the right side"
61+
},
2262
{
2363
"uuid": "1f7f50f5-4a3a-4e96-8c5e-92b284fd8b3b",
2464
"description": "the smallest square maze is perfect",
25-
"property": "createMaze",
65+
"property": "generateMaze",
2666
"input": {
2767
"rows": 5,
2868
"cols": 5
@@ -32,7 +72,7 @@
3272
{
3373
"uuid": "2a8e8f63-7e89-4c9a-8d1f-1439a7d9a3e9",
3474
"description": "the small rectangular maze is perfect",
35-
"property": "createMaze",
75+
"property": "generateMaze",
3676
"input": {
3777
"rows": 5,
3878
"cols": 10
@@ -42,7 +82,7 @@
4282
{
4383
"uuid": "3b6e8d5c-2a8d-4f03-9e7a-6c8f2a4e4f88",
4484
"description": "the square maze is perfect",
45-
"property": "createMaze",
85+
"property": "generateMaze",
4686
"input": {
4787
"rows": 10,
4888
"cols": 10
@@ -52,7 +92,7 @@
5292
{
5393
"uuid": "4c7f6e5b-5e45-4a8d-8e8a-7f3e3e4e5f99",
5494
"description": "the large rectangular maze is perfect",
55-
"property": "createMaze",
95+
"property": "generateMaze",
5696
"input": {
5797
"rows": 10,
5898
"cols": 20
@@ -62,7 +102,7 @@
62102
{
63103
"uuid": "5d8f7f6c-6e46-4a9d-8e8b-8f3f3f4e6f00",
64104
"description": "the rectangular maze with aspect 2:1 is perfect",
65-
"property": "createMaze",
105+
"property": "generateMaze",
66106
"input": {
67107
"rows": 20,
68108
"cols": 10
@@ -72,7 +112,7 @@
72112
{
73113
"uuid": "6e9f8f7d-7e47-4a9e-8e8c-9f3f3f4e7f01",
74114
"description": "the huge rectangular maze is perfect",
75-
"property": "createMaze",
115+
"property": "generateMaze",
76116
"input": {
77117
"rows": 20,
78118
"cols": 100
@@ -82,7 +122,7 @@
82122
{
83123
"uuid": "7fa0a0b1-8e48-4a9f-8e8d-af4f4f5e8f02",
84124
"description": "the huge square maze is perfect",
85-
"property": "createMaze",
125+
"property": "generateMaze",
86126
"input": {
87127
"rows": 100,
88128
"cols": 100
@@ -92,7 +132,7 @@
92132
{
93133
"uuid": "8fb1c1d2-9e49-4aa0-8e8e-bf5f5f6e9f03",
94134
"description": "if the seed parameter is specified, the perfect maze generated",
95-
"property": "createMaze",
135+
"property": "generateMaze",
96136
"input": {
97137
"rows": 50,
98138
"cols": 50,
@@ -103,7 +143,7 @@
103143
{
104144
"uuid": "9fc2d2e3-af4a-4ab1-8e8f-cf6f6f7eaf04",
105145
"description": "if the seed parameter is omitted, random mazes should be generated",
106-
"property": "createMaze",
146+
"property": "generateMaze",
107147
"input": {
108148
"rows": 8,
109149
"cols": 16
@@ -113,7 +153,7 @@
113153
{
114154
"uuid": "a0d3e4f4-b05b-4ac2-8e8a-df7f7f8eaf05",
115155
"description": "if the seed parameter is specified, the same maze should be generated",
116-
"property": "createMaze",
156+
"property": "generateMaze",
117157
"input": {
118158
"rows": 8,
119159
"cols": 16,

0 commit comments

Comments
 (0)