trackler 2.0.8.17 → 2.0.8.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/forth/canonical-data.json +307 -321
  3. data/common/exercises/largest-series-product/canonical-data.json +139 -122
  4. data/common/exercises/list-ops/canonical-data.json +162 -141
  5. data/common/exercises/markdown/canonical-data.json +15 -14
  6. data/common/exercises/pov/canonical-data.json +264 -116
  7. data/common/exercises/prime-factors/canonical-data.json +51 -40
  8. data/common/exercises/rail-fence-cipher/canonical-data.json +56 -44
  9. data/common/exercises/react/canonical-data.json +18 -4
  10. data/common/exercises/rectangles/canonical-data.json +16 -1
  11. data/common/exercises/rotational-cipher/canonical-data.json +81 -67
  12. data/common/exercises/run-length-encoding/canonical-data.json +89 -71
  13. data/common/exercises/space-age/canonical-data.json +61 -45
  14. data/common/exercises/sublist/canonical-data.json +136 -99
  15. data/common/exercises/transpose/canonical-data.json +207 -194
  16. data/common/exercises/variable-length-quantity/canonical-data.json +171 -141
  17. data/lib/trackler/version.rb +1 -1
  18. data/tracks/csharp/exercises/diamond/HINTS.md +9 -0
  19. data/tracks/go/README.md +3 -0
  20. data/tracks/go/exercises/queen-attack/queen_attack_test.go +1 -1
  21. data/tracks/haskell/exercises/hamming/src/Hamming.hs +2 -1
  22. data/tracks/java/exercises/flatten-array/src/test/java/FlattenerTest.java +5 -0
  23. data/tracks/ocaml/exercises/anagram/test.ml +2 -2
  24. data/tracks/ocaml/tools/test-generator/src/controller.ml +7 -2
  25. data/tracks/ocaml/tools/test-generator/src/parser.ml +31 -18
  26. data/tracks/ocaml/tools/test-generator/src/template.ml +10 -8
  27. data/tracks/ocaml/tools/test-generator/src/utils.ml +11 -0
  28. data/tracks/ocaml/tools/test-generator/templates/phone-number/template.ml +4 -5
  29. data/tracks/ocaml/tools/test-generator/test/beer-song.json +77 -0
  30. data/tracks/ocaml/tools/test-generator/test/difference_of_squares.json +76 -62
  31. data/tracks/ocaml/tools/test-generator/test/parser_test.ml +11 -9
  32. data/tracks/ocaml/tools/test-generator/test/template_test.ml +2 -2
  33. metadata +4 -2
@@ -1,46 +1,62 @@
1
- { "#": [],
2
- "age on": {
3
- "cases": [
4
- {
5
- "planet": "Earth",
6
- "seconds": 1000000000,
7
- "expected": 31.69
8
- },
9
- {
10
- "planet": "Mercury",
11
- "seconds": 2134835688,
12
- "expected": 280.88
13
- },
14
- {
15
- "planet": "Venus",
16
- "seconds": 189839836,
17
- "expected": 9.78
18
- },
19
- {
20
- "planet": "Mars",
21
- "seconds": 2329871239,
22
- "expected": 39.25
23
- },
24
- {
25
- "planet": "Jupiter",
26
- "seconds": 901876382,
27
- "expected": 2.41
28
- },
29
- {
30
- "planet": "Saturn",
31
- "seconds": 3000000000,
32
- "expected": 3.23
33
- },
34
- {
35
- "planet": "Uranus",
36
- "seconds": 3210123456,
37
- "expected": 1.21
38
- },
39
- {
40
- "planet": "Neptune",
41
- "seconds": 8210123456,
42
- "expected": 1.58
43
- }
44
- ]
45
- }
1
+ {
2
+ "exercise": "space-age",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "age on Earth",
7
+ "property": "age",
8
+ "planet": "Earth",
9
+ "seconds": 1000000000,
10
+ "expected": 31.69
11
+ },
12
+ {
13
+ "description": "age on Mercury",
14
+ "property": "age",
15
+ "planet": "Mercury",
16
+ "seconds": 2134835688,
17
+ "expected": 280.88
18
+ },
19
+ {
20
+ "description": "age on Venus",
21
+ "property": "age",
22
+ "planet": "Venus",
23
+ "seconds": 189839836,
24
+ "expected": 9.78
25
+ },
26
+ {
27
+ "description": "age on Mars",
28
+ "property": "age",
29
+ "planet": "Mars",
30
+ "seconds": 2329871239,
31
+ "expected": 39.25
32
+ },
33
+ {
34
+ "description": "age on Jupiter",
35
+ "property": "age",
36
+ "planet": "Jupiter",
37
+ "seconds": 901876382,
38
+ "expected": 2.41
39
+ },
40
+ {
41
+ "description": "age on Saturn",
42
+ "property": "age",
43
+ "planet": "Saturn",
44
+ "seconds": 3000000000,
45
+ "expected": 3.23
46
+ },
47
+ {
48
+ "description": "age on Uranus",
49
+ "property": "age",
50
+ "planet": "Uranus",
51
+ "seconds": 3210123456,
52
+ "expected": 1.21
53
+ },
54
+ {
55
+ "description": "age on Neptune",
56
+ "property": "age",
57
+ "planet": "Neptune",
58
+ "seconds": 8210123456,
59
+ "expected": 1.58
60
+ }
61
+ ]
46
62
  }
