Remove redundant syntax

This commit is contained in:
Gary Gregory 2024-09-12 10:18:50 -04:00
parent 55a9cb915a
commit 295e91a27a
1 changed files with 14 additions and 14 deletions

View File

@ -651,30 +651,30 @@ public class StrTokenizerTest extends AbstractLangTest {
} }
private void testCSV(final String data) { private void testCSV(final String data) {
this.testXSVAbc(StrTokenizer.getCSVInstance(data)); testXSVAbc(StrTokenizer.getCSVInstance(data));
this.testXSVAbc(StrTokenizer.getCSVInstance(data.toCharArray())); testXSVAbc(StrTokenizer.getCSVInstance(data.toCharArray()));
} }
@Test @Test
public void testCSVEmpty() { public void testCSVEmpty() {
this.testEmpty(StrTokenizer.getCSVInstance()); testEmpty(StrTokenizer.getCSVInstance());
this.testEmpty(StrTokenizer.getCSVInstance("")); testEmpty(StrTokenizer.getCSVInstance(""));
} }
@Test @Test
public void testCSVSimple() { public void testCSVSimple() {
this.testCSV(CSV_SIMPLE_FIXTURE); testCSV(CSV_SIMPLE_FIXTURE);
} }
@Test @Test
public void testCSVSimpleNeedsTrim() { public void testCSVSimpleNeedsTrim() {
this.testCSV(" " + CSV_SIMPLE_FIXTURE); testCSV(" " + CSV_SIMPLE_FIXTURE);
this.testCSV(" \n\t " + CSV_SIMPLE_FIXTURE); testCSV(" \n\t " + CSV_SIMPLE_FIXTURE);
this.testCSV(" \n " + CSV_SIMPLE_FIXTURE + "\n\n\r"); testCSV(" \n " + CSV_SIMPLE_FIXTURE + "\n\n\r");
} }
void testEmpty(final StrTokenizer tokenizer) { void testEmpty(final StrTokenizer tokenizer) {
this.checkClone(tokenizer); checkClone(tokenizer);
assertFalse(tokenizer.hasNext()); assertFalse(tokenizer.hasNext());
assertFalse(tokenizer.hasPrevious()); assertFalse(tokenizer.hasPrevious());
assertNull(tokenizer.nextToken()); assertNull(tokenizer.nextToken());
@ -810,18 +810,18 @@ public class StrTokenizerTest extends AbstractLangTest {
@Test @Test
public void testTSV() { public void testTSV() {
this.testXSVAbc(StrTokenizer.getTSVInstance(TSV_SIMPLE_FIXTURE)); testXSVAbc(StrTokenizer.getTSVInstance(TSV_SIMPLE_FIXTURE));
this.testXSVAbc(StrTokenizer.getTSVInstance(TSV_SIMPLE_FIXTURE.toCharArray())); testXSVAbc(StrTokenizer.getTSVInstance(TSV_SIMPLE_FIXTURE.toCharArray()));
} }
@Test @Test
public void testTSVEmpty() { public void testTSVEmpty() {
this.testEmpty(StrTokenizer.getTSVInstance()); testEmpty(StrTokenizer.getTSVInstance());
this.testEmpty(StrTokenizer.getTSVInstance("")); testEmpty(StrTokenizer.getTSVInstance(""));
} }
void testXSVAbc(final StrTokenizer tokenizer) { void testXSVAbc(final StrTokenizer tokenizer) {
this.checkClone(tokenizer); checkClone(tokenizer);
assertEquals(-1, tokenizer.previousIndex()); assertEquals(-1, tokenizer.previousIndex());
assertEquals(0, tokenizer.nextIndex()); assertEquals(0, tokenizer.nextIndex());
assertNull(tokenizer.previousToken()); assertNull(tokenizer.previousToken());