trackler 2.0.8.17 → 2.0.8.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,240 +1,253 @@
1
1
  {
2
- "#": [
3
- "JSON doesn't allow for multi-line strings, so all multi-line input is ",
4
- "presented here as arrays of strings. It's up to the test generator to join the ",
5
- "lines together with line breaks."
2
+ "exercise": "transpose",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "JSON doesn't allow for multi-line strings, so all multi-line input is ",
6
+ "presented here as arrays of strings. It's up to the test generator to join the ",
7
+ "lines together with line breaks."
6
8
  ],
7
9
  "cases": [
8
10
  {
9
11
  "description": "empty string",
12
+ "property": "transpose",
10
13
  "input": [],
11
14
  "expected": []
12
15
  },
13
16
  {
14
17
  "description": "two characters in a row",
18
+ "property": "transpose",
15
19
  "input": ["A1"],
16
- "expected": [
17
- "A",
18
- "1"
19
- ]
20
+ "expected": [
21
+ "A",
22
+ "1"
23
+ ]
20
24
  },
21
25
  {
22
26
  "description": "two characters in a column",
27
+ "property": "transpose",
23
28
  "input": [
24
- "A",
25
- "1"
29
+ "A",
30
+ "1"
26
31
  ],
27
32
  "expected": [
28
- "A1"
29
- ]
33
+ "A1"
34
+ ]
30
35
  },
31
36
  {
32
37
  "description": "simple",
33
- "input": [
34
- "ABC",
35
- "123"
36
- ],
37
- "expected": [
38
- "A1",
39
- "B2",
40
- "C3"
41
- ]
38
+ "property": "transpose",
39
+ "input": [
40
+ "ABC",
41
+ "123"
42
+ ],
43
+ "expected": [
44
+ "A1",
45
+ "B2",
46
+ "C3"
47
+ ]
42
48
  },
43
49
  {
44
50
  "description": "single line",
51
+ "property": "transpose",
45
52
  "input": ["Single line."],
46
- "expected": [
47
- "S",
48
- "i",
49
- "n",
50
- "g",
51
- "l",
52
- "e",
53
- " ",
54
- "l",
55
- "i",
56
- "n",
57
- "e",
58
- "."
59
- ]
53
+ "expected": [
54
+ "S",
55
+ "i",
56
+ "n",
57
+ "g",
58
+ "l",
59
+ "e",
60
+ " ",
61
+ "l",
62
+ "i",
63
+ "n",
64
+ "e",
65
+ "."
66
+ ]
60
67
  },
61
68
  {
62
69
  "description": "first line longer than second line",
63
- "input": [
64
- "The fourth line.",
65
- "The fifth line."
66
- ],
67
- "expected": [
68
- "TT",
69
- "hh",
70
- "ee",
71
- " ",
72
- "ff",
73
- "oi",
74
- "uf",
75
- "rt",
76
- "th",
77
- "h ",
78
- " l",
79
- "li",
80
- "in",
81
- "ne",
82
- "e.",
83
- "."
84
- ]
70
+ "property": "transpose",
71
+ "input": [
72
+ "The fourth line.",
73
+ "The fifth line."
74
+ ],
75
+ "expected": [
76
+ "TT",
77
+ "hh",
78
+ "ee",
79
+ " ",
80
+ "ff",
81
+ "oi",
82
+ "uf",
83
+ "rt",
84
+ "th",
85
+ "h ",
86
+ " l",
87
+ "li",
88
+ "in",
89
+ "ne",
90
+ "e.",
91
+ "."
92
+ ]
85
93
  },
86
94
  {
87
95
  "description": "second line longer than first line",
88
- "input": [
89
- "The first line.",
90
- "The second line."
91
- ],
92
- "expected": [
93
- "TT",
94
- "hh",
95
- "ee",
96
- " ",
97
- "fs",
98
- "ie",
99
- "rc",
100
- "so",
101
- "tn",
102
- " d",
103
- "l ",
104
- "il",
105
- "ni",
106
- "en",
107
- ".e",
108
- " ."
109
- ]
96
+ "property": "transpose",
97
+ "input": [
98
+ "The first line.",
99
+ "The second line."
100
+ ],
101
+ "expected": [
102
+ "TT",
103
+ "hh",
104
+ "ee",
105
+ " ",
106
+ "fs",
107
+ "ie",
108
+ "rc",
109
+ "so",
110
+ "tn",
111
+ " d",
112
+ "l ",
113
+ "il",
114
+ "ni",
115
+ "en",
116
+ ".e",
117
+ " ."
118
+ ]
110
119
  },
111
120
  {
112
121
  "description": "square",
113
- "input": [
114
- "HEART",
115
- "EMBER",
116
- "ABUSE",
117
- "RESIN",
118
- "TREND"
119
- ],
122
+ "property": "transpose",
123
+ "input": [
124
+ "HEART",
125
+ "EMBER",
126
+ "ABUSE",
127
+ "RESIN",
128
+ "TREND"
129
+ ],
120
130
  "expected": [
121
- "HEART",
122
- "EMBER",
123
- "ABUSE",
124
- "RESIN",
125
- "TREND"
126
- ]
131
+ "HEART",
132
+ "EMBER",
133
+ "ABUSE",
134
+ "RESIN",
135
+ "TREND"
136
+ ]
127
137
  },
128
138
  {
129
139
  "description": "rectangle",
130
- "input": [
131
- "FRACTURE",
132
- "OUTLINED",
133
- "BLOOMING",
134
- "SEPTETTE"
135
- ],
136
- "expected": [
137
- "FOBS",
138
- "RULE",
139
- "ATOP",
140
- "CLOT",
141
- "TIME",
142
- "UNIT",
143
- "RENT",
144
- "EDGE"
145
- ]
140
+ "property": "transpose",
141
+ "input": [
142
+ "FRACTURE",
143
+ "OUTLINED",
144
+ "BLOOMING",
145
+ "SEPTETTE"
146
+ ],
147
+ "expected": [
148
+ "FOBS",
149
+ "RULE",
150
+ "ATOP",
151
+ "CLOT",
152
+ "TIME",
153
+ "UNIT",
154
+ "RENT",
155
+ "EDGE"
156
+ ]
146
157
  },
147
158
  {
148
159
  "description": "triangle",
149
- "input": [
150
- "T",
151
- "EE",
152
- "AAA",
153
- "SSSS",
154
- "EEEEE",
155
- "RRRRRR"
156
- ],
157
- "expected": [
158
- "TEASER",
159
- " EASER",
160
- " ASER",
161
- " SER",
162
- " ER",
163
- " R"
164
- ]
160
+ "property": "transpose",
161
+ "input": [
162
+ "T",
163
+ "EE",
164
+ "AAA",
165
+ "SSSS",
166
+ "EEEEE",
167
+ "RRRRRR"
168
+ ],
169
+ "expected": [
170
+ "TEASER",
171
+ " EASER",
172
+ " ASER",
173
+ " SER",
174
+ " ER",
175
+ " R"
176
+ ]
165
177
  },
