1
(***********************************************************************)
5
(* Pierre Weis, projet Cristal, INRIA Rocquencourt *)
7
(* Copyright 2006 Institut National de Recherche en Informatique et *)
8
(* en Automatique. All rights reserved. This file is distributed *)
9
(* under the terms of the Q Public License version 1.0. *)
11
(***********************************************************************)
13
(* $Id: testing.mli,v 1.1 2006/01/12 12:52:14 weis Exp $ *)
15
(* Testing auxilliaries. *)
17
val test : bool -> unit;;
18
(** [test e] tests that [e] evaluates to [true]. *)
19
val failure_test : ('a -> 'b) -> 'a -> string -> bool;;
20
(** [failure_test f x s] tests that [f x] raises the exception [Failure s]. *)
22
val test_raises_some_exc : ('a -> 'b) -> 'a -> bool;;
23
(** [test_raises_some_exc f x] tests that [f x] raises an exception. *)
25
val test_raises_this_exc : exn -> ('a -> 'b) -> 'a -> bool;;
26
(** [test_raises_this_exc exc f x] tests that [f x]
27
raises the exception [exc]. *)
29
val test_raises_exc_p : (exn -> bool) -> ('a -> 'b) -> 'a -> bool;;
30
(** [test_raises_exc_p p f x] tests that [f x] raises an exception that
31
verifies predicate [p]. *)
33
val scan_failure_test : ('a -> 'b) -> 'a -> bool;;
34
(** [scan_failure_test f x] tests that [f x] raises [Scanf.Scan_failure]. *)