/usr/lib/ocaml/reins/quickcheck.mli is in libreins-ocaml-dev 0.1a-6build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | (**************************************************************************)
(* The OCaml Reins Library *)
(* *)
(* Copyright 2007 Mike Furr. *)
(* All rights reserved. This file is distributed under the terms of the *)
(* GNU Lesser General Public License version 2.1 with the linking *)
(* exception given in the COPYING file. *)
(**************************************************************************)
(** Random Testing Framework
This module implements a random testing framework based on
Claessen and Hughes's QuickCheck library for Haskell.
*)
exception Trivial
module type Law =
sig
module Arg : Types.Mono.Arbitrary
(** A value of type Arg.t will be randomly generated and passed to
the law function below. *)
val desc : string
(** Description of the test. This value is simply stored in the
result of the Check functor below for easy access by a test
driver.
*)
val law : Arg.t -> bool
(** The function that implements the law. The function should
return [true] when the law holds for the input and [false] if
the law does not hold. It may also raise the exception
{!Trivial} if the law only trivially applies to the input, in
which case a new input will be attempted.
*)
end
module type Config =
sig
val num_iterations : int
(** This value determines how many inputs will be passed to the
{!Law.law} function. Values that are signaled to be trivial
are not counted.
*)
val size_arg : int option
(** This value is passed as the option size paramter to the
function {!Types.Mono.Arbitrary.gen} when generating input
for a law.
*)
val max_trivial_percentage : float
(** This value determines how many inputs are allowed to be
classified as trivial before giving up and classifying the law
as failed. The value should be in the range \[0\.0,1\.0)
*)
end
module Check :
functor (Conf : Config) ->
functor (L : Law) -> sig
val desc : string
(** A copy of the test description supplied by the Law
module *)
val test : Random.State.t -> unit
(** The function which executes the series random tests on law
[L] *)
end
|