|
|
@@ -131,6 +131,35 @@ public class TransposeTest {
|
|
131
|
131
|
|
|
132
|
132
|
@Ignore("Remove to run test")
|
|
133
|
133
|
@Test
|
|
|
134
|
+ public void mixedLineLength() {
|
|
|
135
|
+ String input = "The longest line.\n" +
|
|
|
136
|
+ "A long line.\n" +
|
|
|
137
|
+ "A longer line.\n" +
|
|
|
138
|
+ "A line.";
|
|
|
139
|
+
|
|
|
140
|
+ String expected = "TAAA\n" +
|
|
|
141
|
+ "h \n" +
|
|
|
142
|
+ "elll\n" +
|
|
|
143
|
+ " ooi\n" +
|
|
|
144
|
+ "lnnn\n" +
|
|
|
145
|
+ "ogge\n" +
|
|
|
146
|
+ "n e.\n" +
|
|
|
147
|
+ "glr\n" +
|
|
|
148
|
+ "ei \n" +
|
|
|
149
|
+ "snl\n" +
|
|
|
150
|
+ "tei\n" +
|
|
|
151
|
+ " .n\n" +
|
|
|
152
|
+ "l e\n" +
|
|
|
153
|
+ "i .\n" +
|
|
|
154
|
+ "n\n" +
|
|
|
155
|
+ "e\n" +
|
|
|
156
|
+ ".";
|
|
|
157
|
+
|
|
|
158
|
+ assertEquals(expected, transpose.transpose(input));
|
|
|
159
|
+ }
|
|
|
160
|
+
|
|
|
161
|
+ @Ignore("Remove to run test")
|
|
|
162
|
+ @Test
|
|
134
|
163
|
public void square() {
|
|
135
|
164
|
String input = "HEART\n" +
|
|
136
|
165
|
"EMBER\n" +
|
|
|
@@ -187,78 +216,4 @@ public class TransposeTest {
|
|
187
|
216
|
assertEquals(expected, transpose.transpose(input));
|
|
188
|
217
|
}
|
|
189
|
218
|
|
|
190
|
|
- @Ignore("Remove to run test")
|
|
191
|
|
- @Test
|
|
192
|
|
- public void manyLines() {
|
|
193
|
|
- String input = "Chor. Two households, both alike in dignity,\n" +
|
|
194
|
|
- "In fair Verona, where we lay our scene,\n" +
|
|
195
|
|
- "From ancient grudge break to new mutiny,\n" +
|
|
196
|
|
- "Where civil blood makes civil hands unclean.\n" +
|
|
197
|
|
- "From forth the fatal loins of these two foes\n" +
|
|
198
|
|
- "A pair of star-cross'd lovers take their life;\n" +
|
|
199
|
|
- "Whose misadventur'd piteous overthrows\n" +
|
|
200
|
|
- "Doth with their death bury their parents' strife.\n" +
|
|
201
|
|
- "The fearful passage of their death-mark'd love,\n" +
|
|
202
|
|
- "And the continuance of their parents' rage,\n" +
|
|
203
|
|
- "Which, but their children's end, naught could remove,\n" +
|
|
204
|
|
- "Is now the two hours' traffic of our stage;\n" +
|
|
205
|
|
- "The which if you with patient ears attend,\n" +
|
|
206
|
|
- "What here shall miss, our toil shall strive to mend.";
|
|
207
|
|
-
|
|
208
|
|
- String expected = "CIFWFAWDTAWITW\n" +
|
|
209
|
|
- "hnrhr hohnhshh\n" +
|
|
210
|
|
- "o oeopotedi ea\n" +
|
|
211
|
|
- "rfmrmash cn t\n" +
|
|
212
|
|
- ".a e ie fthow \n" +
|
|
213
|
|
- " ia fr weh,whh\n" +
|
|
214
|
|
- "Trnco miae ie\n" +
|
|
215
|
|
- "w ciroitr btcr\n" +
|
|
216
|
|
- "oVivtfshfcuhhe\n" +
|
|
217
|
|
- " eeih a uote \n" +
|
|
218
|
|
- "hrnl sdtln is\n" +
|
|
219
|
|
- "oot ttvh tttfh\n" +
|
|
220
|
|
- "un bhaeepihw a\n" +
|
|
221
|
|
- "saglernianeoyl\n" +
|
|
222
|
|
- "e,ro -trsui ol\n" +
|
|
223
|
|
- "h uofcu sarhu \n" +
|
|
224
|
|
- "owddarrdan o m\n" +
|
|
225
|
|
- "lhg to'egccuwi\n" +
|
|
226
|
|
- "deemasdaeehris\n" +
|
|
227
|
|
- "sr als t ists\n" +
|
|
228
|
|
- ",ebk 'phool'h,\n" +
|
|
229
|
|
- " reldi ffd \n" +
|
|
230
|
|
- "bweso tb rtpo\n" +
|
|
231
|
|
- "oea ileutterau\n" +
|
|
232
|
|
- "t kcnoorhhnatr\n" +
|
|
233
|
|
- "hl isvuyee'fi \n" +
|
|
234
|
|
- " atv es iisfet\n" +
|
|
235
|
|
- "ayoior trr ino\n" +
|
|
236
|
|
- "l lfsoh ecti\n" +
|
|
237
|
|
- "ion vedpn l\n" +
|
|
238
|
|
- "kuehtteieadoe \n" +
|
|
239
|
|
- "erwaharrar,fas\n" +
|
|
240
|
|
- " nekt te rh\n" +
|
|
241
|
|
- "ismdsehphnnosa\n" +
|
|
242
|
|
- "ncuse ra-tau l\n" +
|
|
243
|
|
- " et tormsural\n" +
|
|
244
|
|
- "dniuthwea'g t \n" +
|
|
245
|
|
- "iennwesnr hsts\n" +
|
|
246
|
|
- "g,ycoi tkrttet\n" +
|
|
247
|
|
- "n ,l r s'a anr\n" +
|
|
248
|
|
- "i ef 'dgcgdi\n" +
|
|
249
|
|
- "t aol eoe,v\n" +
|
|
250
|
|
- "y nei sl,u; e\n" +
|
|
251
|
|
- ", .sf to l \n" +
|
|
252
|
|
- " e rv d t\n" +
|
|
253
|
|
- " ; ie o\n" +
|
|
254
|
|
- " f, r \n" +
|
|
255
|
|
- " e e m\n" +
|
|
256
|
|
- " . m e\n" +
|
|
257
|
|
- " o n\n" +
|
|
258
|
|
- " v d\n" +
|
|
259
|
|
- " e .\n" +
|
|
260
|
|
- " ,";
|
|
261
|
|
-
|
|
262
|
|
- assertEquals(expected, transpose.transpose(input));
|
|
263
|
|
- }
|
|
264
|
219
|
}
|