-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync: write fuller
description
for nested test cases (#301)
Some exercises in the `problem-specifications` repo have a `canonical-data.json` file that uses nesting, meaning that there is more than one `cases` property. `configlet` handled these nicely, but each `description` in each `tests.toml` file contained only the description of the test case itself. This could be unclear, and was especially confusing when test cases in different nested objects had the same description. Each `description` is purely for humans to read - it isn't used otherwise. With this commit, `configlet sync` writes the "full description" to the `tests.toml` file. For example, a `tests.toml` for the `triangle` exercise might previously contain (omitting other test cases for clarity): ```toml [3022f537-b8e5-4cc1-8f12-fd775827a00c] description = "sides may be floats" [adb4ee20-532f-43dc-8d31-e9271b7ef2bc] description = "sides may be floats" [26d9d59d-f8f1-40d3-ad58-ae4d54123d7d] description = "sides may be floats" ``` But with this commit: ```toml [3022f537-b8e5-4cc1-8f12-fd775827a00c] description = "equilateral triangle → sides may be floats" [adb4ee20-532f-43dc-8d31-e9271b7ef2bc] description = "isosceles triangle → sides may be floats" [26d9d59d-f8f1-40d3-ad58-ae4d54123d7d] description = "scalene triangle → sides may be floats" ``` For the canonical data for this exercise, see: https://github.com/exercism/problem-specifications/blob/f17f457fdc06/exercises/triangle/canonical-data.json We decided that putting everything in `description` is better than: - adding extra key/value pair(s) named e.g. `category` or `super` - adding TOML comments - using sub-tables While working on this PR, we noticed that 18 exercises in `problem-specifications` had unnecessary nesting. We simplified them in exercism/problem-specifications#1798 Closes: #202 Co-authored-by: ee7 <[email protected]>
- Loading branch information
1 parent
ac34a79
commit aa23b4d
Showing
2 changed files
with
57 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters