15011502150315041505150615071508150915101511
for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) { stream.writeLong(nwi.getNumber().longValue()); } stream.writeBit(1); stream.readBit(); for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) { BigInteger mask = BigInteger.valueOf(2).pow(Long.SIZE).subtract(BigInteger.ONE);
15271528152915301531153215331534153515361537
} finally { } try { Stream stream = new Stream(); stream.writeBit(1); stream.readUnsignedLong(); fail(); } catch (InsufficientBufferException ex) { } finally { }
15481549155015511552155315541555155615571558
@Test public void pReadLong_int() throws Exception { try { Stream stream = new Stream(); stream.writeBit(1); for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) { stream.writeLong(nwi.getNumber().longValue(), nwi.getBits()); }
15541555155615571558155915601561156215631564
for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) { stream.writeLong(nwi.getNumber().longValue(), nwi.getBits()); } stream.writeBit(1); stream.readBit(); for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) { if (nwi.isNormal()) {
15931594159515961597159815991600160116021603
} finally { } try { Stream stream = new Stream(); stream.writeBit(1); stream.readLong(2); fail(); } catch (InsufficientBufferException ex) { } finally { }
16141615161616171618161916201621162216231624
@Test public void pReadUnsignedLong_int() throws Exception { try { Stream stream = new Stream(); stream.writeBit(1); for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) { stream.writeLong(nwi.getNumber().longValue(), nwi.getBits()); }
16201621162216231624162516261627162816291630
for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) { stream.writeLong(nwi.getNumber().longValue(), nwi.getBits()); } stream.writeBit(1); stream.readBit(); for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) { BigInteger mask = BigInteger.valueOf(2).pow(nwi.getBits()).subtract(BigInteger.ONE);
16511652165316541655165616571658165916601661
} finally { } try { Stream stream = new Stream(); stream.writeBit(1); stream.readUnsignedLong(2); fail(); } catch (InsufficientBufferException ex) { } finally { }
16721673167416751676167716781679168016811682
@Test public void pReadVarLong_void() throws Exception { try { Stream stream = new Stream(); stream.writeBit(1); int max = (int )(Math.pow(2, RT.INT62) * Byte.SIZE - 2); for (NumWithInfo nwi : genNumWithInfos(max)) { if (nwi.getBits() < max) {
16861687168816891690169116921693169416951696
} stream.writeVarLong(nwi.getNumber().longValue()); } stream.writeBit(1); stream.readBit(); for (NumWithInfo nwi : genNumWithInfos(max)) { if (nwi.getBits() < max) {