Skip to content

Commit b0010be

Browse files
authored
Merge pull request #416 from Khady/louis/expose-skip
engine: expose skip exception
2 parents b3a4a62 + 0759dfb commit b0010be

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- BREAKING: `match_raises` now expects the user-defined function to return
55
true for expected exceptions. Previously false was interpreted as an
66
expected exception. (#418, #419, @psafont)
7+
- Expose the `V1.Skip` exception (#415, #416, @Khady)
78

89
### 1.8.0 (2024-07-25)
910

src/alcotest-engine/core.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,4 +449,6 @@ end
449449
module V1 = struct
450450
include V1_types
451451
module Make = Make
452+
453+
exception Skip = Skip
452454
end

src/alcotest-engine/core_intf.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ end
111111

112112
module type Core = sig
113113
exception Check_error of unit Fmt.t
114-
exception Skip
115114

116115
module V1 : sig
117116
module type S = V1_types.S
@@ -122,5 +121,7 @@ module type Core = sig
122121
[('a -> unit M.t)] within a given concurrency monad [M.t]. The [run] and
123122
[run_with_args] functions must be scheduled in a global event loop.
124123
Intended for use by the {!Alcotest_lwt} and {!Alcotest_async} backends. *)
124+
125+
exception Skip
125126
end
126127
end

src/alcotest-engine/test.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,4 +268,4 @@ let match_raises ?here ?pos msg exnp f =
268268
Fmt.pf ppf "%t%a %s: got %a." (pp_location ?here ?pos) Pp.tag `Fail
269269
msg Fmt.exn e)
270270

271-
let skip () = raise Core.Skip
271+
let skip () = raise Core.V1.Skip

0 commit comments

Comments
 (0)