From 2c0a936fd2bdc16c35d8c4714612b867254ffc47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Roch=C3=A9?= Date: Mon, 23 Dec 2024 10:31:24 +0100 Subject: [PATCH] engine: expose skip exception --- src/alcotest-engine/core.ml | 2 ++ src/alcotest-engine/core_intf.ml | 3 ++- src/alcotest-engine/test.ml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/alcotest-engine/core.ml b/src/alcotest-engine/core.ml index 69025166..459686d0 100644 --- a/src/alcotest-engine/core.ml +++ b/src/alcotest-engine/core.ml @@ -449,4 +449,6 @@ end module V1 = struct include V1_types module Make = Make + + exception Skip = Skip end diff --git a/src/alcotest-engine/core_intf.ml b/src/alcotest-engine/core_intf.ml index d44b159e..4d602276 100644 --- a/src/alcotest-engine/core_intf.ml +++ b/src/alcotest-engine/core_intf.ml @@ -111,7 +111,6 @@ end module type Core = sig exception Check_error of unit Fmt.t - exception Skip module V1 : sig module type S = V1_types.S @@ -122,5 +121,7 @@ module type Core = sig [('a -> unit M.t)] within a given concurrency monad [M.t]. The [run] and [run_with_args] functions must be scheduled in a global event loop. Intended for use by the {!Alcotest_lwt} and {!Alcotest_async} backends. *) + + exception Skip end end diff --git a/src/alcotest-engine/test.ml b/src/alcotest-engine/test.ml index 47e96ed5..633cb28a 100644 --- a/src/alcotest-engine/test.ml +++ b/src/alcotest-engine/test.ml @@ -268,4 +268,4 @@ let match_raises ?here ?pos msg exnp f = Fmt.pf ppf "%t%a %s: got %a." (pp_location ?here ?pos) Pp.tag `Fail msg Fmt.exn e) -let skip () = raise Core.Skip +let skip () = raise Core.V1.Skip