Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine Out_channel string/bytes generator #483

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/io/stm_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ struct
let int64_gen = Gen.(map Int64.of_int small_int) in
let char_gen = Gen.printable in
let byte_gen = Gen.small_int in
let string_gen = Gen.small_string in
let bytes_gen = Gen.bytes_small in
let size_gen =
Gen.(map2 (fun pos size_adj ->
let res = 1 lsl (pos-1) in
if size_adj < res then res-size_adj else res) (int_bound 18) (int_bound 10)) in
let string_gen = Gen.(string_size (oneof [small_nat; size_gen])) in
let bytes_gen = Gen.(bytes_size (oneof [small_nat; size_gen])) in
QCheck.make ~print:show_cmd (*~shrink:shrink_cmd*)
(match s with
| Closed ->
Expand Down
Loading