From 68b8f405565bf0eb8d19569c4926ce6e58042a3c Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Thu, 19 Dec 2024 16:21:16 +0100 Subject: [PATCH] Generate small Dynarrays in Make --- src/dynarray/stm_tests.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dynarray/stm_tests.ml b/src/dynarray/stm_tests.ml index 4160f6e3..ea13ab4c 100644 --- a/src/dynarray/stm_tests.ml +++ b/src/dynarray/stm_tests.ml @@ -170,7 +170,6 @@ module Dynarray_spec (Elem : Elem) = struct let arb_cmd state : cmd QCheck.arbitrary = let open Gen in - let mid_int = Gen.int_bound 11_000 in let arr_idx state = map (fun i -> I i) (int_bound (List.length state - 1)) in let elem = Elem.arb.gen in let array elm_gen = Gen.array_size small_nat elm_gen in @@ -178,7 +177,7 @@ module Dynarray_spec (Elem : Elem) = struct QCheck.make ~print:show_cmd (frequency [ 5, return Create; - 5, map2 (fun l x -> Make (l, x)) mid_int elem; + 5, map2 (fun l x -> Make (l, x)) small_nat elem; 50, map2 (fun arr_idx elem_idx -> Get (arr_idx, elem_idx)) (arr_idx state) small_nat; 50, map3 (fun arr_idx elem_idx x -> Set (arr_idx, elem_idx, x)) (arr_idx state) small_nat elem; 50, map (fun i -> Is_empty i) (arr_idx state);