From 03e253a31c11077652e1a5d943e0c0d7c0eaca79 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 5 Jan 2024 21:54:41 -0500 Subject: [PATCH] fix pvec tests (make choose's result irrelevant, only test whether it returns) --- tests/pvec/t_pvec.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/pvec/t_pvec.ml b/tests/pvec/t_pvec.ml index a82951ac..25c7391a 100644 --- a/tests/pvec/t_pvec.ml +++ b/tests/pvec/t_pvec.ml @@ -93,8 +93,8 @@ module Ref_impl = struct let choose l = match l with - | [] -> None - | x :: _ -> Some x + | [] -> false + | _ :: _ -> true end module Op = struct @@ -230,7 +230,7 @@ let check_ops ~show_x (ops : 'a Op.t list) : unit = | Op.Check_to_list -> if to_list !cur <> Ref_impl.to_list !cur_ref then fail () | 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 -> if to_seq !cur |> CCSeq.to_list