@@ -7,15 +7,40 @@ The `doc/` subdirectory contains all documentation that is not specific to a lan
7
7
8
8
Please see the [ contributing guide] ( https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md )
9
9
10
- ## Test Data Format
10
+ ## Problem metadata
11
+
12
+ Each problem's data lives in a directory under ` exercises/ `
13
+
14
+ ```
15
+ exercises/
16
+ ├── accumulate
17
+ │ ├── description.md
18
+ │ └── metadata.yml
19
+ ├── ...
20
+ ├── minesweeper
21
+ │ ├── canonical-data.json
22
+ │ ├── description.md
23
+ │ └── metadata.yml
24
+ ├── ...
25
+ └── zipper
26
+ ├── description.md
27
+ └── metadata.yml
28
+ ```
29
+
30
+ There are three metadata files:
31
+
32
+ * ` description.md ` - the basic problem description
33
+ * ` metadata.yml ` - additional information about the problem, such as where it came from
34
+ * ` canonical-data.json ` (optional) - standardized test inputs and outputs that can be used to implement the problem
35
+
36
+ ## Test Data Format (canonical-data.json)
11
37
12
- Each problem can have a file <problem >.json containing standard test data.
13
38
This data can be incorporated into test programs manually or extracted by a
14
39
program. The file contains a single JSON object with a key for documentation
15
40
and keys for various tests that may be meaningful for a problem.
16
41
17
42
The documentation uses the key "#" with a list of strings as the value.
18
- These strings document how the problem readme (& lt ; problem> .md) is generally
43
+ These strings document how the problem readme (` description .md` ) is generally
19
44
interpreted in test programs across different languages. In addition to a
20
45
mainstream implementation path, this information can also document significant
21
46
variations.
@@ -28,7 +53,7 @@ Each test case has the the following keys:
28
53
29
54
## Automated Tests
30
55
31
- The only thing that we're testing at the moment, is whether or not shared test data
56
+ The only thing that we're testing at the moment, is whether or not ` canonical- data.json `
32
57
is valid json.
33
58
34
59
If you want to run this before you commit, you will need to install
0 commit comments