Skip to content

Commit

Permalink
engine: expose skip exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Khady committed Dec 23, 2024
1 parent 8d30762 commit 2c0a936
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/alcotest-engine/core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -449,4 +449,6 @@ end
module V1 = struct
include V1_types
module Make = Make

exception Skip = Skip
end
3 changes: 2 additions & 1 deletion src/alcotest-engine/core_intf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion src/alcotest-engine/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2c0a936

Please sign in to comment.