Skip to content

Commit e00effe

Browse files
Add transpose test cases
1 parent 80c7f7b commit e00effe

File tree

1 file changed

+231
-0
lines changed

1 file changed

+231
-0
lines changed

transpose.json

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

0 commit comments

Comments
 (0)