166
178
  {
167
179
  "description": "many lines",
168
- "input": [
169
- "Chor. Two households, both alike in dignity,",
170
- "In fair Verona, where we lay our scene,",
171
- "From ancient grudge break to new mutiny,",
172
- "Where civil blood makes civil hands unclean.",
173
- "From forth the fatal loins of these two foes",
174
- "A pair of star-cross'd lovers take their life;",
175
- "Whose misadventur'd piteous overthrows",
176
- "Doth with their death bury their parents' strife.",
177
- "The fearful passage of their death-mark'd love,",
178
- "And the continuance of their parents' rage,",
179
- "Which, but their children's end, naught could remove,",
180
- "Is now the two hours' traffic of our stage;",
181
- "The which if you with patient ears attend,",
182
- "What here shall miss, our toil shall strive to mend."
183
- ],
184
- "expected": [
185
- "CIFWFAWDTAWITW",
186
- "hnrhr hohnhshh",
187
- "o oeopotedi ea",
188
- "rfmrmash cn t",
189
- ".a e ie fthow ",
190
- " ia fr weh,whh",
191
- "Trnco miae ie",
192
- "w ciroitr btcr",
193
- "oVivtfshfcuhhe",
194
- " eeih a uote ",
195
- "hrnl sdtln is",
196
- "oot ttvh tttfh",
197
- "un bhaeepihw a",
198
- "saglernianeoyl",
199
- "e,ro -trsui ol",
200
- "h uofcu sarhu ",
201
- "owddarrdan o m",
202
- "lhg to'egccuwi",
203
- "deemasdaeehris",
204
- "sr als t ists",
205
- ",ebk 'phool'h,",
206
- " reldi ffd ",
207
- "bweso tb rtpo",
208
- "oea ileutterau",
209
- "t kcnoorhhnatr",
210
- "hl isvuyee'fi ",
211
- " atv es iisfet",
212
- "ayoior trr ino",
213
- "l lfsoh ecti",
214
- "ion vedpn l",
215
- "kuehtteieadoe ",
216
- "erwaharrar,fas",
217
- " nekt te rh",
218
- "ismdsehphnnosa",
219
- "ncuse ra-tau l",
220
- " et tormsural",
221
- "dniuthwea'g t ",
222
- "iennwesnr hsts",
223
- "g,ycoi tkrttet",
224
- "n ,l r s'a anr",
225
- "i ef 'dgcgdi",
226
- "t aol eoe,v",
227
- "y nei sl,u; e",
228
- ", .sf to l ",
229
- " e rv d t",
230
- " ; ie o",
231
- " f, r ",
232
- " e e m",
233
- " . m e",
234
- " o n",
235
- " v d",
236
- " e .",
237
- " ,"
180
+ "property": "transpose",
181
+ "input": [
182
+ "Chor. Two households, both alike in dignity,",
183
+ "In fair Verona, where we lay our scene,",
184
+ "From ancient grudge break to new mutiny,",
185
+ "Where civil blood makes civil hands unclean.",
186
+ "From forth the fatal loins of these two foes",
187
+ "A pair of star-cross'd lovers take their life;",
188
+ "Whose misadventur'd piteous overthrows",
189
+ "Doth with their death bury their parents' strife.",
190
+ "The fearful passage of their death-mark'd love,",
191
+ "And the continuance of their parents' rage,",
192
+ "Which, but their children's end, naught could remove,",
193
+ "Is now the two hours' traffic of our stage;",
194
+ "The which if you with patient ears attend,",
195
+ "What here shall miss, our toil shall strive to mend."
196
+ ],
197
+ "expected": [
198
+ "CIFWFAWDTAWITW",
199
+ "hnrhr hohnhshh",
200
+ "o oeopotedi ea",
201
+ "rfmrmash cn t",
202
+ ".a e ie fthow ",
203
+ " ia fr weh,whh",
204
+ "Trnco miae ie",
205
+ "w ciroitr btcr",
206
+ "oVivtfshfcuhhe",
207
+ " eeih a uote ",
208
+ "hrnl sdtln is",
209
+ "oot ttvh tttfh",
210
+ "un bhaeepihw a",
211
+ "saglernianeoyl",
212
+ "e,ro -trsui ol",
213
+ "h uofcu sarhu ",
214
+ "owddarrdan o m",
215
+ "lhg to'egccuwi",
216
+ "deemasdaeehris",
217
+ "sr als t ists",
218
+ ",ebk 'phool'h,",
219
+ " reldi ffd ",
220
+ "bweso tb rtpo",
221
+ "oea ileutterau",
222
+ "t kcnoorhhnatr",
223
+ "hl isvuyee'fi ",
224
+ " atv es iisfet",
225
+ "ayoior trr ino",
226
+ "l lfsoh ecti",
227
+ "ion vedpn l",
228
+ "kuehtteieadoe ",
229
+ "erwaharrar,fas",
230
+ " nekt te rh",
231
+ "ismdsehphnnosa",
232
+ "ncuse ra-tau l",
233
+ " et tormsural",
234
+ "dniuthwea'g t ",
235
+ "iennwesnr hsts",
236
+ "g,ycoi tkrttet",
237
+ "n ,l r s'a anr",
238
+ "i ef 'dgcgdi",
239
+ "t aol eoe,v",
240
+ "y nei sl,u; e",
241
+ ", .sf to l ",
242
+ " e rv d t",
243
+ " ; ie o",
244
+ " f, r ",
245
+ " e e m",
246
+ " . m e",
247
+ " o n",
248
+ " v d",
249
+ " e .",
250
+ " ,"
238
251
  ]
239
252
  }
240
253
  ]