sig
module Assert :
sig
type failure =
Assertion.failure = {
expected_value : string;
actual_value : string;
message : string;
}
exception Failed of Assertion.failure
val fail : string -> string -> string -> 'a
val fail_msg : string -> 'a
val default_printer : 'a -> string
val equal :
?eq:('a -> 'a -> bool) ->
?prn:('a -> string) -> ?msg:string -> 'a -> 'a -> unit
val not_equal :
?eq:('a -> 'a -> bool) ->
?prn:('a -> string) -> ?msg:string -> 'a -> 'a -> unit
val same : ?prn:('a -> string) -> ?msg:string -> 'a -> 'a -> unit
val not_same : ?prn:('a -> string) -> ?msg:string -> 'a -> 'a -> unit
val make_equal :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a -> 'a -> unit
val make_not_equal :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a -> 'a -> unit
val make_equal_array :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a array -> 'a array -> unit
val make_not_equal_array :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a array -> 'a array -> unit
val make_equal_list :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a list -> 'a list -> unit
val make_not_equal_list :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a list -> 'a list -> unit
val make_equal_hashtbl :
('b -> 'b -> bool) ->
('a -> string) ->
('b -> string) ->
?msg:string -> ('a, 'b) Hashtbl.t -> ('a, 'b) Hashtbl.t -> unit
val make_not_equal_hashtbl :
('b -> 'b -> bool) ->
('a -> string) ->
('b -> string) ->
?msg:string -> ('a, 'b) Hashtbl.t -> ('a, 'b) Hashtbl.t -> unit
module type Printer = sig type t val to_string : t -> string end
module Map :
functor (M : Map.S) ->
functor (P : sig type t = M.key val to_string : t -> string end) ->
sig
val make_equal :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a M.t -> 'a M.t -> unit
val make_not_equal :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a M.t -> 'a M.t -> unit
end
module Set :
functor (S : Set.S) ->
functor (P : sig type t = S.elt val to_string : t -> string end) ->
sig
val equal : ?msg:string -> S.t -> S.t -> unit
val not_equal : ?msg:string -> S.t -> S.t -> unit
end
val make_equal_queue :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a Queue.t -> 'a Queue.t -> unit
val make_not_equal_queue :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a Queue.t -> 'a Queue.t -> unit
val make_equal_stack :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a Stack.t -> 'a Stack.t -> unit
val make_not_equal_stack :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a Stack.t -> 'a Stack.t -> unit
val make_equal_weak :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a Weak.t -> 'a Weak.t -> unit
val make_not_equal_weak :
('a -> 'a -> bool) ->
('a -> string) -> ?msg:string -> 'a Weak.t -> 'a Weak.t -> unit
val equal_bool : ?msg:string -> bool -> bool -> unit
val not_equal_bool : ?msg:string -> bool -> bool -> unit
val equal_int : ?msg:string -> int -> int -> unit
val not_equal_int : ?msg:string -> int -> int -> unit
val equal_int32 : ?msg:string -> int32 -> int32 -> unit
val not_equal_int32 : ?msg:string -> int32 -> int32 -> unit
val equal_int64 : ?msg:string -> int64 -> int64 -> unit
val not_equal_int64 : ?msg:string -> int64 -> int64 -> unit
val equal_nativeint : ?msg:string -> nativeint -> nativeint -> unit
val not_equal_nativeint : ?msg:string -> nativeint -> nativeint -> unit
val equal_char : ?msg:string -> char -> char -> unit
val not_equal_char : ?msg:string -> char -> char -> unit
val equal_string : ?msg:string -> string -> string -> unit
val not_equal_string : ?msg:string -> string -> string -> unit
val equal_float : ?eps:float -> ?msg:string -> float -> float -> unit
val not_equal_float :
?eps:float -> ?msg:string -> float -> float -> unit
val equal_complex :
?eps:float -> ?msg:string -> Complex.t -> Complex.t -> unit
val not_equal_complex :
?eps:float -> ?msg:string -> Complex.t -> Complex.t -> unit
val is_true : ?msg:string -> bool -> unit
val is_false : ?msg:string -> bool -> unit
val is_some : ?msg:string -> 'a option -> unit
val is_none : ?msg:string -> 'a option -> unit
val raises : ?msg:string -> (unit -> 'a) -> unit
val no_raise : ?msg:string -> (unit -> 'a) -> unit
val make_raises :
(exn -> bool) ->
(exn -> string) -> ?msg:string -> (unit -> 'a) -> unit
end
module Gen :
sig
type random = Generator.random
type 'a t = 'a Generator.t
type 'a outcome = 'a Generator.outcome = Value of 'a | Exception of exn
val make_random : unit -> Generator.random
val make_random_seed : int -> Generator.random
val make_random_full : int array -> Generator.random
val unit : unit Generator.t
val bool : bool Generator.t
val make_bool : int -> int -> bool Generator.t
val int : int Generator.t
val pos_int : int Generator.t
val neg_int : int Generator.t
val make_int : int -> int -> int Generator.t
val int32 : int32 Generator.t
val pos_int32 : int32 Generator.t
val neg_int32 : int32 Generator.t
val make_int32 : int32 -> int32 -> int32 Generator.t
val int64 : int64 Generator.t
val pos_int64 : int64 Generator.t
val neg_int64 : int64 Generator.t
val make_int64 : int64 -> int64 -> int64 Generator.t
val nativeint : nativeint Generator.t
val pos_nativeint : nativeint Generator.t
val neg_nativeint : nativeint Generator.t
val make_nativeint : nativeint -> nativeint -> nativeint Generator.t
val char : char Generator.t
val digit : char Generator.t
val digit_bin : char Generator.t
val digit_oct : char Generator.t
val digit_hex : char Generator.t
val letter : char Generator.t
val alphanum : char Generator.t
val string : int Generator.t -> char Generator.t -> string Generator.t
val strings :
string -> int Generator.t -> string Generator.t -> string Generator.t
val number : int Generator.t -> string Generator.t
val number_bin : int Generator.t -> string Generator.t
val number_oct : int Generator.t -> string Generator.t
val number_hex : int Generator.t -> string Generator.t
val word : int Generator.t -> string Generator.t
val words : int Generator.t -> int Generator.t -> string Generator.t
val float : float Generator.t
val make_float : float -> float -> float Generator.t
val complex :
float Generator.t -> float Generator.t -> Complex.t Generator.t
val total_function : 'b Generator.t -> ('a -> 'b) Generator.t
val partial_function :
'b Generator.outcome Generator.t -> ('a -> 'b) Generator.t
val array : int Generator.t -> 'a Generator.t -> 'a array Generator.t
val list : int Generator.t -> 'a Generator.t -> 'a list Generator.t
val option :
bool Generator.t -> 'a Generator.t -> 'a option Generator.t
val ref : 'a Generator.t -> 'a ref Generator.t
val buffer : string Generator.t -> Buffer.t Generator.t
module type Gen = sig type g val g : g Generator.t end
module Map :
functor (M : Map.S) ->
functor (G : sig type g = M.key val g : g Generator.t end) ->
sig
val gen :
int Generator.t -> 'a Generator.t -> 'a M.t Generator.t
end
module Set :
functor (S : Set.S) ->
functor (G : sig type g = S.elt val g : g Generator.t end) ->
sig val gen : int Generator.t -> S.t Generator.t end
val hashtbl :
int Generator.t ->
'a Generator.t -> 'b Generator.t -> ('a, 'b) Hashtbl.t Generator.t
val queue : int Generator.t -> 'a Generator.t -> 'a Queue.t Generator.t
val stack : int Generator.t -> 'a Generator.t -> 'a Stack.t Generator.t
val weak :
int Generator.t -> 'a option Generator.t -> 'a Weak.t Generator.t
module Weak :
functor (W : Weak.S) ->
functor (G : sig type g = W.data val g : g Generator.t end) ->
sig val gen : int Generator.t -> W.t Generator.t end
val lift : 'a -> string -> 'a Generator.t
val select_list : 'a list -> ('a -> string) -> 'a Generator.t
val select_list_weighted :
('a * int) list -> ('a -> string) -> 'a Generator.t
val select_array : 'a array -> ('a -> string) -> 'a Generator.t
val select_array_weighted :
('a * int) array -> ('a -> string) -> 'a Generator.t
val choose_list : 'a Generator.t list -> 'a Generator.t
val choose_list_weighted :
('a Generator.t * int) list -> 'a Generator.t
val choose_array : 'a Generator.t array -> 'a Generator.t
val choose_array_weighted :
('a Generator.t * int) array -> 'a Generator.t
val filter : ('a -> bool) -> 'a Generator.t -> 'a Generator.t
val transform : ('a -> 'a) -> 'a Generator.t -> 'a Generator.t
val map1 :
('a -> 'b) -> ('b -> string) -> 'a Generator.t -> 'b Generator.t
val map2 :
('a -> 'b -> 'c) ->
('c -> string) -> 'a Generator.t * 'b Generator.t -> 'c Generator.t
val map3 :
('a -> 'b -> 'c -> 'd) ->
('d -> string) ->
'a Generator.t * 'b Generator.t * 'c Generator.t -> 'd Generator.t
val map4 :
('a -> 'b -> 'c -> 'd -> 'e) ->
('e -> string) ->
'a Generator.t * 'b Generator.t * 'c Generator.t * 'd Generator.t ->
'e Generator.t
val map5 :
('a -> 'b -> 'c -> 'd -> 'e -> 'f) ->
('f -> string) ->
'a Generator.t * 'b Generator.t * 'c Generator.t * 'd Generator.t *
'e Generator.t -> 'f Generator.t
val zip1 : 'a Generator.t -> 'a Generator.t
val zip2 : 'a Generator.t -> 'b Generator.t -> ('a * 'b) Generator.t
val zip3 :
'a Generator.t ->
'b Generator.t -> 'c Generator.t -> ('a * 'b * 'c) Generator.t
val zip4 :
'a Generator.t ->
'b Generator.t ->
'c Generator.t -> 'd Generator.t -> ('a * 'b * 'c * 'd) Generator.t
val zip5 :
'a Generator.t ->
'b Generator.t ->
'c Generator.t ->
'd Generator.t ->
'e Generator.t -> ('a * 'b * 'c * 'd * 'e) Generator.t
val apply1 : ('a -> 'b) -> 'a -> 'b
val apply2 : ('a -> 'b -> 'c) -> 'a * 'b -> 'c
val apply3 : ('a -> 'b -> 'c -> 'd) -> 'a * 'b * 'c -> 'd
val apply4 : ('a -> 'b -> 'c -> 'd -> 'e) -> 'a * 'b * 'c * 'd -> 'e
val apply5 :
('a -> 'b -> 'c -> 'd -> 'e -> 'f) -> 'a * 'b * 'c * 'd * 'e -> 'f
val tuple_apply1 : ('a -> 'b) -> 'a -> 'b
val tuple_apply2 : ('a * 'b -> 'c) -> 'a -> 'b -> 'c
val tuple_apply3 : ('a * 'b * 'c -> 'd) -> 'a -> 'b -> 'c -> 'd
val tuple_apply4 :
('a * 'b * 'c * 'd -> 'e) -> 'a -> 'b -> 'c -> 'd -> 'e
val tuple_apply5 :
('a * 'b * 'c * 'd * 'e -> 'f) -> 'a -> 'b -> 'c -> 'd -> 'e -> 'f
end
module Red :
sig
val unit : unit Reducer.t
val bool : bool Reducer.t
val int : int Reducer.t
val int32 : int32 Reducer.t
val int64 : int64 Reducer.t
val nativeint : nativeint Reducer.t
val char : char Reducer.t
val string : string Reducer.t
val float : float Reducer.t
val complex : Complex.t Reducer.t
val array : 'a array Reducer.t
val list : 'a list Reducer.t
val option : 'a option Reducer.t
module Map : functor (M : Map.S) -> sig val red : 'a M.t Reducer.t end
module Set : functor (S : Set.S) -> sig val red : S.t Reducer.t end
val hashtbl : ('a, 'b) Hashtbl.t Reducer.t
val queue : 'a Queue.t Reducer.t
val stack : 'a Stack.t Reducer.t
val weak : 'a Weak.t Reducer.t
end
module Enum :
sig
type 'a lazy_list =
'a Enumerator.lazy_list =
Nil
| Cons of 'a * 'a Abbreviations.Enum.lazy_list lazy_t
type 'a t = 'a Enumerator.t
val iter_list : ('a -> unit) -> 'a Enumerator.lazy_list -> unit
val iter : ('a -> unit) -> 'a Enumerator.t -> unit
val empty : 'a Enumerator.t
val unit : unit Enumerator.t
val bool : bool Enumerator.t
val int : int -> int -> int Enumerator.t
val int32 : int32 -> int32 -> int32 Enumerator.t
val int64 : int64 -> int64 -> int64 Enumerator.t
val nativeint : nativeint -> nativeint -> nativeint Enumerator.t
val make_char : char -> char -> char Enumerator.t
val char : char Enumerator.t
val string : char Enumerator.t -> int -> string Enumerator.t
val float : float -> float -> int -> float Enumerator.t
val complex :
float Enumerator.t -> float Enumerator.t -> Complex.t Enumerator.t
val array : 'a Enumerator.t -> int -> 'a array Enumerator.t
val list : 'a Enumerator.t -> int -> 'a list Enumerator.t
val option : 'a Enumerator.t -> 'a option Enumerator.t
val ref : 'a Enumerator.t -> 'a ref Enumerator.t
val buffer : char Enumerator.t -> int -> Buffer.t Enumerator.t
val queue : 'a Enumerator.t -> int -> 'a Queue.t Enumerator.t
val stack : 'a Enumerator.t -> int -> 'a Stack.t Enumerator.t
val weak : 'a option Enumerator.t -> int -> 'a Weak.t Enumerator.t
val file_chars : string -> char Enumerator.t
val file_bytes : string -> int Enumerator.t
val file_lines : string -> string Enumerator.t
val file_values : string -> ('a -> string) -> 'a Enumerator.t
val lift : 'a -> string -> 'a Enumerator.t
val lift_list : 'a list -> ('a -> string) -> 'a Enumerator.t
val lift_array : 'a array -> ('a -> string) -> 'a Enumerator.t
val lift_string : string -> char Enumerator.t
val filter : ('a -> bool) -> 'a Enumerator.t -> 'a Enumerator.t
val transform : ('a -> 'a) -> 'a Enumerator.t -> 'a Enumerator.t
val sequence : 'a Enumerator.t list -> 'a Enumerator.t
val for_each :
int -> int -> (int -> 'a Enumerator.t) -> 'a Enumerator.t
val map1 :
('a -> 'b) -> ('b -> string) -> 'a Enumerator.t -> 'b Enumerator.t
val map2 :
('a -> 'b -> 'c) ->
('c -> string) ->
'a Enumerator.t * 'b Enumerator.t -> 'c Enumerator.t
val map3 :
('a -> 'b -> 'c -> 'd) ->
('d -> string) ->
'a Enumerator.t * 'b Enumerator.t * 'c Enumerator.t ->
'd Enumerator.t
val map4 :
('a -> 'b -> 'c -> 'd -> 'e) ->
('e -> string) ->
'a Enumerator.t * 'b Enumerator.t * 'c Enumerator.t * 'd Enumerator.t ->
'e Enumerator.t
val map5 :
('a -> 'b -> 'c -> 'd -> 'e -> 'f) ->
('f -> string) ->
'a Enumerator.t * 'b Enumerator.t * 'c Enumerator.t *
'd Enumerator.t * 'e Enumerator.t -> 'f Enumerator.t
val zip1 : 'a Enumerator.t -> 'a Enumerator.t
val zip2 : 'a Enumerator.t -> 'b Enumerator.t -> ('a * 'b) Enumerator.t
val zip3 :
'a Enumerator.t ->
'b Enumerator.t -> 'c Enumerator.t -> ('a * 'b * 'c) Enumerator.t
val zip4 :
'a Enumerator.t ->
'b Enumerator.t ->
'c Enumerator.t ->
'd Enumerator.t -> ('a * 'b * 'c * 'd) Enumerator.t
val zip5 :
'a Enumerator.t ->
'b Enumerator.t ->
'c Enumerator.t ->
'd Enumerator.t ->
'e Enumerator.t -> ('a * 'b * 'c * 'd * 'e) Enumerator.t
val create_int_functions :
?inf_eq:('a -> 'a -> bool) ->
('a -> 'a) -> ('a -> string) -> 'a -> 'a -> 'a Enumerator.t
module State :
sig
type 'a state = {
init : 'a Enumerator.t array;
curr : 'a Enumerator.lazy_list array;
}
val get : 'a state -> int -> 'a
end
val create_state_based :
(unit -> 'a Enumerator.t array) ->
('a State.state -> 'b) ->
'c -> (unit -> 'b Enumerator.lazy_list) * 'c
end
module Spec :
sig
type 'a predicate = 'a Specification.predicate
type ('a, 'b) t =
('a, 'b) Specification.t = {
precond : 'a Abbreviations.Spec.predicate;
postcond : ('a * 'b) Abbreviations.Spec.predicate;
}
type 'a outcome = Result of 'a | Exception of exn
val implies :
'a Specification.predicate ->
('a * 'b) Specification.predicate -> ('a, 'b) Specification.t
val ( => ) :
'a Specification.predicate ->
('a * 'b) Specification.predicate -> ('a, 'b) Specification.t
val implies' :
'a Specification.predicate ->
'b Specification.predicate -> ('a, 'b) Specification.t
val ( ==> ) :
'a Specification.predicate ->
'b Specification.predicate -> ('a, 'b) Specification.t
val is_exception :
exn Specification.predicate ->
'a Specification.outcome Specification.predicate
val is_result :
'a Specification.predicate ->
'a Specification.outcome Specification.predicate
val always : 'a Specification.predicate
val never : 'a Specification.predicate
val is_pos_int : int Specification.predicate
val is_neg_int : int Specification.predicate
val is_zero_int : int Specification.predicate
val is_nonzero_int : int Specification.predicate
val is_even_int : int Specification.predicate
val is_odd_int : int Specification.predicate
val is_pos_int32 : int32 Specification.predicate
val is_neg_int32 : int32 Specification.predicate
val is_zero_int32 : int32 Specification.predicate
val is_nonzero_int32 : int32 Specification.predicate
val is_even_int32 : int32 Specification.predicate
val is_odd_int32 : int32 Specification.predicate
val is_pos_int64 : int64 Specification.predicate
val is_neg_int64 : int64 Specification.predicate
val is_zero_int64 : int64 Specification.predicate
val is_nonzero_int64 : int64 Specification.predicate
val is_even_int64 : int64 Specification.predicate
val is_odd_int64 : int64 Specification.predicate
val is_pos_nativeint : nativeint Specification.predicate
val is_neg_nativeint : nativeint Specification.predicate
val is_zero_nativeint : nativeint Specification.predicate
val is_nonzero_nativeint : nativeint Specification.predicate
val is_even_nativeint : nativeint Specification.predicate
val is_odd_nativeint : nativeint Specification.predicate
val is_pos_float : float Specification.predicate
val is_neg_float : float Specification.predicate
val is_zero_float_eps : float -> float Specification.predicate
val is_nonzero_float_eps : float -> float Specification.predicate
val is_zero_float : float Specification.predicate
val is_nonzero_float : float Specification.predicate
val is_nan_float : float Specification.predicate
val is_nonnan_float : float Specification.predicate
val is_letter_char : char Specification.predicate
val is_digit_char : char Specification.predicate
val is_digit_bin_char : char Specification.predicate
val is_digit_oct_char : char Specification.predicate
val is_digit_hex_char : char Specification.predicate
val is_space_char : char Specification.predicate
val is_alphanum_char : char Specification.predicate
val is_empty_string : string Specification.predicate
val is_nonempty_string : string Specification.predicate
val is_empty_list : 'a list Specification.predicate
val is_nonempty_list : 'a list Specification.predicate
val is_empty_array : 'a array Specification.predicate
val is_nonempty_array : 'a array Specification.predicate
val is_none_option : 'a option Specification.predicate
val is_some_option : 'a option Specification.predicate
val exists_string :
char Specification.predicate -> string Specification.predicate
val for_all_string :
char Specification.predicate -> string Specification.predicate
val exists_list :
'a Specification.predicate -> 'a list Specification.predicate
val for_all_list :
'a Specification.predicate -> 'a list Specification.predicate
val exists_array :
'a Specification.predicate -> 'a array Specification.predicate
val for_all_array :
'a Specification.predicate -> 'a array Specification.predicate
module type Pred = sig type p val p : p Specification.predicate end
module Map :
functor (M : Map.S) ->
functor
(P : sig type p = M.key val p : p Specification.predicate end) ->
sig
val exists :
'a Specification.predicate -> 'a M.t Specification.predicate
val for_all :
'a Specification.predicate -> 'a M.t Specification.predicate
end
module Set :
functor (S : Set.S) ->
functor
(P : sig type p = S.elt val p : p Specification.predicate end) ->
sig
val exists : S.t Specification.predicate
val for_all : S.t Specification.predicate
end
val exists_hashtbl :
('a * 'b) Specification.predicate ->
('a, 'b) Hashtbl.t Specification.predicate
val for_all_hashtbl :
('a * 'b) Specification.predicate ->
('a, 'b) Hashtbl.t Specification.predicate
val exists_queue :
'a Specification.predicate -> 'a Queue.t Specification.predicate
val for_all_queue :
'a Specification.predicate -> 'a Queue.t Specification.predicate
val exists_stack :
'a Specification.predicate -> 'a Stack.t Specification.predicate
val for_all_stack :
'a Specification.predicate -> 'a Stack.t Specification.predicate
val exists_weak :
'a option Specification.predicate ->
'a Weak.t Specification.predicate
val for_all_weak :
'a option Specification.predicate ->
'a Weak.t Specification.predicate
module Weak :
functor (W : Weak.S) ->
functor
(P : sig type p = W.data val p : p Specification.predicate end) ->
sig
val exists : W.t Specification.predicate
val for_all : W.t Specification.predicate
end
val logand :
'a Specification.predicate ->
'a Specification.predicate -> 'a Specification.predicate
val ( &&& ) :
'a Specification.predicate ->
'a Specification.predicate -> 'a Specification.predicate
val logand_list :
'a Specification.predicate list -> 'a Specification.predicate
val ( &&&& ) :
'a Specification.predicate list -> 'a Specification.predicate
val logor :
'a Specification.predicate ->
'a Specification.predicate -> 'a Specification.predicate
val ( ||| ) :
'a Specification.predicate ->
'a Specification.predicate -> 'a Specification.predicate
val logor_list :
'a Specification.predicate list -> 'a Specification.predicate
val ( |||| ) :
'a Specification.predicate list -> 'a Specification.predicate
val logxor :
'a Specification.predicate ->
'a Specification.predicate -> 'a Specification.predicate
val ( ^^^ ) :
'a Specification.predicate ->
'a Specification.predicate -> 'a Specification.predicate
val logxor_list :
'a Specification.predicate list -> 'a Specification.predicate
val ( ^^^^ ) :
'a Specification.predicate list -> 'a Specification.predicate
val not : 'a Specification.predicate -> 'a Specification.predicate
val zip1 : 'a Specification.predicate -> 'a Specification.predicate
val zip2 :
'a Specification.predicate ->
'b Specification.predicate -> ('a * 'b) Specification.predicate
val zip3 :
'a Specification.predicate ->
'b Specification.predicate ->
'c Specification.predicate -> ('a * 'b * 'c) Specification.predicate
val zip4 :
'a Specification.predicate ->
'b Specification.predicate ->
'c Specification.predicate ->
'd Specification.predicate ->
('a * 'b * 'c * 'd) Specification.predicate
val zip5 :
'a Specification.predicate ->
'b Specification.predicate ->
'c Specification.predicate ->
'd Specification.predicate ->
'e Specification.predicate ->
('a * 'b * 'c * 'd * 'e) Specification.predicate
val create_int_functions :
('a -> 'a -> int) ->
'a ->
('a -> 'a -> 'a) ->
'a ->
'a Specification.predicate * 'a Specification.predicate *
'a Specification.predicate * 'a Specification.predicate *
'a Specification.predicate * 'a Specification.predicate
end
module Shell :
sig
type ('a, 'b, 'c) command = ('a, 'b, 'c) Shell.command
constraint 'a = [< `Input | `No_input ]
constraint 'b = [< `No_output | `Output ]
constraint 'c = [< `Error | `No_error ]
type configuration =
Shell.configuration = {
pipe : string;
redirect_output : string;
redirect_append_output : string;
redirect_error : string;
redirect_append_error : string;
}
val bash : Shell.configuration
val set_configuration : Shell.configuration -> unit
val read_lines : string -> string list
val write_lines : string list -> string -> unit
val command :
string ->
([< `Input | `No_input ], [< `No_output | `Output ],
[< `Error | `No_error ])
Shell.command
val coerce :
([< `Input | `No_input ], [< `No_output | `Output ],
[< `Error | `No_error ])
Shell.command ->
([< `Input | `No_input ], [< `No_output | `Output ],
[< `Error | `No_error ])
Shell.command
val ignore :
([< `Input | `No_input ] as 'a, [< `No_output | `Output ],
[< `Error | `No_error ])
Shell.command -> ('a, [ `No_output ], [ `No_error ]) Shell.command
val run :
([< `Input | `No_input ], [< `No_output | `Output ],
[< `Error | `No_error ])
Shell.command -> int
val run_list :
([< `Input | `No_input ], [< `No_output | `Output ],
[< `Error | `No_error ])
Shell.command list -> int
val file_exists : string -> bool
val is_directory : string -> bool
val getenv : string -> string
val files : string -> string list
val files_with_filter : (string -> bool) -> string -> string list
val files_with_suffix : string -> string -> string list
val current_dir_name : string
val parent_dir_name : string
val is_relative : string -> bool
val is_implicit : string -> bool
val check_suffix : string -> string -> bool
val chop_suffix : string -> string -> string
val chop_extension : string -> string
val basename : string -> string
val dirname : string -> string
val concatname : string -> string -> string
val temp_file : ?temp_dir:string -> string -> string -> string
val quote : string -> string
val pwd : unit -> string
val cd : string -> unit
val pushd : string -> unit
val popd : unit -> string
val exit :
int -> ([ `No_input ], [ `No_output ], [ `No_error ]) Shell.command
val pwdir :
unit -> ([ `No_input ], [ `Output ], [ `No_error ]) Shell.command
val chdir :
string -> ([ `No_input ], [ `No_output ], [ `Error ]) Shell.command
val mkdir :
?options:string list ->
string -> ([ `No_input ], [ `No_output ], [ `Error ]) Shell.command
val rmdir :
?options:string list ->
string -> ([ `No_input ], [ `No_output ], [ `Error ]) Shell.command
val ls :
?options:string list ->
string list -> ([ `No_input ], [ `Output ], [ `Error ]) Shell.command
val cp :
?options:string list ->
string list ->
string -> ([ `No_input ], [ `No_output ], [ `Error ]) Shell.command
val rm :
?options:string list ->
string list ->
([ `No_input ], [ `No_output ], [ `Error ]) Shell.command
val mv :
?options:string list ->
string list ->
string -> ([ `No_input ], [ `No_output ], [ `Error ]) Shell.command
val touch :
?options:string list ->
string list ->
([ `No_input ], [ `No_output ], [ `Error ]) Shell.command
val cat :
?options:string list ->
string list -> ([ `No_input ], [ `Output ], [ `Error ]) Shell.command
val echo :
?options:string list ->
string -> ([ `No_input ], [ `Output ], [ `Error ]) Shell.command
val diff :
?options:string list ->
string ->
string -> ([ `No_input ], [ `Output ], [ `Error ]) Shell.command
val grep :
?options:string list ->
string -> ([ `Input ], [ `Output ], [ `Error ]) Shell.command
val grep_files :
?options:string list ->
string ->
string list -> ([ `No_input ], [ `Output ], [ `Error ]) Shell.command
val sed :
?options:string list ->
string -> ([ `Input ], [ `Output ], [ `Error ]) Shell.command
val sort :
?options:string list ->
string list -> ([ `Input ], [ `Output ], [ `Error ]) Shell.command
val cut :
?options:string list ->
string list -> ([ `Input ], [ `Output ], [ `Error ]) Shell.command
val sleep :
int -> ([ `No_input ], [ `No_output ], [ `No_error ]) Shell.command
val pipe :
([< `Input | `No_input ] as 'a, [ `Output ], [< `Error | `No_error ])
Shell.command ->
([ `Input ], [< `No_output | `Output ] as 'b,
[< `Error | `No_error ] as 'c)
Shell.command -> ('a, 'b, 'c) Shell.command
val ( |> ) :
([< `Input | `No_input ] as 'a, [ `Output ], [< `Error | `No_error ])
Shell.command ->
([ `Input ], [< `No_output | `Output ] as 'b,
[< `Error | `No_error ] as 'c)
Shell.command -> ('a, 'b, 'c) Shell.command
val redirect_output :
([< `Input | `No_input ] as 'a, [ `Output ],
[< `Error | `No_error ] as 'b)
Shell.command -> string -> ('a, [ `No_output ], 'b) Shell.command
val ( >> ) :
([< `Input | `No_input ] as 'a, [ `Output ],
[< `Error | `No_error ] as 'b)
Shell.command -> string -> ('a, [ `No_output ], 'b) Shell.command
val redirect_append :
([< `Input | `No_input ] as 'a, [ `Output ],
[< `Error | `No_error ] as 'b)
Shell.command -> string -> ('a, [ `No_output ], 'b) Shell.command
val ( >>> ) :
([< `Input | `No_input ] as 'a, [ `Output ],
[< `Error | `No_error ] as 'b)
Shell.command -> string -> ('a, [ `No_output ], 'b) Shell.command
val redirect_error :
([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b,
[ `Error ])
Shell.command -> string -> ('a, 'b, [ `No_error ]) Shell.command
val ( >>>> ) :
([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b,
[ `Error ])
Shell.command -> string -> ('a, 'b, [ `No_error ]) Shell.command
val redirect_append_error :
([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b,
[ `Error ])
Shell.command -> string -> ('a, 'b, [ `No_error ]) Shell.command
val ( >>>>> ) :
([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b,
[ `Error ])
Shell.command -> string -> ('a, 'b, [ `No_error ]) Shell.command
end
module Mock :
sig
type ('a, 'b) t = ('a, 'b) Mock.t
exception Unexpected_value of string
exception End_of_sequence
val from_mapping :
?cmp:('a -> 'a -> int) ->
?prn:('a -> string) -> ('a * 'b) list -> ('a, 'b) Mock.t
val from_sequence :
?cmp:('a -> 'a -> int) ->
?prn:('a -> string) -> ('a * 'b) list -> ('a, 'b) Mock.t
val from_function :
?cmp:('a -> 'a -> int) -> ('a -> 'b) -> ('a, 'b) Mock.t
val func : ('a, 'b) Mock.t -> 'a -> 'b
val func2 : ('a1 * 'a2, 'b) Mock.t -> 'a1 -> 'a2 -> 'b
val func3 : ('a1 * 'a2 * 'a3, 'b) Mock.t -> 'a1 -> 'a2 -> 'a3 -> 'b
val func4 :
('a1 * 'a2 * 'a3 * 'a4, 'b) Mock.t -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'b
val func5 :
('a1 * 'a2 * 'a3 * 'a4 * 'a5, 'b) Mock.t ->
'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'b
val count : ('a, 'b) Mock.t -> 'a -> int
val total : ('a, 'b) Mock.t -> int
val calls : ('a, 'b) Mock.t -> 'a list
end
module Test :
sig
type result =
Test.result =
Passed
| Failed of Assertion.failure
| Uncaught of exn * string
| Report of int * int * int * string list * (string * int) list
| Exit_code of int
type 'a classifier = 'a Test.classifier
type t = Test.t
type output_mode =
Test.output_mode =
Text_output of Pervasives.out_channel
| Html_output of Pervasives.out_channel
| Xml_output of Pervasives.out_channel
| Xml_junit_output of Pervasives.out_channel
| Csv_output of Pervasives.out_channel * string
val return : 'a -> unit -> 'a
val make_assert_test :
?title:string -> (unit -> 'a) -> ('a -> 'b) -> ('b -> unit) -> Test.t
val make_simple_test : ?title:string -> (unit -> unit) -> Test.t
val add_assert_test :
?title:string -> (unit -> 'a) -> ('a -> 'b) -> ('b -> unit) -> unit
val add_simple_test : ?title:string -> (unit -> unit) -> unit
val default_classifier : 'a Test.classifier
val default_reducer : 'a Reducer.t
val make_random_test :
?title:string ->
?nb_runs:int ->
?nb_tries:int ->
?classifier:'a Test.classifier ->
?reducer:'a Reducer.t ->
?reduce_depth:int ->
?reduce_smaller:('a -> 'a -> bool) ->
?random_src:Generator.random ->
'a Generator.t ->
('a -> 'b) -> ('a, 'b) Specification.t list -> Test.t
val add_random_test :
?title:string ->
?nb_runs:int ->
?nb_tries:int ->
?classifier:'a Test.classifier ->
?reducer:'a Reducer.t ->
?reduce_depth:int ->
?reduce_smaller:('a -> 'a -> bool) ->
?random_src:Generator.random ->
'a Generator.t -> ('a -> 'b) -> ('a, 'b) Specification.t list -> unit
val make_partial_random_test :
?title:string ->
?nb_runs:int ->
?nb_tries:int ->
?classifier:'a Test.classifier ->
?reducer:'a Reducer.t ->
?reduce_depth:int ->
?reduce_smaller:('a -> 'a -> bool) ->
?random_src:Generator.random ->
'a Generator.t ->
('a -> 'b) ->
('a, 'b Specification.outcome) Specification.t list -> Test.t
val add_partial_random_test :
?title:string ->
?nb_runs:int ->
?nb_tries:int ->
?classifier:'a Test.classifier ->
?reducer:'a Reducer.t ->
?reduce_depth:int ->
?reduce_smaller:('a -> 'a -> bool) ->
?random_src:Generator.random ->
'a Generator.t ->
('a -> 'b) ->
('a, 'b Specification.outcome) Specification.t list -> unit
val make_enum_test :
?title:string ->
'a Enumerator.t ->
('a -> 'b) -> ('a, 'b) Specification.t list -> Test.t
val add_enum_test :
?title:string ->
'a Enumerator.t ->
('a -> 'b) -> ('a, 'b) Specification.t list -> unit
val make_partial_enum_test :
?title:string ->
'a Enumerator.t ->
('a -> 'b) ->
('a, 'b Specification.outcome) Specification.t list -> Test.t
val add_partial_enum_test :
?title:string ->
'a Enumerator.t ->
('a -> 'b) ->
('a, 'b Specification.outcome) Specification.t list -> unit
val make_shell_test :
?title:string ->
([< `Input | `No_input ], [< `No_output | `Output ],
[< `Error | `No_error ])
Shell.command list -> Test.t
val add_shell_test :
?title:string ->
([< `Input | `No_input ], [< `No_output | `Output ],
[< `Error | `No_error ])
Shell.command list -> unit
val exec_test : Test.t -> Test.result
val exec_tests : Test.t list -> Test.result list
val run_test : ?output:Test.output_mode -> Test.t -> unit
val run_tests : ?output:Test.output_mode -> Test.t list -> unit
val launch_tests :
?output:Test.output_mode -> ?clear:bool -> unit -> unit
val get_tests : unit -> Test.t list
val check :
?title:string ->
?nb_runs:int ->
?nb_tries:int ->
?classifier:'a Test.classifier ->
?random_src:Generator.random ->
'a Generator.t -> ('a -> 'b) -> ('a, 'b) Specification.t list -> unit
val check_partial :
?title:string ->
?nb_runs:int ->
?nb_tries:int ->
?classifier:'a Test.classifier ->
?random_src:Generator.random ->
'a Generator.t ->
('a -> 'b) ->
('a, 'b Specification.outcome) Specification.t list -> unit
end
val ( => ) :
'a Specification.predicate ->
('a * 'b) Specification.predicate -> ('a, 'b) Specification.t
val ( ==> ) :
'a Specification.predicate ->
'b Specification.predicate -> ('a, 'b) Specification.t
val ( &&& ) :
'a Specification.predicate ->
'a Specification.predicate -> 'a Specification.predicate
val ( ||| ) :
'a Specification.predicate ->
'a Specification.predicate -> 'a Specification.predicate
val ( ^^^ ) :
'a Specification.predicate ->
'a Specification.predicate -> 'a Specification.predicate
val check :
?title:string ->
?nb_runs:int ->
?nb_tries:int ->
?classifier:'a Abbreviations.Test.classifier ->
?random_src:Generator.random ->
'a Generator.t -> ('a -> 'b) -> ('a, 'b) Specification.t list -> unit
val check_partial :
?title:string ->
?nb_runs:int ->
?nb_tries:int ->
?classifier:'a Abbreviations.Test.classifier ->
?random_src:Generator.random ->
'a Generator.t ->
('a -> 'b) -> ('a, 'b Specification.outcome) Specification.t list -> unit
val ( |> ) :
([< `Input | `No_input ] as 'a, [ `Output ], [< `Error | `No_error ])
Abbreviations.Shell.command ->
([ `Input ], [< `No_output | `Output ] as 'b,
[< `Error | `No_error ] as 'c)
Abbreviations.Shell.command -> ('a, 'b, 'c) Abbreviations.Shell.command
val ( >> ) :
([< `Input | `No_input ] as 'a, [ `Output ],
[< `Error | `No_error ] as 'b)
Abbreviations.Shell.command ->
string -> ('a, [ `No_output ], 'b) Abbreviations.Shell.command
val ( >>> ) :
([< `Input | `No_input ] as 'a, [ `Output ],
[< `Error | `No_error ] as 'b)
Abbreviations.Shell.command ->
string -> ('a, [ `No_output ], 'b) Abbreviations.Shell.command
val ( >>>> ) :
([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b,
[ `Error ])
Abbreviations.Shell.command ->
string -> ('a, 'b, [ `No_error ]) Abbreviations.Shell.command
val ( >>>>> ) :
([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b,
[ `Error ])
Abbreviations.Shell.command ->
string -> ('a, 'b, [ `No_error ]) Abbreviations.Shell.command
end