Skip to content

Commit

Permalink
Refine Out_channel string/bytes generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jmid committed Nov 1, 2024
1 parent fa3f668 commit b2dbfc7
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit b2dbfc7

Please sign in to comment.