mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
ringbuffer create qtest
This commit is contained in:
parent
420f7c6bcc
commit
d66a5bc86f
1 changed files with 16 additions and 0 deletions
|
|
@ -199,6 +199,22 @@ struct
|
|||
buf = Array.empty
|
||||
}
|
||||
|
||||
(*$Q
|
||||
Q.small_int (fun i -> \
|
||||
let i = abs i in \
|
||||
let b = ByteBuffer.create i in \
|
||||
let open ByteBuffer in \
|
||||
b.size = i && b.bounded = false)
|
||||
*)
|
||||
|
||||
(*$Q
|
||||
Q.small_int (fun i -> \
|
||||
let i = abs i in \
|
||||
let b = ByteBuffer.create ~bounded:true i in \
|
||||
let open ByteBuffer in \
|
||||
b.size = i && b.bounded = true)
|
||||
*)
|
||||
|
||||
let copy b =
|
||||
{ b with buf=Array.copy b.buf; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue