diff --git a/src/neg_tests/ref_test.ml b/src/neg_tests/ref_test.ml index be697c47f..604db7efc 100644 --- a/src/neg_tests/ref_test.ml +++ b/src/neg_tests/ref_test.ml @@ -36,7 +36,11 @@ struct let arb_cmd _s = let int_gen = Gen.nat in - QCheck.make ~print:show_cmd + let shrink_cmd c = match c with + | Set i -> Iter.map (fun i -> Set i) (Shrink.int i) + | Add i -> Iter.map (fun i -> Add i) (Shrink.int i) + | _ -> Iter.empty in + QCheck.make ~print:show_cmd ~shrink:shrink_cmd (Gen.oneof [Gen.return Get; Gen.map (fun i -> Set i) int_gen;