1 (**************************************************************************)
2 (* *)
3 (* OCaml *)
4 (* *)
5 (* Pierre Weis, projet Cristal, INRIA Rocquencourt *)
6 (* *)
7 (* Copyright 2006 Institut National de Recherche en Informatique et *)
8 (* en Automatique. *)
9 (* *)
10 (* All rights reserved. This file is distributed under the terms of *)
11 (* the GNU Lesser General Public License version 2.1, with the *)
12 (* special exception on linking described in the file LICENSE. *)
13 (* *)
14 (**************************************************************************)
15
16 (* Testing auxiliaries. *)
17
18 val test : bool -> unit;;
19 (** [test e] tests that [e] evaluates to [true]. *)
20 val failure_test : ('a -> 'b) -> 'a -> string -> bool;;
21 (** [failure_test f x s] tests that [f x] raises the exception [Failure s]. *)
22
23 val test_raises_some_exc : ('a -> 'b) -> 'a -> bool;;
24 (** [test_raises_some_exc f x] tests that [f x] raises an exception. *)
25
26 val test_raises_this_exc : exn -> ('a -> 'b) -> 'a -> bool;;
27 (** [test_raises_this_exc exc f x] tests that [f x]
28 raises the exception [exc]. *)
29
30 val test_raises_exc_p : (exn -> bool) -> ('a -> 'b) -> 'a -> bool;;
31 (** [test_raises_exc_p p f x] tests that [f x] raises an exception that
32 verifies predicate [p]. *)
33
34 val scan_failure_test : ('a -> 'b) -> 'a -> bool;;
35 (** [scan_failure_test f x] tests that [f x] raises [Scanf.Scan_failure]. *)
36