mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
make some tests more random
This commit is contained in:
parent
67eae77105
commit
7c0ed782e4
1 changed files with 6 additions and 6 deletions
|
|
@ -421,13 +421,13 @@ struct
|
||||||
b.start <- 0;
|
b.start <- 0;
|
||||||
()
|
()
|
||||||
|
|
||||||
(*$T
|
(*$Q
|
||||||
let s = Bytes.of_string "hello world" in \
|
Q.printable_string (fun s -> \
|
||||||
let s_len = Bytes.length s in \
|
let s_len = Bytes.length s in \
|
||||||
let b = ByteBuffer.create s_len in \
|
let b = ByteBuffer.create s_len in \
|
||||||
ByteBuffer.blit_from b s 0 s_len; \
|
ByteBuffer.blit_from b s 0 s_len; \
|
||||||
ByteBuffer.clear b; \
|
ByteBuffer.clear b; \
|
||||||
ByteBuffer.length b = 0
|
ByteBuffer.length b = 0)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -435,13 +435,13 @@ struct
|
||||||
clear b;
|
clear b;
|
||||||
b.buf <- Array.empty
|
b.buf <- Array.empty
|
||||||
|
|
||||||
(*$T
|
(*$Q
|
||||||
let s = Bytes.of_string "hello world" in \
|
Q.printable_string (fun s -> \
|
||||||
let s_len = Bytes.length s in \
|
let s_len = Bytes.length s in \
|
||||||
let b = ByteBuffer.create s_len in \
|
let b = ByteBuffer.create s_len in \
|
||||||
ByteBuffer.blit_from b s 0 s_len; \
|
ByteBuffer.blit_from b s 0 s_len; \
|
||||||
ByteBuffer.reset b; \
|
ByteBuffer.reset b; \
|
||||||
ByteBuffer.length b = 0 && ByteBuffer.capacity b = 0
|
ByteBuffer.length b = 0 && ByteBuffer.capacity b = 0)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue