package ppx_expect

  1. Overview
  2. Docs
type t

An identifier for a test node. Each test node that was parsed from an extension point or attribute ([%expect], [%expect_exact], [%expect.unreachable], or [%expect.uncaught_exn]) or that might be added into the corrected file (e.g. a [%expect] for trailing output) is associated with a unique t.

include Base.Intable.S with type t := t
val of_int_exn : int -> t
val to_int_exn : t -> int
include Base.Hashable.Key with type t := t
val compare : t -> t -> int
val sexp_of_t : t -> Sexplib0.Sexp.t
val hash : t -> int

Values returned by hash must be non-negative. An exception will be raised in the case that hash returns a negative value.

val mint : Base.unit -> t

Create a new t. Calls to mint will give distinct ids, but uniqueness is not guaranteed if of_int_exn is used to create an id.

OCaml

Innovation. Community. Security.