@@ -1,101 +1,138 @@
1
1
  {
2
- "#": [
3
- "Lists are ordered and sequential.",
4
- "https://en.wikipedia.org/wiki/List_%28abstract_data_type%29",
5
- "",
6
- "Depending on your language, there may need to be some translation",
7
- "to go from the JSON array to the list representation.",
8
- "The expectation can be used to generate an expected value",
9
- "based on your implementation (such as a constant 'EQUAL', 'SUBLIST', etc.).",
10
- "",
11
- "If appropriate for your track, you'll need to ensure that no pair of expected values are equal.",
12
- "Otherwise, an implementation that always returns a constant value may falsely pass the tests.",
13
- "See https://github.com/exercism/xpython/issues/342"
14
- ],
15
- "cases": [{
16
- "description": "empty lists",
17
- "list_one": [],
18
- "list_two": [],
19
- "expectation": "equal"
20
- }, {
21
- "description": "empty list within non empty list",
22
- "list_one": [],
23
- "list_two": [1, 2, 3],
24
- "expectation": "sublist"
25
- }, {
26
- "description": "non empty list contains empty list",
27
- "list_one": [1, 2, 3],
28
- "list_two": [],
29
- "expectation": "superlist"
30
- }, {
31
- "description": "list equals itself",
32
- "list_one": [1, 2, 3],
33
- "list_two": [1, 2, 3],
34
- "expectation": "equal"
35
- }, {
36
- "description": "different lists",
37
- "list_one": [1, 2, 3],
38
- "list_two": [2, 3, 4],
39
- "expectation": "unequal"
40
- }, {
41
- "description": "false start",
42
- "list_one": [1, 2, 5],
43
- "list_two": [0, 1, 2, 3, 1, 2, 5, 6],
44
- "expectation": "sublist"
45
- }, {
46
- "description": "consecutive",
47
- "list_one": [1, 1, 2],
48
- "list_two": [0, 1, 1, 1, 2, 1, 2],
49
- "expectation": "sublist"
50
- }, {
51
- "description": "sublist at start",
52
- "list_one": [0, 1, 2],
53
- "list_two": [0, 1, 2, 3, 4, 5],
54
- "expectation": "sublist"
55
- }, {
56
- "description": "sublist in middle",
57
- "list_one": [2, 3, 4],
58
- "list_two": [0, 1, 2, 3, 4, 5],
59
- "expectation": "sublist"
60
- }, {
61
- "description": "sublist at end",
62
- "list_one": [3, 4, 5],
63
- "list_two": [0, 1, 2, 3, 4, 5],
64
- "expectation": "sublist"
65
- }, {
66
- "description": "at start of superlist",
67
- "list_one": [0, 1, 2, 3, 4, 5],
68
- "list_two": [0, 1, 2],
69
- "expectation": "superlist"
70
- }, {
71
- "description": "in middle of superlist",
72
- "list_one": [0, 1, 2, 3, 4, 5],
73
- "list_two": [2, 3],
74
- "expectation": "superlist"
75
- }, {
76
- "description": "at end of superlist",
77
- "list_one": [0, 1, 2, 3, 4, 5],
78
- "list_two": [3, 4, 5],
79
- "expectation": "superlist"
80
- }, {
81
- "description": "first list missing element from second list",
82
- "list_one": [1, 3],
83
- "list_two": [1, 2, 3],
84
- "expectation": "unequal"
85
- }, {
86
- "description": "second list missing element from first list",
87
- "list_one": [1, 2, 3],
88
- "list_two": [1, 3],
89
- "expectation": "unequal"
90
- }, {
91
- "description": "order matters to a list",
92
- "list_one": [1, 2, 3],
93
- "list_two": [3, 2, 1],
94
- "expectation": "unequal"
95
- }, {
96
- "description": "same digits but different numbers",
97
- "list_one": [1, 0, 1],
98
- "list_two": [10, 1],
99
- "expectation": "unequal"
100
- }]
2
+ "exercise": "sublist",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "Lists are ordered and sequential.",
6
+ "https://en.wikipedia.org/wiki/List_%28abstract_data_type%29",
7
+ "",
8
+ "Depending on your language, there may need to be some translation",
9
+ "to go from the JSON array to the list representation.",
10
+ "The expectation can be used to generate an expected value",
11
+ "based on your implementation (such as a constant 'EQUAL', 'SUBLIST', etc.).",
12
+ "",
13
+ "If appropriate for your track, you'll need to ensure that no pair of expected values are equal.",
14
+ "Otherwise, an implementation that always returns a constant value may falsely pass the tests.",
15
+ "See https://github.com/exercism/xpython/issues/342"
16
+ ],
17
+ "cases": [
18
+ {
19
+ "description": "empty lists",
20
+ "property": "sublist",
21
+ "listOne": [],
22
+ "listTwo": [],
23
+ "expected": "equal"
24
+ },
25
+ {
26
+ "description": "empty list within non empty list",
27
+ "property": "sublist",
28
+ "listOne": [],
29
+ "listTwo": [1, 2, 3],
30
+ "expected": "sublist"
31
+ },
32
+ {
33
+ "description": "non empty list contains empty list",
34
+ "property": "sublist",
35
+ "listOne": [1, 2, 3],
36
+ "listTwo": [],
37
+ "expected": "superlist"
38
+ },
39
+ {
40
+ "description": "list equals itself",
41
+ "property": "sublist",
42
+ "listOne": [1, 2, 3],
43
+ "listTwo": [1, 2, 3],
44
+ "expected": "equal"
45
+ },
46
+ {
47
+ "description": "different lists",
48
+ "property": "sublist",
49
+ "listOne": [1, 2, 3],
50
+ "listTwo": [2, 3, 4],
51
+ "expected": "unequal"
52
+ },
53
+ {
54
+ "description": "false start",
55
+ "property": "sublist",
56
+ "listOne": [1, 2, 5],
57
+ "listTwo": [0, 1, 2, 3, 1, 2, 5, 6],
58
+ "expected": "sublist"
59
+ },
60
+ {
61
+ "description": "consecutive",
62
+ "property": "sublist",
63
+ "listOne": [1, 1, 2],
64
+ "listTwo": [0, 1, 1, 1, 2, 1, 2],
65
+ "expected": "sublist"
66
+ },
67
+ {
68
+ "description": "sublist at start",
69
+ "property": "sublist",
70
+ "listOne": [0, 1, 2],
71
+ "listTwo": [0, 1, 2, 3, 4, 5],
72
+ "expected": "sublist"
73
+ },
74
+ {
75
+ "description": "sublist in middle",
76
+ "property": "sublist",
77
+ "listOne": [2, 3, 4],
78
+ "listTwo": [0, 1, 2, 3, 4, 5],
79
+ "expected": "sublist"
80
+ },
81
+ {
82
+ "description": "sublist at end",
83
+ "property": "sublist",
84
+ "listOne": [3, 4, 5],
85
+ "listTwo": [0, 1, 2, 3, 4, 5],
86
+ "expected": "sublist"
87
+ },
88
+ {
89
+ "description": "at start of superlist",
90
+ "property": "sublist",
91
+ "listOne": [0, 1, 2, 3, 4, 5],
92
+ "listTwo": [0, 1, 2],
93
+ "expected": "superlist"
94
+ },
95
+ {
96
+ "description": "in middle of superlist",
97
+ "property": "sublist",
98
+ "listOne": [0, 1, 2, 3, 4, 5],
99
+ "listTwo": [2, 3],
100
+ "expected": "superlist"
101
+ },
102
+ {
103
+ "description": "at end of superlist",
104
+ "property": "sublist",
105
+ "listOne": [0, 1, 2, 3, 4, 5],
106
+ "listTwo": [3, 4, 5],
107
+ "expected": "superlist"
108
+ },
109
+ {
110
+ "description": "first list missing element from second list",
111
+ "property": "sublist",
112
+ "listOne": [1, 3],
113
+ "listTwo": [1, 2, 3],
114
+ "expected": "unequal"
115
+ },
116
+ {
117
+ "description": "second list missing element from first list",
118
+ "property": "sublist",
119
+ "listOne": [1, 2, 3],
120
+ "listTwo": [1, 3],
121
+ "expected": "unequal"
122
+ },
123
+ {
124
+ "description": "order matters to a list",
125
+ "property": "sublist",
126
+ "listOne": [1, 2, 3],
127
+ "listTwo": [3, 2, 1],
128
+ "expected": "unequal"
129
+ },
130
+ {
131
+ "description": "same digits but different numbers",
132
+ "property": "sublist",
133
+ "listOne": [1, 0, 1],
134
+ "listTwo": [10, 1],
135
+ "expected": "unequal"
136
+ }
137
+ ]
101
138
  }