File: runtime.mli

package info (click to toggle)
ppx-assert 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 136 kB
  • sloc: ml: 317; makefile: 14
file content (58 lines) | stat: -rw-r--r-- 1,175 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
open Base

(** Types used in the generated code *)

type 'a test_pred =
  ?here:Lexing.position list -> ?message:string -> ('a -> bool) -> 'a -> unit

type 'a test_eq =
  ?here:Lexing.position list
  -> ?message:string
  -> ?equal:('a -> 'a -> bool)
  -> 'a
  -> 'a
  -> unit

type 'a test_result =
  ?here:Lexing.position list
  -> ?message:string
  -> ?equal:('a -> 'a -> bool)
  -> expect:'a
  -> 'a
  -> unit

(** Functions called by the generated code *)

val test_pred
  :  pos:string
  -> sexpifier:('a -> Sexp.t)
  -> here:Lexing.position list
  -> ?message:string
  -> ('a -> bool)
  -> 'a
  -> unit

val test_eq
  :  pos:string
  -> sexpifier:('a -> Sexp.t)
  -> comparator:('a -> 'a -> int)
  -> here:Lexing.position list
  -> ?message:string
  -> ?equal:('a -> 'a -> bool)
  -> 'a
  -> 'a
  -> unit

val test_result
  :  pos:string
  -> sexpifier:('a -> Sexp.t)
  -> comparator:('a -> 'a -> int)
  -> here:Lexing.position list
  -> ?message:string
  -> ?equal:('a -> 'a -> bool)
  -> expect:'a
  -> got:'a
  -> unit

(** Called to set/unset the [diff] function, used by [test_result] *)
val set_diff_function : (from_:string -> to_:string -> unit) option -> unit