Skip to content

Commit

Permalink
Merge pull request #437 from ocaml-multicore/stm-floatarray-tinks
Browse files Browse the repository at this point in the history
STM Float.Array test tinkering
  • Loading branch information
jmid authored Feb 26, 2024
2 parents 7b9b1c1 + 08ff3b4 commit cf033fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/floatarray/stm_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ struct
type sut = Float.Array.t

let arb_cmd s =
let int_gen = Gen.(oneof [small_nat; int_bound (List.length s - 1)]) in
let int_gen = Gen.(frequency [ (1,small_nat);
(7,int_bound (List.length s - 1)); ]) in
let float_gen = Gen.float in
QCheck.make ~print:show_cmd (*~shrink:shrink_cmd*)
Gen.(oneof
Expand Down Expand Up @@ -124,7 +125,7 @@ struct
if i < 0 || l < 0 || i+l > List.length s
then r = Error (Invalid_argument "Float.Array.fill")
else r = Ok ()
| To_list, Res ((List Float,_),fs) -> fs = s
| To_list, Res ((List Float,_),fs) -> List.equal Float.equal fs s
| Mem f, Res ((Bool,_),r) -> r = List.mem f s
| Sort, Res ((Unit,_),r) -> r = ()
| To_seq, Res ((Seq Float,_),r) -> Seq.equal (=) r (List.to_seq s)
Expand Down

0 comments on commit cf033fc

Please sign in to comment.