ringbuffer reset qtest

This commit is contained in:
carm 2015-02-22 18:53:16 -05:00
parent aecbbf0dcd
commit d8c2bd9da5

View file

@ -370,6 +370,16 @@ struct
clear b; clear b;
b.buf <- Array.empty b.buf <- Array.empty
(*$T
let s = Bytes.of_string "hello world" in \
let s_len = Bytes.length s in \
let b = ByteBuffer.create s_len in \
ByteBuffer.blit_from b s 0 s_len; \
ByteBuffer.reset b; \
ByteBuffer.length b = 0 && ByteBuffer.capacity b = 0
*)
let is_empty b = b.start = b.stop let is_empty b = b.start = b.stop
let take_front b = let take_front b =