We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28e142a commit 61317f1Copy full SHA for 61317f1
src/array/stm_tests.ml
@@ -51,9 +51,11 @@ struct
51
type state = elem list
52
type sut = elem Array.t
53
54
+ let power_of_2s = Array.init 63 (fun i -> 1 lsl i)
55
+
56
let arb_cmd s =
57
let int_gen = Gen.(frequency [1,small_nat; 5,int_bound (List.length s - 1)]) in
- let elem_gen = Gen.(map (fun sh -> 1 lsl sh) (int_bound 62)) in
58
+ let elem_gen = Gen.oneofa power_of_2s in
59
QCheck.make ~print:show_cmd (*~shrink:shrink_cmd*)
60
Gen.(oneof
61
[ return Length;
@@ -160,7 +162,6 @@ struct
160
162
| To_seq, Res ((Seq Elem,_),r) -> Seq.equal (=) r (List.to_seq s)
161
163
| _, _ -> false
164
- let power_of_2s = Array.init 63 (fun i -> 1 lsl i)
165
let is_power_of_2 i = Array.mem i power_of_2s
166
167
let postcond_tear c (s:int list) res = match c, res with
0 commit comments