Skip to content

Commit 57137df

Browse files
committed
.
1 parent f1caad0 commit 57137df

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

src/alcotest-engine/core.ml

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ module Make (P : Platform.MAKER) (M : Monad.S) = struct
107107
{ suite; errors = []; loc; config; run_id; log_trap; progress_reporter }
108108

109109
type 'a test = 'a Suite.test
110+
type 'a extra_info = ?here:Source_code_position.here -> ?tags:Tag.Set.t -> 'a
110111

111112
let bt () = match Printexc.get_backtrace () with "" -> "" | s -> "\n" ^ s
112113

src/alcotest-engine/core_intf.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ module Unstable_types = struct
118118
type 'a test
119119
(** The type of unit tests. *)
120120

121-
type 'a extra_info := ?here:Source_code_position.here -> ?tags:tag_set -> 'a
121+
type 'a extra_info = ?here:Source_code_position.here -> ?tags:tag_set -> 'a
122122
(** Tests and test groups can be located by attaching source code positions
123123
to them. *)
124124

src/alcotest-engine/model.ml

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ module Suite (M : Monad.S) = struct
5050
module M = Monad.Extend (M)
5151
open M.Syntax
5252

53+
type filter_result = [ `Run | `Skip ]
54+
type filter = Tag.Set.t -> filter_result
55+
5356
type 'a test =
5457
| Test of {
5558
name : Safe_string.t;

src/alcotest-engine/model.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ end
3131

3232
module Suite (M : Monad.S) : sig
3333
type 'a test
34-
type filter_result := [ `Run | `Skip ]
35-
type filter := Tag.Set.t -> filter_result
34+
type filter_result = [ `Run | `Skip ]
35+
type filter = Tag.Set.t -> filter_result
3636

3737
val test :
3838
name:string ->

src/alcotest-engine/pp_intf.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ module type Pp = sig
100100
val user_error : ('a, Format.formatter, unit, _) format4 -> 'a
101101
(** Raise a user error, then fail. *)
102102

103-
module Width_sensitive (_ : sig
103+
module Width_sensitive (X : sig
104104
val stdout_columns : unit -> int option
105105
end) : Width_sensitive with type event := event and type result := result
106106
end

src/alcotest-engine/tag.ml

+7-8
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,21 @@ module Set = struct
6969
try
7070
let (V (k', v)) = Map.find (V k) t in
7171
match Type_id.equal k.type_id k'.type_id with
72-
| Some Refl -> Some v
72+
| Some Type_id.Refl -> Some v
7373
| None -> assert false
7474
with Not_found -> None
7575

76-
let to_list = Map.to_seq >> List.of_seq >> List.map snd
76+
let to_list = Map.bindings >> List.map snd
7777

7878
let fold_until =
79-
let rec aux ~f ~finish acc seq =
80-
match seq () with
81-
| Seq.Cons ((_k, v), xf) -> (
79+
let rec aux ~f ~finish acc = function
80+
| [] -> finish acc
81+
| (_k, v) :: xs -> (
8282
match f acc v with
83-
| Continue acc -> aux ~f ~finish acc xf
83+
| Continue acc -> aux ~f ~finish acc xs
8484
| Stop final -> final)
85-
| Seq.Nil -> finish acc
8685
in
87-
fun t ~init ~f ~finish -> aux ~f ~finish init (Map.to_seq t)
86+
fun t ~init ~f ~finish -> aux ~f ~finish init (Map.bindings t)
8887
end
8988

9089
module Speed_level = struct

src/alcotest/alcotest.ml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
open! Alcotest_stdlib_ext
12
include Alcotest_engine.V1.Test
23

34
module Unix_platform (M : Alcotest_engine.Monad.S) = struct

0 commit comments

Comments
 (0)