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.
- checksums.yaml +4 -4
- data/common/exercises/forth/canonical-data.json +307 -321
- data/common/exercises/largest-series-product/canonical-data.json +139 -122
- data/common/exercises/list-ops/canonical-data.json +162 -141
- data/common/exercises/markdown/canonical-data.json +15 -14
- data/common/exercises/pov/canonical-data.json +264 -116
- data/common/exercises/prime-factors/canonical-data.json +51 -40
- data/common/exercises/rail-fence-cipher/canonical-data.json +56 -44
- data/common/exercises/react/canonical-data.json +18 -4
- data/common/exercises/rectangles/canonical-data.json +16 -1
- data/common/exercises/rotational-cipher/canonical-data.json +81 -67
- data/common/exercises/run-length-encoding/canonical-data.json +89 -71
- data/common/exercises/space-age/canonical-data.json +61 -45
- data/common/exercises/sublist/canonical-data.json +136 -99
- data/common/exercises/transpose/canonical-data.json +207 -194
- data/common/exercises/variable-length-quantity/canonical-data.json +171 -141
- data/lib/trackler/version.rb +1 -1
- data/tracks/csharp/exercises/diamond/HINTS.md +9 -0
- data/tracks/go/README.md +3 -0
- data/tracks/go/exercises/queen-attack/queen_attack_test.go +1 -1
- data/tracks/haskell/exercises/hamming/src/Hamming.hs +2 -1
- data/tracks/java/exercises/flatten-array/src/test/java/FlattenerTest.java +5 -0
- data/tracks/ocaml/exercises/anagram/test.ml +2 -2
- data/tracks/ocaml/tools/test-generator/src/controller.ml +7 -2
- data/tracks/ocaml/tools/test-generator/src/parser.ml +31 -18
- data/tracks/ocaml/tools/test-generator/src/template.ml +10 -8
- data/tracks/ocaml/tools/test-generator/src/utils.ml +11 -0
- data/tracks/ocaml/tools/test-generator/templates/phone-number/template.ml +4 -5
- data/tracks/ocaml/tools/test-generator/test/beer-song.json +77 -0
- data/tracks/ocaml/tools/test-generator/test/difference_of_squares.json +76 -62
- data/tracks/ocaml/tools/test-generator/test/parser_test.ml +11 -9
- data/tracks/ocaml/tools/test-generator/test/template_test.ml +2 -2
- metadata +4 -2
@@ -1,240 +1,253 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
18
|
-
|
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
|
-
|
25
|
-
|
29
|
+
"A",
|
30
|
+
"1"
|
26
31
|
],
|
27
32
|
"expected": [
|
28
|
-
|
29
|
-
|
33
|
+
"A1"
|
34
|
+
]
|
30
35
|
},
|
31
36
|
{
|
32
37
|
"description": "simple",
|
33
|
-
"
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
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
|
-
"
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
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
|
-
"
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
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
|
-
"
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
122
|
+
"property": "transpose",
|
123
|
+
"input": [
|
124
|
+
"HEART",
|
125
|
+
"EMBER",
|
126
|
+
"ABUSE",
|
127
|
+
"RESIN",
|
128
|
+
"TREND"
|
129
|
+
],
|
120
130
|
"expected": [
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
131
|
+
"HEART",
|
132
|
+
"EMBER",
|
133
|
+
"ABUSE",
|
134
|
+
"RESIN",
|
135
|
+
"TREND"
|
136
|
+
]
|
127
137
|
},
|
128
138
|
{
|
129
139
|
"description": "rectangle",
|
130
|
-
"
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
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
|
-
"
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
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
|
-
"
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
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
|
]
|