use of tests.support.ThrowingReader in project j2objc by google.
the class OldBufferedReaderTest method testSourceThrowsWithMark.
public void testSourceThrowsWithMark() throws IOException {
br = new BufferedReader(new ThrowingReader(new StringReader("ABCDEFGHI"), 4));
br.read();
br.read();
br.mark(10);
br.read();
br.read();
try {
br.read();
fail();
} catch (IOException fromThrowingReader) {
}
assertEquals('E', br.read());
assertEquals('F', br.read());
}
use of tests.support.ThrowingReader in project robovm by robovm.
the class OldBufferedReaderTest method testSourceThrowsWithMark.
public void testSourceThrowsWithMark() throws IOException {
br = new BufferedReader(new ThrowingReader(new StringReader("ABCDEFGHI"), 4));
br.read();
br.read();
br.mark(10);
br.read();
br.read();
try {
br.read();
fail();
} catch (IOException fromThrowingReader) {
}
assertEquals('E', br.read());
assertEquals('F', br.read());
}
Aggregations