mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
ringbuffer reset qtest
This commit is contained in:
parent
aecbbf0dcd
commit
d8c2bd9da5
1 changed files with 10 additions and 0 deletions
|
|
@ -370,6 +370,16 @@ struct
|
|||
clear b;
|
||||
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 take_front b =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue