mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
ringbuffer clear qtest
This commit is contained in:
parent
a2a6d28229
commit
aecbbf0dcd
1 changed files with 10 additions and 0 deletions
|
|
@ -356,6 +356,16 @@ struct
|
|||
b.start <- 0;
|
||||
()
|
||||
|
||||
(*$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.clear b; \
|
||||
ByteBuffer.length b = 0
|
||||
*)
|
||||
|
||||
|
||||
let reset b =
|
||||
clear b;
|
||||
b.buf <- Array.empty
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue