@@ -219,29 +219,25 @@ public void testEarlyEnd() {
219219 @ Test
220220 public void testInvertible () {
221221 String testNoTags = "This sentence should be invertible." ;
222- String testTags =
223- " <xml> This sentence should be invertible. </xml > " ;
224- String testManyTags =
225- " <xml> <foo> <bar> This sentence should " +
226- " </bar>be invertible. </foo> </xml> " ;
222+ String [] testInvertibles = { " <xml> This sentence should be invertible. </xml> " ,
223+ " <xml> <foo> <bar> This sentence should </bar>be invertible. </foo > </xml> " ,
224+ " This sentence <xml>should</xml> be invertible. " ,
225+ " This sentence<xml> should </xml>be invertible. " ,
226+ " This sentence <xml> should </xml> be invertible. " } ;
227227
228228 Annotation annotation = annotate (testNoTags , ptbInvertible ,
229229 cleanXmlAllTags , wtsSplitter );
230230 checkResult (annotation , testNoTags );
231231 checkBeforeInvert (annotation , testNoTags );
232232 checkAfterInvert (annotation , testNoTags );
233233
234- annotation = annotate (testTags , ptbInvertible ,
235- cleanXmlAllTags , wtsSplitter );
236- checkResult (annotation , testNoTags );
237- checkBeforeInvert (annotation , testTags );
238- checkAfterInvert (annotation , testTags );
239-
240- annotation = annotate (testManyTags , ptbInvertible ,
241- cleanXmlAllTags , wtsSplitter );
242- checkResult (annotation , testNoTags );
243- checkBeforeInvert (annotation , testManyTags );
244- checkAfterInvert (annotation , testManyTags );
234+ for (String test : testInvertibles ) {
235+ annotation = annotate (test , ptbInvertible ,
236+ cleanXmlAllTags , wtsSplitter );
237+ checkResult (annotation , testNoTags );
238+ checkBeforeInvert (annotation , test );
239+ checkAfterInvert (annotation , test );
240+ }
245241 }
246242
247243 @ Test
0 commit comments