Document empty block. Formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508936 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e33dced746
commit
9599bfe743
|
@ -174,23 +174,29 @@ public class ExtendedBufferedReaderTest {
|
||||||
final String LF="\n"; final String CR="\r"; final String CRLF=CR+LF; final String LFCR=LF+CR;// easier to read the string below
|
final String LF="\n"; final String CR="\r"; final String CRLF=CR+LF; final String LFCR=LF+CR;// easier to read the string below
|
||||||
final String test="a" + LF + "b" + CR + "c" + LF + LF + "d" + CR + CR + "e" + LFCR + "f "+ CRLF;
|
final String test="a" + LF + "b" + CR + "c" + LF + LF + "d" + CR + CR + "e" + LFCR + "f "+ CRLF;
|
||||||
// EOL eol EOL EOL eol eol EOL+CR EOL
|
// EOL eol EOL EOL eol eol EOL+CR EOL
|
||||||
final int EOLeolct=9;
|
final int EOLeolct = 9;
|
||||||
ExtendedBufferedReader br;
|
ExtendedBufferedReader br;
|
||||||
|
|
||||||
br = getBufferedReader(test);
|
br = getBufferedReader(test);
|
||||||
assertEquals(0, br.getCurrentLineNumber());
|
assertEquals(0, br.getCurrentLineNumber());
|
||||||
while(br.readLine()!=null) {}
|
while (br.readLine() != null) {
|
||||||
|
// consume all
|
||||||
|
}
|
||||||
assertEquals(EOLeolct, br.getCurrentLineNumber());
|
assertEquals(EOLeolct, br.getCurrentLineNumber());
|
||||||
|
|
||||||
br = getBufferedReader(test);
|
br = getBufferedReader(test);
|
||||||
assertEquals(0, br.getCurrentLineNumber());
|
assertEquals(0, br.getCurrentLineNumber());
|
||||||
while(br.read()!=-1) {}
|
while (br.read() != -1) {
|
||||||
|
// consume all
|
||||||
|
}
|
||||||
assertEquals(EOLeolct, br.getCurrentLineNumber());
|
assertEquals(EOLeolct, br.getCurrentLineNumber());
|
||||||
|
|
||||||
br = getBufferedReader(test);
|
br = getBufferedReader(test);
|
||||||
assertEquals(0, br.getCurrentLineNumber());
|
assertEquals(0, br.getCurrentLineNumber());
|
||||||
final char[] buff = new char[10];
|
final char[] buff = new char[10];
|
||||||
while(br.read(buff ,0, 3)!=-1) {}
|
while (br.read(buff, 0, 3) != -1) {
|
||||||
|
// consume all
|
||||||
|
}
|
||||||
assertEquals(EOLeolct, br.getCurrentLineNumber());
|
assertEquals(EOLeolct, br.getCurrentLineNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue