fix pvec tests

(make choose's result irrelevant, only test whether it returns)
This commit is contained in:
Simon Cruanes 2024-01-05 21:54:41 -05:00
parent 66b42ea944
commit 03e253a31c
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -93,8 +93,8 @@ module Ref_impl = struct
let choose l = let choose l =
match l with match l with
| [] -> None | [] -> false
| x :: _ -> Some x | _ :: _ -> true
end end
module Op = struct module Op = struct
@ -230,7 +230,7 @@ let check_ops ~show_x (ops : 'a Op.t list) : unit =
| Op.Check_to_list -> | Op.Check_to_list ->
if to_list !cur <> Ref_impl.to_list !cur_ref then fail () if to_list !cur <> Ref_impl.to_list !cur_ref then fail ()
| Op.Check_choose -> | Op.Check_choose ->
if choose !cur <> Ref_impl.choose !cur_ref then fail () if Option.is_some (choose !cur) <> Ref_impl.choose !cur_ref then fail ()
| Op.Check_to_gen -> | Op.Check_to_gen ->
if if
to_seq !cur |> CCSeq.to_list to_seq !cur |> CCSeq.to_list