Skip to content

Commit 79736ae

Browse files
Tweaks to test generators (#498)
1 parent 1ac8bd2 commit 79736ae

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

building/tooling/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ Here are some examples of maintenance tooling:
4545
Track tooling is usually (mostly) written in the track's language.
4646

4747
```exercism/caution
48-
While you're free to use additional languages, each additional language will make it harder to find people that can maintain or contribute to the track.
49-
We recommend using the track's language where possible, because it makes maintaining or contributing easier.
48+
While you're free to use other languages, each additional language will make it harder to maintain or contribute to the track.
49+
Therefore, we recommend using the track's language where possible, because it makes maintaining or contributing easier.
5050
```

building/tooling/test-generators.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ We recommend doing this periodically, to check if there are problematic test cas
3232

3333
There are two possible starting points when implementing a Test Generator for an exercise:
3434

35-
1. The exercise is new and doesn't yet have any tests
36-
2. The exercise already exists and has existing tests
35+
1. The exercise is new and thus doesn't have any tests
36+
2. The exercise already exists and thus has existing tests
3737

3838
```exercism/caution
3939
If there are existing tests, implement the Test Generator such that the tests it generates do not break existing solutions.
@@ -51,7 +51,7 @@ We've found that the code-based approach will lead to fairly complex Test Genera
5151
What we recommend is the following flow:
5252

5353
1. Read the exercise's canonical data
54-
2. Exclude the test cases that are marked as `include = false` in the exercise's `tests.toml` file
54+
2. Exclude the test cases that are marked as `include = false` in the exercise's [`tests.toml` file](/docs/building/tracks/practice-exercises#file-meta-tests-toml)
5555
3. Convert the exercise's canonical data into a format that can be used in a template
5656
4. Pass the exercise's canonical data to an exercise-specific template
5757

@@ -62,28 +62,28 @@ The key benefit of this setup is that each exercise has its own template, which:
6262
- Makes it safe to edit them without risking breaking another exercise
6363

6464
```exercism/caution
65-
Some additional things to be aware of when designing the test generator
65+
When designing the test generator, try to:
6666
67-
- Minimize the pre-processing of canonical data inside the Test Generator
68-
- Try to reduce coupling between templates
67+
- Minimize pre-processing of canonical data inside the Test Generator
68+
- Reduce coupling between templates
6969
```
7070

7171
## Implementation
7272

7373
The Test Generator is usually (mostly) written in the track's language.
7474

7575
```exercism/caution
76-
While you're free to use additional languages, each additional language will make it harder to find people that can maintain or contribute to the track.
77-
We recommend using the track's language where possible, only using additional languages when it makes maintaining or contributing easier.
76+
While you're free to use other languages, each additional language will make it harder to maintain or contribute to the track.
77+
Therefore, we recommend using the track's language where possible, because it makes maintaining or contributing easier.
7878
```
7979

8080
### Canonical data
8181

8282
The core data the Test Generator works with is an exercise's [`canonical-data.json` file](https://github.com/exercism/problem-specifications?tab=readme-ov-file#test-data-canonical-datajson).
83-
This file is defined in the [exercism/problem-specifications repo](https://github.com/exercism/problem-specifications), which defines shared metadata for many Exercism's exercises.
83+
This file is defined in the [exercism/problem-specifications repo](https://github.com/exercism/problem-specifications), which defines shared metadata for [many Exercism's exercises](https://github.com/search?q=repo%3Aexercism%2Fproblem-specifications+path%3A**%2Fcanonical-data.json&type=code&ref=advsearch).
8484

85-
```exercism/note
86-
Not all exercises have a `canonical-data.json` file.
85+
```exercism/caution
86+
Not all exercises have a `canonical-data.json` file!
8787
In case they don't, you'll need to manually create the tests, as there is no data for the Test Generator to work with.
8888
```
8989

@@ -201,7 +201,7 @@ If your track does not support grouping tests, you'll need to:
201201
202202
- Traverse/flatten the `cases` hierarchy to end up with only the innermost (leaf) test cases
203203
- Combine the test case description with its parent description(s) to create a unique test name
204-
````
204+
```
205205

206206
#### Input and expected values
207207

building/tracks/new/implement-tooling.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ To speed up adding new exercises, consider building a [Test Generator](/docs/bui
5151
Track tooling is usually (mostly) written in the track's language.
5252

5353
```exercism/caution
54-
While you're free to use additional languages, each additional language will make it harder to find people that can maintain or contribute to the track.
55-
We recommend using the track's language where possible, because it makes maintaining or contributing easier.
54+
While you're free to use other languages, each additional language will make it harder to maintain or contribute to the track.
55+
Therefore, we recommend using the track's language where possible, because it makes maintaining or contributing easier.
5656
```
5757

5858
## Deployment

0 commit comments

Comments
 (0)