Skip to content

Commit ea5d9bb

Browse files
committed
test pvec: avoid size explosion
1 parent 9ec34f8 commit ea5d9bb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/pvec/t_pvec.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,14 @@ module Op = struct
265265
( 1,
266266
list_small gen_x >|= fun l ->
267267
Append l, size + List.length l );
268+
];
269+
(if size < 10_000 then [
270+
(* flat map can explode, only do it if list isn't too big *)
268271
( 1,
269272
list_size (0 -- 5) gen_x >|= fun l ->
270273
Flat_map l, size * (1 + List.length l) );
271-
];
274+
] else [])
275+
;
272276
]
273277
in
274278

0 commit comments

Comments
 (0)