11131114111511161117111811191120112111221123
stream.writeBit(1); stream.readBit(); for (int i = 0; i < sampleShorts().length; i++) { assertEquals(sampleShorts()[i] & 0xffff, stream.readUnsignedShort()); } assertEquals(1, stream.getData().readable()); } finally { }
11251126112711281129113011311132113311341135
@Test public void fReadUnsignedShort_void() throws Exception { try { Stream stream = new Stream(); stream.readUnsignedShort(); fail(); } catch (EOFException ex) { } finally { }
11341135113611371138113911401141114211431144
} try { Stream stream = new Stream(); stream.writeBit(1); stream.readUnsignedShort(); fail(); } catch (InsufficientBufferException ex) { } finally { }
11431144114511461147114811491150115111521153
} try { Stream stream = new Stream(); stream.write(1); stream.readUnsignedShort(); fail(); } catch (InsufficientBufferException ex) { } finally { } }