Skip to content

Commit 4971053

Browse files
committed
Sync docs and tests
1 parent 95dab7f commit 4971053

File tree

5 files changed

+124
-62
lines changed

5 files changed

+124
-62
lines changed

exercises/practice/connect/.meta/tests.toml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[6eff0df4-3e92-478d-9b54-d3e8b354db56]
613
description = "an empty board has no winner"
@@ -23,6 +30,12 @@ description = "nobody wins crossing adjacent angles"
2330
[cd61c143-92f6-4a8d-84d9-cb2b359e226b]
2431
description = "X wins crossing from left to right"
2532

33+
[495e33ed-30a9-4012-b46e-d7c4d5fe13c3]
34+
description = "X wins with left-hand dead end fork"
35+
36+
[ab167ab0-4a98-4d0f-a1c0-e1cddddc3d58]
37+
description = "X wins with right-hand dead end fork"
38+
2639
[73d1eda6-16ab-4460-9904-b5f5dd401d0b]
2740
description = "O wins crossing from top to bottom"
2841

exercises/practice/connect/cases_test.go

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package connect
33
// This is an auto-generated file. Do not change it manually. Run the generator to update the file.
44
// See https://github.com/exercism/go#synchronizing-tests-and-instructions
55
// Source: exercism/problem-specifications
6-
// Commit: 42dd0ce Remove version (#1678)
6+
// Commit: d5f665e Add dead-end test cases for Connect (#2633)
77

88
var testCases = []struct {
99
description string
@@ -78,6 +78,26 @@ var testCases = []struct {
7878
},
7979
expected: "X",
8080
},
81+
{
82+
description: "X wins with left-hand dead end fork",
83+
board: []string{
84+
". . X .",
85+
" X X . .",
86+
" . X X X",
87+
" O O O O",
88+
},
89+
expected: "X",
90+
},
91+
{
92+
description: "X wins with right-hand dead end fork",
93+
board: []string{
94+
". . X X",
95+
" X X . .",
96+
" . X X .",
97+
" O O O O",
98+
},
99+
expected: "X",
100+
},
81101
{
82102
description: "O wins crossing from top to bottom",
83103
board: []string{

exercises/practice/piecing-it-together/.docs/instructions.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,24 @@ For this exercise, you may assume square pieces, so that the format can be deriv
2424

2525
### Portrait
2626

27-
A portrait jigsaw puzzle with 6 pieces, all of which are border pieces and none are inside pieces. It has 3 rows and 2 columns. The aspect ratio is 1.5 (3/2).
27+
A portrait jigsaw puzzle with 6 pieces, all of which are border pieces and none are inside pieces.
28+
It has 2 columns and 3 rows.
29+
The aspect ratio is 0.666666... (2/3).
2830

2931
![A 2 by 3 jigsaw puzzle](https://assets.exercism.org/images/exercises/piecing-it-together/jigsaw-puzzle-2x3.svg)
3032

3133
### Square
3234

33-
A square jigsaw puzzle with 9 pieces, all of which are border pieces except for the one in the center, which is an inside piece. It has 3 rows and 3 columns. The aspect ratio is 1 (3/3).
35+
A square jigsaw puzzle with 9 pieces, all of which are border pieces except for the one in the center, which is an inside piece.
36+
It has 3 columns and 3 rows.
37+
The aspect ratio is 1.0 (3/3).
3438

3539
![A 3 by 3 jigsaw puzzle](https://assets.exercism.org/images/exercises/piecing-it-together/jigsaw-puzzle-3x3.svg)
3640

3741
### Landscape
3842

39-
A landscape jigsaw puzzle with 12 pieces, 10 of which are border pieces and 2 are inside pieces. It has 3 rows and 4 columns. The aspect ratio is 1.333333... (4/3).
43+
A landscape jigsaw puzzle with 12 pieces, 10 of which are border pieces and 2 are inside pieces.
44+
It has 4 columns and 3 rows.
45+
The aspect ratio is 1.333333... (4/3).
4046

4147
![A 4 by 3 jigsaw puzzle](https://assets.exercism.org/images/exercises/piecing-it-together/jigsaw-puzzle-4x3.svg)
Lines changed: 76 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,103 @@
1-
[962d998c-c203-41e2-8fbd-85a7b98b79b9
2-
description = "Empty list has length of zero"
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
311

4-
[9760262e-d7e4-4639-9840-87e2e2fbb115
5-
description = "Singleton list has length of one"
12+
[962d998c-c203-41e2-8fbd-85a7b98b79b9]
13+
description = "count -> Empty list has length of zero"
614

7-
[d9955c90-637c-441b-b41d-8cfb48e924a8
8-
description = "Non-empty list has correct length"
15+
[9760262e-d7e4-4639-9840-87e2e2fbb115]
16+
description = "count -> Singleton list has length of one"
917

10-
[0c3966db-58f9-4632-b94c-8ea13e54c2c8
11-
description = "Pop from empty list is an error"
18+
[d9955c90-637c-441b-b41d-8cfb48e924a8]
19+
description = "count -> Non-empty list has correct length"
1220

13-
[a4f9d2e1-7425-49ef-9ee8-6c0cb3407cf0
14-
description = "Can pop from singleton list"
21+
[0c3966db-58f9-4632-b94c-8ea13e54c2c8]
22+
description = "pop -> Pop from empty list is an error"
1523

16-
[6dcbb2c9-d98a-47bc-a010-9c19703d3ea2
17-
description = "Can pop from non-empty list"
24+
[a4f9d2e1-7425-49ef-9ee8-6c0cb3407cf0]
25+
description = "pop -> Can pop from singleton list"
1826

19-
[e83aade9-f030-4096-aaf0-f9dc6491e6cf
20-
description = "Can pop multiple items"
27+
[6dcbb2c9-d98a-47bc-a010-9c19703d3ea2]
28+
description = "pop -> Can pop from non-empty list"
2129

22-
[5c46bcf2-c0a9-4654-ae17-f3192436fcf1
23-
description = "Pop updates the count"
30+
[e83aade9-f030-4096-aaf0-f9dc6491e6cf]
31+
description = "pop -> Can pop multiple items"
2432

25-
[70d747a1-2e84-4ebc-bc3f-dcbee6a05f6b
26-
description = "Can push to an empty list"
33+
[5c46bcf2-c0a9-4654-ae17-f3192436fcf1]
34+
description = "pop -> Pop updates the count"
2735

28-
[391e332e-1f91-4033-b1e0-0e0c17812fa7
29-
description = "Can push to a non-empty list"
36+
[70d747a1-2e84-4ebc-bc3f-dcbee6a05f6b]
37+
description = "push -> Can push to an empty list"
3038

31-
[ed4b0e01-3bbd-4895-af25-152b5914b3da
32-
description = "Push updates count"
39+
[391e332e-1f91-4033-b1e0-0e0c17812fa7]
40+
description = "push -> Can push to a non-empty list"
3341

34-
[41666790-b932-4e5a-b323-e848a83d12d5
35-
description = "Push and pop"
42+
[ed4b0e01-3bbd-4895-af25-152b5914b3da]
43+
description = "push -> Push updates count"
3644

37-
[930a4a5c-76f6-47ec-9be3-4e70993173a1
38-
description = "Peek on empty list is an error"
45+
[41666790-b932-4e5a-b323-e848a83d12d5]
46+
description = "push -> Push and pop"
3947

40-
[43255a50-d919-4e81-afce-e4a271eaedbd
41-
description = "Can peek on singleton list"
48+
[930a4a5c-76f6-47ec-9be3-4e70993173a1]
49+
description = "peek -> Peek on empty list is an error"
4250

43-
[48353020-e25d-4621-a854-e35fb1e15fa7
44-
description = "Can peek on non-empty list"
51+
[43255a50-d919-4e81-afce-e4a271eaedbd]
52+
description = "peek -> Can peek on singleton list"
4553

46-
[96fcead9-a713-46c2-8005-3f246c873851
47-
description = "Peek does not change the count"
54+
[48353020-e25d-4621-a854-e35fb1e15fa7]
55+
description = "peek -> Can peek on non-empty list"
4856

49-
[7576ed05-7ff7-4b84-8efb-d34d62c110f5
50-
description = "Can peek after a pop and push"
57+
[96fcead9-a713-46c2-8005-3f246c873851]
58+
description = "peek -> Peek does not change the count"
5159

52-
[b97d00b6-2fab-435d-ae74-3233dcc13698
53-
description = "Empty linked list to list (LIFO) is empty"
60+
[7576ed05-7ff7-4b84-8efb-d34d62c110f5]
61+
description = "peek -> Can peek after a pop and push"
5462

55-
[eedeb95f-b5cf-431d-8ad6-5854ba6b251c
56-
description = "To list (LIFO) with multiple values"
63+
[b97d00b6-2fab-435d-ae74-3233dcc13698]
64+
description = "toList LIFO -> Empty linked list to list is empty"
65+
include = false
66+
comments = "mutually exclusive with the FIFO implementation"
5767

58-
[838678de-eaf3-4c14-b34e-7e35b6d851e8
59-
description = "To list (LIFO) after a pop"
68+
[eedeb95f-b5cf-431d-8ad6-5854ba6b251c]
69+
description = "toList LIFO -> To list with multiple values"
70+
include = false
71+
comments = "mutually exclusive with the FIFO implementation"
6072

61-
[03fc83a5-48a8-470b-a2d2-a286c5e8365f
62-
description = "Empty linked list to list (FIFO) is empty"
73+
[838678de-eaf3-4c14-b34e-7e35b6d851e8]
74+
description = "toList LIFO -> To list after a pop"
75+
include = false
76+
comments = "mutually exclusive with the FIFO implementation"
6377

64-
[1282484e-a58c-426a-972e-90746bda61fc
65-
description = "To list (FIFO) with multiple values"
78+
[03fc83a5-48a8-470b-a2d2-a286c5e8365f]
79+
description = "toList FIFO -> Empty linked list to list is empty"
6680

67-
[05ca3109-1249-4c0c-a567-a3b2f8352a7c
68-
description = "To list (FIFO) after a pop"
81+
[1282484e-a58c-426a-972e-90746bda61fc]
82+
description = "toList FIFO -> To list with multiple values"
6983

70-
[5e6c1a3d-e34b-46d3-be59-3f132a820ed5
71-
description = "Reversed empty list is same list"
84+
[05ca3109-1249-4c0c-a567-a3b2f8352a7c]
85+
description = "toList FIFO -> To list after a pop"
7286

73-
[93c87ed3-862a-474f-820b-ba3fd6b6daf6
74-
description = "Reversed singleton list is same list"
87+
[5e6c1a3d-e34b-46d3-be59-3f132a820ed5]
88+
description = "reverse -> Reversed empty list has same values"
7589

76-
[92851ebe-9f52-4406-b92e-0718c441a2ab
77-
description = "Reversed non-empty list is reversed"
90+
[93c87ed3-862a-474f-820b-ba3fd6b6daf6]
91+
description = "reverse -> Reversed singleton list is same list"
7892

79-
[9b53af96-7494-4cfa-9b77-b7366fed5c4c
80-
description = "Double reverse"
93+
[92851ebe-9f52-4406-b92e-0718c441a2ab]
94+
description = "reverse -> Reversed non-empty list is reversed"
95+
include = false
96+
comments = "reimplemented by 1210eeda-b23f-4790-930c-7ac6d0c8e723"
8197

98+
[1210eeda-b23f-4790-930c-7ac6d0c8e723]
99+
description = "reverse -> Reversed non-empty list is reversed"
100+
reimplements = "92851ebe-9f52-4406-b92e-0718c441a2ab"
101+
102+
[9b53af96-7494-4cfa-9b77-b7366fed5c4c]
103+
description = "reverse -> Double reverse"

exercises/practice/simple-linked-list/cases_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package simplelinkedlist
33
// This is an auto-generated file. Do not change it manually. Run the generator to update the file.
44
// See https://github.com/exercism/go#synchronizing-tests-and-instructions
55
// Source: exercism/problem-specifications
6-
// Commit: b97ba39 [simple-linked-list] Add a new canonical data file (#2635)
6+
// Commit: f1ff9e6 simple-linked-list: reimplement 1 test to count after reverse (#2636)
77

88
type Operation struct {
99
operation string
@@ -206,6 +206,7 @@ var testCases = []testCase{
206206
initialValues: []int{1, 2, 3},
207207
operations: []Operation{
208208
Operation{operation: "Reverse"},
209+
Operation{operation: "Size", expectedInt: 3},
209210
Operation{operation: "Pop", expectedInt: 1},
210211
Operation{operation: "Pop", expectedInt: 2},
211212
Operation{operation: "Pop", expectedInt: 3},

0 commit comments

Comments
 (0)