sig
val ( ==> ) : bool -> bool -> bool
val assume : bool -> unit
val assume_fail : unit -> 'a
module Gen :
sig
type 'a t = Random.State.t -> 'a
type 'a sized = int -> Random.State.t -> 'a
val return : 'a -> 'a QCheck.Gen.t
val ( >>= ) :
'a QCheck.Gen.t -> ('a -> 'b QCheck.Gen.t) -> 'b QCheck.Gen.t
val ( <*> ) :
('a -> 'b) QCheck.Gen.t -> 'a QCheck.Gen.t -> 'b QCheck.Gen.t
val map : ('a -> 'b) -> 'a QCheck.Gen.t -> 'b QCheck.Gen.t
val map2 :
('a -> 'b -> 'c) ->
'a QCheck.Gen.t -> 'b QCheck.Gen.t -> 'c QCheck.Gen.t
val map3 :
('a -> 'b -> 'c -> 'd) ->
'a QCheck.Gen.t ->
'b QCheck.Gen.t -> 'c QCheck.Gen.t -> 'd QCheck.Gen.t
val map_keep_input :
('a -> 'b) -> 'a QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
val ( >|= ) : 'a QCheck.Gen.t -> ('a -> 'b) -> 'b QCheck.Gen.t
val oneof : 'a QCheck.Gen.t list -> 'a QCheck.Gen.t
val oneofl : 'a list -> 'a QCheck.Gen.t
val oneofa : 'a array -> 'a QCheck.Gen.t
val frequency : (int * 'a QCheck.Gen.t) list -> 'a QCheck.Gen.t
val frequencyl : (int * 'a) list -> 'a QCheck.Gen.t
val frequencya : (int * 'a) array -> 'a QCheck.Gen.t
val shuffle_a : 'a array -> unit QCheck.Gen.t
val shuffle_l : 'a list -> 'a list QCheck.Gen.t
val unit : unit QCheck.Gen.t
val bool : bool QCheck.Gen.t
val float : float QCheck.Gen.t
val pfloat : float QCheck.Gen.t
val nfloat : float QCheck.Gen.t
val nat : int QCheck.Gen.t
val neg_int : int QCheck.Gen.t
val pint : int QCheck.Gen.t
val int : int QCheck.Gen.t
val small_nat : int QCheck.Gen.t
val small_int : int QCheck.Gen.t
val int_bound : int -> int QCheck.Gen.t
val int_range : int -> int -> int QCheck.Gen.t
val ( -- ) : int -> int -> int QCheck.Gen.t
val ui32 : int32 QCheck.Gen.t
val ui64 : int64 QCheck.Gen.t
val list : 'a QCheck.Gen.t -> 'a list QCheck.Gen.t
val list_size :
int QCheck.Gen.t -> 'a QCheck.Gen.t -> 'a list QCheck.Gen.t
val list_repeat : int -> 'a QCheck.Gen.t -> 'a list QCheck.Gen.t
val array : 'a QCheck.Gen.t -> 'a array QCheck.Gen.t
val array_size :
int QCheck.Gen.t -> 'a QCheck.Gen.t -> 'a array QCheck.Gen.t
val array_repeat : int -> 'a QCheck.Gen.t -> 'a array QCheck.Gen.t
val opt : 'a QCheck.Gen.t -> 'a option QCheck.Gen.t
val pair : 'a QCheck.Gen.t -> 'b QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
val triple :
'a QCheck.Gen.t ->
'b QCheck.Gen.t -> 'c QCheck.Gen.t -> ('a * 'b * 'c) QCheck.Gen.t
val quad :
'a QCheck.Gen.t ->
'b QCheck.Gen.t ->
'c QCheck.Gen.t ->
'd QCheck.Gen.t -> ('a * 'b * 'c * 'd) QCheck.Gen.t
val char : char QCheck.Gen.t
val printable : char QCheck.Gen.t
val numeral : char QCheck.Gen.t
val string_size :
?gen:char QCheck.Gen.t -> int QCheck.Gen.t -> string QCheck.Gen.t
val string : ?gen:char QCheck.Gen.t -> string QCheck.Gen.t
val small_string : ?gen:char QCheck.Gen.t -> string QCheck.Gen.t
val join : 'a QCheck.Gen.t QCheck.Gen.t -> 'a QCheck.Gen.t
val sized : 'a QCheck.Gen.sized -> 'a QCheck.Gen.t
val sized_size :
int QCheck.Gen.t -> 'a QCheck.Gen.sized -> 'a QCheck.Gen.t
val fix :
('a QCheck.Gen.sized -> 'a QCheck.Gen.sized) -> 'a QCheck.Gen.sized
val generate :
?rand:Random.State.t -> n:int -> 'a QCheck.Gen.t -> 'a list
val generate1 : ?rand:Random.State.t -> 'a QCheck.Gen.t -> 'a
end
module Print :
sig
type 'a t = 'a -> string
val int : int QCheck.Print.t
val bool : bool QCheck.Print.t
val float : float QCheck.Print.t
val char : char QCheck.Print.t
val string : string QCheck.Print.t
val option : 'a QCheck.Print.t -> 'a option QCheck.Print.t
val pair :
'a QCheck.Print.t -> 'b QCheck.Print.t -> ('a * 'b) QCheck.Print.t
val triple :
'a QCheck.Print.t ->
'b QCheck.Print.t ->
'c QCheck.Print.t -> ('a * 'b * 'c) QCheck.Print.t
val quad :
'a QCheck.Print.t ->
'b QCheck.Print.t ->
'c QCheck.Print.t ->
'd QCheck.Print.t -> ('a * 'b * 'c * 'd) QCheck.Print.t
val list : 'a QCheck.Print.t -> 'a list QCheck.Print.t
val array : 'a QCheck.Print.t -> 'a array QCheck.Print.t
val comap : ('a -> 'b) -> 'b QCheck.Print.t -> 'a QCheck.Print.t
end
module Iter :
sig
type 'a t = ('a -> unit) -> unit
val empty : 'a QCheck.Iter.t
val return : 'a -> 'a QCheck.Iter.t
val ( <*> ) :
('a -> 'b) QCheck.Iter.t -> 'a QCheck.Iter.t -> 'b QCheck.Iter.t
val ( >>= ) :
'a QCheck.Iter.t -> ('a -> 'b QCheck.Iter.t) -> 'b QCheck.Iter.t
val map : ('a -> 'b) -> 'a QCheck.Iter.t -> 'b QCheck.Iter.t
val map2 :
('a -> 'b -> 'c) ->
'a QCheck.Iter.t -> 'b QCheck.Iter.t -> 'c QCheck.Iter.t
val ( >|= ) : 'a QCheck.Iter.t -> ('a -> 'b) -> 'b QCheck.Iter.t
val append : 'a QCheck.Iter.t -> 'a QCheck.Iter.t -> 'a QCheck.Iter.t
val ( <+> ) : 'a QCheck.Iter.t -> 'a QCheck.Iter.t -> 'a QCheck.Iter.t
val of_list : 'a list -> 'a QCheck.Iter.t
val of_array : 'a array -> 'a QCheck.Iter.t
val pair :
'a QCheck.Iter.t -> 'b QCheck.Iter.t -> ('a * 'b) QCheck.Iter.t
val triple :
'a QCheck.Iter.t ->
'b QCheck.Iter.t -> 'c QCheck.Iter.t -> ('a * 'b * 'c) QCheck.Iter.t
val quad :
'a QCheck.Iter.t ->
'b QCheck.Iter.t ->
'c QCheck.Iter.t ->
'd QCheck.Iter.t -> ('a * 'b * 'c * 'd) QCheck.Iter.t
val find : ('a -> bool) -> 'a QCheck.Iter.t -> 'a option
end
module Shrink :
sig
type 'a t = 'a -> 'a QCheck.Iter.t
val nil : 'a QCheck.Shrink.t
val int : int QCheck.Shrink.t
val option : 'a QCheck.Shrink.t -> 'a option QCheck.Shrink.t
val string : string QCheck.Shrink.t
val list : ?shrink:'a QCheck.Shrink.t -> 'a list QCheck.Shrink.t
val array : ?shrink:'a QCheck.Shrink.t -> 'a array QCheck.Shrink.t
val pair :
'a QCheck.Shrink.t -> 'b QCheck.Shrink.t -> ('a * 'b) QCheck.Shrink.t
val triple :
'a QCheck.Shrink.t ->
'b QCheck.Shrink.t ->
'c QCheck.Shrink.t -> ('a * 'b * 'c) QCheck.Shrink.t
val quad :
'a QCheck.Shrink.t ->
'b QCheck.Shrink.t ->
'c QCheck.Shrink.t ->
'd QCheck.Shrink.t -> ('a * 'b * 'c * 'd) QCheck.Shrink.t
end
type 'a arbitrary = {
gen : 'a QCheck.Gen.t;
print : ('a -> string) option;
small : ('a -> int) option;
shrink : 'a QCheck.Shrink.t option;
collect : ('a -> string) option;
}
val make :
?print:'a QCheck.Print.t ->
?small:('a -> int) ->
?shrink:'a QCheck.Shrink.t ->
?collect:('a -> string) -> 'a QCheck.Gen.t -> 'a QCheck.arbitrary
val set_print :
'a QCheck.Print.t -> 'a QCheck.arbitrary -> 'a QCheck.arbitrary
val set_small : ('a -> int) -> 'a QCheck.arbitrary -> 'a QCheck.arbitrary
val set_shrink :
'a QCheck.Shrink.t -> 'a QCheck.arbitrary -> 'a QCheck.arbitrary
val set_collect :
('a -> string) -> 'a QCheck.arbitrary -> 'a QCheck.arbitrary
module TestResult :
sig
type 'a counter_ex = { instance : 'a; shrink_steps : int; }
type 'a failed_state = 'a QCheck.TestResult.counter_ex list
type 'a state =
Success
| Failed of 'a QCheck.TestResult.failed_state
| Error of 'a QCheck.TestResult.counter_ex * exn
type 'a t = {
mutable state : 'a QCheck.TestResult.state;
mutable count : int;
mutable count_gen : int;
collect_tbl : (string, int) Hashtbl.t lazy_t;
}
end
module Test :
sig
type 'a cell
val make_cell :
?count:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string ->
'a QCheck.arbitrary -> ('a -> bool) -> 'a QCheck.Test.cell
val get_arbitrary : 'a QCheck.Test.cell -> 'a QCheck.arbitrary
val get_law : 'a QCheck.Test.cell -> 'a -> bool
val get_name : 'a QCheck.Test.cell -> string option
val set_name : 'a QCheck.Test.cell -> string -> unit
type t = Test : 'a QCheck.Test.cell -> QCheck.Test.t
val make :
?count:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string -> 'a QCheck.arbitrary -> ('a -> bool) -> QCheck.Test.t
exception Test_fail of string * string list
exception Test_error of string * string * exn * string
val print_instance : 'a QCheck.arbitrary -> 'a -> string
val print_c_ex :
'a QCheck.arbitrary -> 'a QCheck.TestResult.counter_ex -> string
val print_fail :
'a QCheck.arbitrary ->
string -> 'a QCheck.TestResult.counter_ex list -> string
val print_error :
?st:string ->
'a QCheck.arbitrary ->
string -> 'a QCheck.TestResult.counter_ex * exn -> string
val print_test_fail : string -> string list -> string
val print_test_error : string -> string -> exn -> string -> string
val check_result :
'a QCheck.Test.cell -> 'a QCheck.TestResult.t -> unit
type 'a callback =
string -> 'a QCheck.Test.cell -> 'a QCheck.TestResult.t -> unit
val check_cell :
?call:'a QCheck.Test.callback ->
?rand:Random.State.t -> 'a QCheck.Test.cell -> 'a QCheck.TestResult.t
val check_cell_exn :
?call:'a QCheck.Test.callback ->
?rand:Random.State.t -> 'a QCheck.Test.cell -> unit
val check_exn : ?rand:Random.State.t -> QCheck.Test.t -> unit
end
val choose : 'a QCheck.arbitrary list -> 'a QCheck.arbitrary
val unit : unit QCheck.arbitrary
val bool : bool QCheck.arbitrary
val float : float QCheck.arbitrary
val pos_float : float QCheck.arbitrary
val neg_float : float QCheck.arbitrary
val int : int QCheck.arbitrary
val int_bound : int -> int QCheck.arbitrary
val int_range : int -> int -> int QCheck.arbitrary
val small_nat : int QCheck.arbitrary
val small_int : int QCheck.arbitrary
val ( -- ) : int -> int -> int QCheck.arbitrary
val int32 : int32 QCheck.arbitrary
val int64 : int64 QCheck.arbitrary
val pos_int : int QCheck.arbitrary
val small_int_corners : unit -> int QCheck.arbitrary
val neg_int : int QCheck.arbitrary
val char : char QCheck.arbitrary
val printable_char : char QCheck.arbitrary
val numeral_char : char QCheck.arbitrary
val string_gen_of_size :
int QCheck.Gen.t -> char QCheck.Gen.t -> string QCheck.arbitrary
val string_gen : char QCheck.Gen.t -> string QCheck.arbitrary
val string : string QCheck.arbitrary
val small_string : string QCheck.arbitrary
val string_of_size : int QCheck.Gen.t -> string QCheck.arbitrary
val printable_string : string QCheck.arbitrary
val printable_string_of_size : int QCheck.Gen.t -> string QCheck.arbitrary
val small_printable_string : string QCheck.arbitrary
val numeral_string : string QCheck.arbitrary
val numeral_string_of_size : int QCheck.Gen.t -> string QCheck.arbitrary
val list : 'a QCheck.arbitrary -> 'a list QCheck.arbitrary
val list_of_size :
int QCheck.Gen.t -> 'a QCheck.arbitrary -> 'a list QCheck.arbitrary
val array : 'a QCheck.arbitrary -> 'a array QCheck.arbitrary
val array_of_size :
int QCheck.Gen.t -> 'a QCheck.arbitrary -> 'a array QCheck.arbitrary
val pair :
'a QCheck.arbitrary -> 'b QCheck.arbitrary -> ('a * 'b) QCheck.arbitrary
val triple :
'a QCheck.arbitrary ->
'b QCheck.arbitrary ->
'c QCheck.arbitrary -> ('a * 'b * 'c) QCheck.arbitrary
val quad :
'a QCheck.arbitrary ->
'b QCheck.arbitrary ->
'c QCheck.arbitrary ->
'd QCheck.arbitrary -> ('a * 'b * 'c * 'd) QCheck.arbitrary
val option : 'a QCheck.arbitrary -> 'a option QCheck.arbitrary
val fun1 :
'a QCheck.arbitrary -> 'b QCheck.arbitrary -> ('a -> 'b) QCheck.arbitrary
val fun2 :
'a QCheck.arbitrary ->
'b QCheck.arbitrary ->
'c QCheck.arbitrary -> ('a -> 'b -> 'c) QCheck.arbitrary
val oneofl :
?print:'a QCheck.Print.t ->
?collect:('a -> string) -> 'a list -> 'a QCheck.arbitrary
val oneofa :
?print:'a QCheck.Print.t ->
?collect:('a -> string) -> 'a array -> 'a QCheck.arbitrary
val oneof : 'a QCheck.arbitrary list -> 'a QCheck.arbitrary
val always : ?print:'a QCheck.Print.t -> 'a -> 'a QCheck.arbitrary
val frequency :
?print:'a QCheck.Print.t ->
?small:('a -> int) ->
?shrink:'a QCheck.Shrink.t ->
?collect:('a -> string) ->
(int * 'a QCheck.arbitrary) list -> 'a QCheck.arbitrary
val frequencyl :
?print:'a QCheck.Print.t ->
?small:('a -> int) -> (int * 'a) list -> 'a QCheck.arbitrary
val frequencya :
?print:'a QCheck.Print.t ->
?small:('a -> int) -> (int * 'a) array -> 'a QCheck.arbitrary
val map :
?rev:('b -> 'a) ->
('a -> 'b) -> 'a QCheck.arbitrary -> 'b QCheck.arbitrary
val map_same_type :
('a -> 'a) -> 'a QCheck.arbitrary -> 'a QCheck.arbitrary
val map_keep_input :
?print:'b QCheck.Print.t ->
?small:('b -> int) ->
('a -> 'b) -> 'a QCheck.arbitrary -> ('a * 'b) QCheck.arbitrary
end