diff --git a/.gitignore b/.gitignore index 4d546e3a4ec5d457ef4518aa7a5e0b2db9c3690c..35c6a4a71f8ba239aea9c3664d0841c691deb67a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ _build TAGS *.docdir man -qcheck.install +*.install *.tar.gz *.byte .merlin diff --git a/.ocamlinit b/.ocamlinit index 8f0247113777b582cc62921c58f1dc4bef7ed009..0411e858bacdfdaa66c294e511c99997cfa48ee2 100644 --- a/.ocamlinit +++ b/.ocamlinit @@ -1,9 +1,2 @@ -#directory "_build/src";; -#use "topfind";; -#require "oUnit";; -#require "unix";; -#require "bytes";; -#load "qcheck.cma";; -open QCheck;; -(* vim: syntax=ocaml: -*) + +module Q = QCheck;; diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..ded18f934f1ffba53f149c05472874ea2a0a3109 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: c +install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-docker.sh +script: bash -ex .travis-docker.sh +services: +- docker +env: + global: + - PINS="qcheck:. qcheck-core:. qcheck-ounit:. qcheck-alcotest:." + - DISTRO="ubuntu-16.04" + matrix: + - PACKAGE="qcheck" OCAML_VERSION="4.03.0" DEPOPTS="ounit alcotest" + - PACKAGE="qcheck" OCAML_VERSION="4.04.2" DEPOPTS="ounit alcotest" + - PACKAGE="qcheck" OCAML_VERSION="4.05.0" DEPOPTS="ounit alcotest" + - PACKAGE="qcheck" OCAML_VERSION="4.06.0" DEPOPTS="ounit alcotest" + - PACKAGE="qcheck" OCAML_VERSION="4.07.0" DEPOPTS="ounit alcotest" diff --git a/CHANGELOG.md b/CHANGELOG.md index e6af66497b2c6a713f5aebfe5f8eef0b48dcd2da..6ba574a2eafe6c8f34ad12d20205d86077da710e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changes +## 0.9 + +- add `qcheck-ounit` sublibrary +- use environment variables to configure `qcheck-alcotest` tests +- alcotest backend for qcheck +- make `qcheck.ounit` tests verbose by default +- make `qcheck` is a compatibility library, depends on `qcheck-core` +- split lib into `qcheck` and `qcheck.ounit` +- add `TestResult.is_success` helper +- give access to list of instances in test results +- allow setting `time_between_msg` in runner + +- chore: remove submodule +- chore: add travis support +- doc: explanations about qcheck.ounit runners +- doc: update readme + +## 0.8 + +- migrate to jbuilder +- fix warnings +- add some useful functions +- update oasis files (close #48) +- update copyright header (closes #47) + ## 0.7 - switch to BSD license, make it more explicit (close #43) diff --git a/Makefile b/Makefile index f6d9e54a12f01484993d6f072c2d8014ad5e1974..bc52cfe10d14fa93f7029b6a974b4223058fe9ab 100644 --- a/Makefile +++ b/Makefile @@ -2,28 +2,35 @@ all: build test build: - jbuilder build @install + @dune build @install test: - jbuilder runtest --no-buffer + @dune runtest --no-buffer clean: - jbuilder clean + @dune clean doc: - jbuilder build @doc + @dune build @doc -EXAMPLES=$(addprefix example/, QCheck_test.exe QCheck_ounit_test.exe QCheck_runner_test.exe) +example-test: + @dune exec example/ounit/QCheck_test.exe -examples: - jbuilder build $(EXAMPLES) +example-ounit-test: + @dune exec example/ounit/QCheck_ounit_test.exe + +example-runner: + @dune exec example/QCheck_runner_test.exe + +example-alcotest: + @dune exec example/alcotest/QCheck_alcotest_test.exe VERSION=$(shell awk '/^version:/ {print $$2}' qcheck.opam) update_next_tag: @echo "update version to $(VERSION)..." - sed -i "s/NEXT_VERSION/$(VERSION)/g" src/*.ml src/*.mli - sed -i "s/NEXT_RELEASE/$(VERSION)/g" src/*.ml src/*.mli + sed -i "s/NEXT_VERSION/$(VERSION)/g" `find src -name '*.ml' -or -name '*.mli'` + sed -i "s/NEXT_RELEASE/$(VERSION)/g" `find src -name '*.ml' -or -name '*.mli'` release: update_next_tag @echo "release version $(VERSION)..." diff --git a/README.adoc b/README.adoc index 26871f593121ca21ed66f5ffc022c3beb22bd9ed..eb87e2c40d97df1965aec16342a99d0c8ac03cd8 100644 --- a/README.adoc +++ b/README.adoc @@ -17,6 +17,8 @@ can be useful too, for generating random values. toc::[] +image::https://travis-ci.org/c-cube/qcheck.svg?branch=master[alt="Build Status", link="https://travis-ci.org/c-cube/qcheck"] + == Use See the documentation. I also wrote @@ -49,6 +51,9 @@ and type the following to load QCheck: #require "qcheck";; ---- +NOTE: alternatively, it is now possible to locally do: `dune utop src` +to load `qcheck`. + === List Reverse is Involutive We write a random test for checking that `List.rev (List.rev l) = l` for @@ -290,8 +295,9 @@ or an error number otherwise. http://ounit.forge.ocamlcore.org/[OUnit] is a popular unit-testing framework for OCaml. -QCheck provides some helpers, in `QCheck_runner`, to convert its random tests -into OUnit tests that can be part of a wider test-suite. +QCheck provides a sub-library `qcheck-ounit` with some helpers, in `QCheck_ounit`, +to convert its random tests into OUnit tests that can be part of a wider +test-suite. [source,OCaml] ---- @@ -311,6 +317,58 @@ let _ = let open OUnit in run_test_tt_main ("tests" >::: - List.map QCheck_runner.to_ounit_test [passing; failing]) + List.map QCheck_ounit.to_ounit_test [passing; failing]) + +---- + +NOTE: the package `qcheck` contains the module `QCheck_runner` +which contains both custom runners and OUnit-based runners. + +=== Integration within alcotest + +https://github.com/mirage/alcotest/[Alcotest] is a simple and colorful test framework for +OCaml. QCheck now provides a sub-library `qcheck-alcotest` to +easily integrate into an alcotest test suite: +[source,OCaml] ---- + +let passing = + QCheck.Test.make ~count:1000 + ~name:"list_rev_is_involutive" + QCheck.(list small_int) + (fun l -> List.rev (List.rev l) = l);; + +let failing = + QCheck.Test.make ~count:10 + ~name:"fail_sort_id" + QCheck.(list small_int) + (fun l -> l = List.sort compare l);; + + +let () = + let suite = + List.map QCheck_alcotest.to_alcotest + [ passing; failing] + in + Alcotest.run "my test" [ + "suite", suite + ] + +---- + +=== Compatibility notes + +Starting with 0.9, the library is split into several components: + +- `qcheck-core` depends only on unix and bytes. It contains the module + `QCheck` and a `QCheck_base_runner` module with our custom runners. +- `qcheck-ounit` provides an integration layer for `OUnit` +- `qcheck` provides a compatibility API with older versions of qcheck, + using both `qcheck-core` and `qcheck-ounit`. + It provides `QCheck_runner` which is similar to older versions and contains + both custom and Ounit-based runners. +- `qcheck-alcotest` provides an integration layer with `alcotest` + +Normally, for contributors, +`opam pin https://github.com/c-cube/qcheck` will pin all these packages. diff --git a/docs/0.5.1/QCheck.Gen.html b/docs/0.5.1/QCheck.Gen.html deleted file mode 100644 index 02bc67f881e584b0f71d04720b4f4952ed78ac9e..0000000000000000000000000000000000000000 --- a/docs/0.5.1/QCheck.Gen.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - - - - - - -QCheck.Gen - - - -

Module QCheck.Gen

- -
module Gen: sig .. end
-

Generate Random Values


-
-
- -
type 'a t = Random.State.t -> 'a 
-
-A random generator for values of type 'a
-
- - -
type 'a sized = int -> Random.State.t -> 'a 
-
-Random generator with a size bound
-
- - -
val return : 'a -> 'a t
-Create a constant generator
-
- -
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
-Monadic bind for writing dependent generators. First generates an 'a and then - passes it to the given function, to generate a 'b.
-
- -
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
-Infix operator for composing a function generator and an argument generator - into a result generator
-
- -
val map : ('a -> 'b) -> 'a t -> 'b t
-map f g transforms a generator g by applying f to each generated element
-
- -
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
-map f g1 g2 transforms two generators g1 and g2 by applying f to each - pair of generated elements
-
- -
val map3 : ('a -> 'b -> 'c -> 'd) ->
'a t -> 'b t -> 'c t -> 'd t
-map f g1 g2 g3 transforms two generators g1, g2, and g3 by applying f - to each triple of generated elements
-
- -
val map_keep_input : ('a -> 'b) -> 'a t -> ('a * 'b) t
-map f g transforms a generator g by applying f to each generated element. - Returns both the generated elememt from g and the output from f.
-
- -
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
-An infix synonym for QCheck.Gen.map
-
- -
val oneof : 'a t list -> 'a t
-Constructs a generator that selects among a given list of generators
-
- -
val oneofl : 'a list -> 'a t
-Constructs a generator that selects among a given list of values
-
- -
val oneofa : 'a array -> 'a t
-Constructs a generator that selects among a given array of values
-
- -
val frequency : (int * 'a t) list -> 'a t
-Constructs a generator that selects among a given list of generators. - Each of the given generators are chosen based on a positive integer weight.
-
- -
val frequencyl : (int * 'a) list -> 'a t
-Constructs a generator that selects among a given list of values. - Each of the given values are chosen based on a positive integer weight.
-
- -
val frequencya : (int * 'a) array -> 'a t
-Constructs a generator that selects among a given array of values. - Each of the array entries are chosen based on a positive integer weight.
-
- -
val shuffle_a : 'a array -> unit t
-Shuffle the array in place
-
- -
val shuffle_l : 'a list -> 'a list t
-Creates a generator of shuffled lists
-
- -
val unit : unit t
-The unit generator
-
- -
val bool : bool t
-The Boolean generator
-
- -
val float : float t
-Generates floating point numbers
-
- -
val pfloat : float t
-Generates positive floating point numbers
-
- -
val nfloat : float t
-Generates negative floating point numbers
-
- -
val nat : int t
-Generates small natural numbers
-
- -
val neg_int : int t
-Generates negative integers
-
- -
val pint : int t
-Generates positive integers uniformly
-
- -
val int : int t
-Generates integers uniformly
-
- -
val small_nat : int t
-Synonym to QCheck.Gen.nat
-Since 0.5.1
-
- -
val small_int : int t
-Small signed integers (not just QCheck.Gen.nat)
-
- -
val int_bound : int -> int t
-Uniform integer generator producing integers within 0... bound.
-Raises Invalid_argument if the bound is too high (typically 2^30)
-
- -
val int_range : int -> int -> int t
-Uniform integer generator producing integers within low,high
-Raises Invalid_argument if the range is too large (typically 2^30)
-
- -
val (--) : int -> int -> int t
-Synonym to QCheck.Gen.int_range
-
- -
val ui32 : int32 t
-Generates (unsigned) int32 values
-
- -
val ui64 : int64 t
-Generates (unsigned) int64 values
-
- -
val list : 'a t -> 'a list t
-Builds a list generator from an element generator. List size is generated by QCheck.Gen.nat
-
- -
val list_size : int t -> 'a t -> 'a list t
-Builds a list generator from a (non-negative) size generator and an element generator
-
- -
val list_repeat : int -> 'a t -> 'a list t
-list_repeat i g builds a list generator from exactly i elements generated by g
-
- -
val array : 'a t -> 'a array t
-Builds an array generator from an element generator. Array size is generated by QCheck.Gen.nat
-
- -
val array_size : int t -> 'a t -> 'a array t
-Builds an array generator from a (non-negative) size generator and an element generator
-
- -
val array_repeat : int -> 'a t -> 'a array t
-array_repeat i g builds an array generator from exactly i elements generated by g
-
- -
val opt : 'a t -> 'a option t
-An option generator
-
- -
val pair : 'a t -> 'b t -> ('a * 'b) t
-Generates pairs
-
- -
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-Generates triples
-
- -
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-Generates quadruples
-Since 0.5.1
-
- -
val char : char t
-Generates characters upto character code 255
-
- -
val printable : char t
-Generates printable characters
-
- -
val numeral : char t
-Generates numeral characters
-
- -
val string_size : ?gen:char t -> int t -> string t
-Builds a string generator from a (non-negative) size generator. - Accepts an optional character generator (the default is QCheck.Gen.char)
-
- -
val string : ?gen:char t -> string t
-Builds a string generator. String size is generated by QCheck.Gen.nat. - Accepts an optional character generator (the default is QCheck.Gen.char)
-
- -
val small_string : ?gen:char t -> string t
-Builds a string generator. String size is in the range 0-10. - Accepts an optional character generator (the default is QCheck.Gen.char)
-
- -
val join : 'a t t -> 'a t
-Collapses a generator of generators to simply a generator.
-Since 0.5
-
- -
val sized : 'a sized -> 'a t
-Create a generator from a size-bounded generator by first - generating a size using QCheck.Gen.nat and passing the result to the size-bounded generator
-
- -
val sized_size : int t -> 'a sized -> 'a t
-Create a generator from a size-bounded generator by first - generating a size using the integer generator and passing the result - to the size-bounded generator
-Since 0.5
-
- -
val fix : ('a sized -> 'a sized) -> 'a sized
-Fixpoint combinator for generating recursive, size-bounded data types. - The passed size-parameter should decrease to ensure termination.
-
-
-Example: -
  type tree = Leaf of int | Node of tree * tree
-
-  let leaf x = Leaf x
-  let node x y = Node (x,y)
-
-  let g = QCheck.Gen.(sized @@ fix
-    (fun self n -> match n with
-      | 0 -> map leaf nat
-      | n ->
-        frequency
-          [1, map leaf nat;
-           2, map2 node (self (n/2)) (self (n/2))]
-      ))
-
-  

- -
val generate : ?rand:Random.State.t -> n:int -> 'a t -> 'a list
-generate ~n g generates n instances of g
-
- -
val generate1 : ?rand:Random.State.t -> 'a t -> 'a
-generate1 g generates one instance of g
-
- \ No newline at end of file diff --git a/docs/0.5.1/QCheck.Iter.html b/docs/0.5.1/QCheck.Iter.html deleted file mode 100644 index 21a02b03a42ac7ba670720b74f6c024745808572..0000000000000000000000000000000000000000 --- a/docs/0.5.1/QCheck.Iter.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - -QCheck.Iter - - - -

Module QCheck.Iter

- -
module Iter: sig .. end
-

Iterators

-

- - Compatible with the library "sequence". An iterator i is simply - a function that accepts another function f (of type 'a -> unit) - and calls f on a sequence of elements f x1; f x2; ...; f xn.
-

-
- -
type 'a t = ('a -> unit) -> unit 
- - -
val empty : 'a t
-
val return : 'a -> 'a t
-
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
-
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
-
val map : ('a -> 'b) -> 'a t -> 'b t
-
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
-
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
-
val append : 'a t -> 'a t -> 'a t
-
val (<+>) : 'a t -> 'a t -> 'a t
-Synonym to QCheck.Iter.append
-
- -
val of_list : 'a list -> 'a t
-
val of_array : 'a array -> 'a t
-
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-
val find : ('a -> bool) -> 'a t -> 'a option
\ No newline at end of file diff --git a/docs/0.5.1/QCheck.Print.html b/docs/0.5.1/QCheck.Print.html deleted file mode 100644 index 134f5945317f52739b6700c92af693df261fa731..0000000000000000000000000000000000000000 --- a/docs/0.5.1/QCheck.Print.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - -QCheck.Print - - - -

Module QCheck.Print

- -
module Print: sig .. end
-

Show Values


-
-
- -
type 'a t = 'a -> string 
- - -
val int : int t
-
val bool : bool t
-
val float : float t
-
val char : char t
-
val string : string t
-
val option : 'a t -> 'a option t
-
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-
val list : 'a t -> 'a list t
-
val array : 'a t -> 'a array t
-
val comap : ('a -> 'b) -> 'b t -> 'a t
\ No newline at end of file diff --git a/docs/0.5.1/QCheck.Shrink.html b/docs/0.5.1/QCheck.Shrink.html deleted file mode 100644 index a49dec747f0768b11973a296d58775cef81e5661..0000000000000000000000000000000000000000 --- a/docs/0.5.1/QCheck.Shrink.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - -QCheck.Shrink - - - -

Module QCheck.Shrink

- -
module Shrink: sig .. end
-

Shrink Values

-

- - Shrinking is used to reduce the size of a counter-example. It tries - to make the counter-example smaller by decreasing it, or removing - elements, until the property to test holds again; then it returns the - smallest value that still made the test fail
-

-
- -
type 'a t = 'a -> 'a QCheck.Iter.t 
-
-Given a counter-example, return an iterator on smaller versions - of the counter-example
-
- - -
val nil : 'a t
-No shrink
-
- -
val int : int t
-
val option : 'a t -> 'a option t
-
val string : string t
-
val list : ?shrink:'a t -> 'a list t
-Try to shrink lists by removing elements one by one.
-
-
shrink : if provided, will be used to also try to reduce - the elements of the list themselves (e.g. in an int list - one can try to decrease the integers)
- -
val array : ?shrink:'a t -> 'a array t
-Shrink an array.
-
-
shrink : see QCheck.Shrink.list
- -
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t ->
'd t -> ('a * 'b * 'c * 'd) t
\ No newline at end of file diff --git a/docs/0.5.1/QCheck.Test.html b/docs/0.5.1/QCheck.Test.html deleted file mode 100644 index 4aab6a9a51c625d43ff74c8531007b0692e9d55d..0000000000000000000000000000000000000000 --- a/docs/0.5.1/QCheck.Test.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - -QCheck.Test - - - -

Module QCheck.Test

- -
module Test: sig .. end

- -
type 'a cell 
-
-A single property test
-
- - -
val make_cell : ?count:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string -> 'a QCheck.arbitrary -> ('a -> bool) -> 'a cell
-make arb prop builds a test that checks property prop on instances - of the generator arb.
-
-
count : number of test cases to run, counting only - the test cases which satisfy preconditions.
-
max_gen : maximum number of times the generation function - is called in total to replace inputs that do not satisfy - preconditions (should be >= count)
-
max_fail : maximum number of failures before we stop generating - inputs. This is useful if shrinking takes too much time.
-
small : kept for compatibility reasons; if provided, replaces - the field arbitrary.small. - If there is no shrinking function but there is a small - function, only the smallest failures will be printed.
-
name : the name of the test
- -
val get_arbitrary : 'a cell -> 'a QCheck.arbitrary
-
val get_law : 'a cell -> 'a -> bool
-
val get_name : 'a cell -> string option
-
val set_name : 'a cell -> string -> unit
-
type t = 
- - - - -
-| -Test : 'a cell -> t(*
-Same as 'a cell, but masking the type parameter. This allows to - put tests on different types in the same list of tests.
-
-
*)
- - - -
val make : ?count:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string -> 'a QCheck.arbitrary -> ('a -> bool) -> t
-make arb prop builds a test that checks property prop on instances - of the generator arb. - See QCheck.Test.make_cell for a description of the parameters.
-
-
-
Running the test

- -
exception Test_fail of string * string list
-
-Exception raised when a test failed, with the list of counter-examples. - Test_fail (name, l) means test name failed on elements of l
-
- -
exception Test_error of string * string * exn * string
-
-Exception raised when a test raised an exception e, with - the sample that triggered the exception. - Test_error (name, i, e, st) - means name failed on i with exception e, and st is the - stacktrace (if enabled) or an empty 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 cell -> 'a QCheck.TestResult.t -> unit
-check_result cell res checks that res is Ok _, and returns unit. - Otherwise, it raises some exception
-Raises -
- -
type 'a callback = string -> 'a cell -> 'a QCheck.TestResult.t -> unit 
-
-Callback executed after each test has been run. - f name cell res means test cell, named name, gave res
-
- - -
val check_cell : ?call:'a callback ->
?rand:Random.State.t -> 'a cell -> 'a QCheck.TestResult.t
-check ~rand test generates up to count random - values of type 'a using arbitrary and the random state st. The - predicate law is called on them and if it returns false or raises an - exception then we have a counter example for the law.
-Returns the result of the test
-
-
call : function called on each test case, with the result
- -
val check_cell_exn : ?call:'a callback ->
?rand:Random.State.t -> 'a cell -> unit
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
-Raises -
- -
val check_exn : ?rand:Random.State.t -> t -> unit
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
-Raises -
- \ No newline at end of file diff --git a/docs/0.5.1/QCheck.TestResult.html b/docs/0.5.1/QCheck.TestResult.html deleted file mode 100644 index 3675be52d94acd9063d9bf0054c3aa15fb3639b6..0000000000000000000000000000000000000000 --- a/docs/0.5.1/QCheck.TestResult.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - -QCheck.TestResult - - - -

Module QCheck.TestResult

- -
module TestResult: sig .. end
-Result of running a test
-
-
- -
type 'a counter_ex = {
- - - - - - - - - -
-   -instance : 'a;(*
-The counter-example(s)
-
-
*)
-   -shrink_steps : int;(*
-How many shrinking steps for this counterex
-
-
*)
-} - - - -
type 'a failed_state = 'a counter_ex list 
- - -
type 'a state = 
- - - - - - - - - - - - - - -
-| -Success
-| -Failed of 'a failed_state(*
-Failed instances
-
-
*)
-| -Error of 'a counter_ex * exn(*
-Error, and instance that triggered it
-
-
*)
- - - -
type 'a t = {
- - - - - - - - - - - - - - - - - - - -
-   -mutable state : 'a state;
-   -mutable count : int;
-   -mutable count_gen : int;
-   -collect_tbl : (string, int) Hashtbl.t lazy_t;
-} - - - \ No newline at end of file diff --git a/docs/0.5.1/QCheck.html b/docs/0.5.1/QCheck.html deleted file mode 100644 index 845f3697c4e3acca42c55fef4cb3e525daa8381b..0000000000000000000000000000000000000000 --- a/docs/0.5.1/QCheck.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - - - - - - - - - - - - - -QCheck - - - -

Module QCheck

- -
module QCheck: sig .. end
-

Quickcheck inspired property-based testing


-
-
-
-The library takes inspiration from Haskell's QuickCheck library. The -rough idea is that the programer describes invariants that values of -a certain type need to satisfy ("properties"), as functions from this type -to bool. She also needs to desribe how to generate random values of the type, -so that the property is tried and checked on a number of random instances. -

- -This explains the organization of this module: -

-

- - -Examples: -

-

- -
let test =
-  QCheck.(Test.make ~count:1000
-   (list int) (fun l -> List.rev (List.rev l) = l));;
-
-QCheck.Test.run_exn test;;
-
-

-

- -
let test = QCheck.(
-  Test.make
-    ~count:10_000 ~max_fail:3
-    (list small_int)
-    (fun l -> l = List.sort compare l));;
-QCheck.Test.check_exn test;;
-
-

-

- -
type tree = Leaf of int | Node of tree * tree
-
-let leaf x = Leaf x
-let node x y = Node (x,y)
-
-let g = QCheck.Gen.(sized @@ fix
-  (fun self n -> match n with
-    | 0 -> map leaf nat
-    | n ->
-      frequency
-        [1, map leaf nat;
-         2, map2 node (self (n/2)) (self (n/2))]
-    ))
-
-Gen.generate ~n:20 g;;
-
-

- -More complex and powerful combinators can be found in Gabriel Scherer's -Generator module. Its documentation can be found - here.
- -

val (==>) : bool -> bool -> bool
-b1 ==> b2 is the logical implication b1 => b2 - ie not b1 || b2 (except that it is strict and will interact - better with QCheck.Test.check_exn and the likes, because they will know - the precondition was not satisfied.). -

- - WARNING: this function should only be used in a property - (see QCheck.Test.make), because it raises a special exception in case of - failure of the first argument, to distinguish between failed test - and failed precondition. Because of OCaml's evaluation order, - both b1 and b2 are always evaluated; if b2 should only be - evaluated when b1 holds, see QCheck.assume.
-

- -
val assume : bool -> unit
-assume cond checks the precondition cond, and does nothing - if cond=true. If cond=false, it interrupts the current test. -

- - WARNING This function, like QCheck.(==>), should only be used in - a test. not outside. - Example: -

      Test.make (list int) (fun l ->
-        assume (l <> []);
-        List.hd l :: List.tl l = l)
-    

-Since 0.5.1
-
- -
val assume_fail : unit -> 'a
-assume_fail () is like assume false, but can take any type - since we know it always fails (like assert false). - This is useful to ignore some branches in if or match. -

- - Example: -

      Test.make (list int) (function
-        | [] -> assume_fail ()
-        | _::_ as l -> List.hd l :: List.tl l = l)
-    

-Since 0.5.1
-
- -
module Gen: sig .. end
-Generate Random Values -
-
-

Pretty printing


- -
module Print: sig .. end
-Show Values -
- -
module Iter: sig .. end
-Iterators -
- -
module Shrink: sig .. end
-Shrink Values -
-
-

Arbitrary

-

- - A value of type 'a arbitrary glues together a random generator, - and optional functions for shrinking, printing, computing the size, - etc. It is the "normal" way of describing how to generate - values of a given type, to be then used in tests (see QCheck.Test)
- -

type 'a arbitrary = {
- - - - - - - - - - - - - - - - - - - - - - - - -
-   -gen : 'a Gen.t;
-   -print : ('a -> string) option;(*
-print values
-
-
*)
-   -small : ('a -> int) option;(*
-size of example
-
-
*)
-   -shrink : 'a Shrink.t option;(*
-shrink to smaller examples
-
-
*)
-   -collect : ('a -> string) option;(*
-map value to tag, and group by tag
-
-
*)
-} - -
-a value of type 'a arbitrary is an object with a method for generating random - values of type 'a, and additional methods to compute the size of values, - print them, and possibly shrink them into smaller counterexamples -

- - NOTE the collect field is unstable and might be removed, or - moved into QCheck.Test.
-

- - -
val make : ?print:'a Print.t ->
?small:('a -> int) ->
?shrink:'a Shrink.t ->
?collect:('a -> string) -> 'a Gen.t -> 'a arbitrary
-Builder for arbitrary. Default is to only have a generator, but other - arguments can be added
-
- -
val set_print : 'a Print.t -> 'a arbitrary -> 'a arbitrary
-
val set_small : ('a -> int) -> 'a arbitrary -> 'a arbitrary
-
val set_shrink : 'a Shrink.t -> 'a arbitrary -> 'a arbitrary
-
val set_collect : ('a -> string) -> 'a arbitrary -> 'a arbitrary

-

Tests

-

- - A test is a universal property of type foo -> bool for some type foo, - with an object of type foo arbitrary used to generate, print, etc. values - of type foo. -

- - See QCheck.Test.make to build a test, and QCheck.Test.check_exn to - run one test simply. - For more serious testing, it is better to create a testsuite - and use QCheck_runner.
- -

module TestResult: sig .. end
-Result of running a test -
- -
module Test: sig .. end

-

Combinators for QCheck.arbitrary


- -
val choose : 'a arbitrary list -> 'a arbitrary
-Choose among the given list of generators. The list must not - be empty; if it is Invalid_argument is raised.
-
- -
val unit : unit arbitrary
-always generates (), obviously.
-
- -
val bool : bool arbitrary
-uniform boolean generator
-
- -
val float : float arbitrary
-generates regular floats (no nan and no infinities)
-
- -
val pos_float : float arbitrary
-positive float generator (no nan and no infinities)
-
- -
val neg_float : float arbitrary
-negative float generator (no nan and no infinities)
-
- -
val int : int arbitrary
-int generator. Uniformly distributed
-
- -
val int_bound : int -> int arbitrary
-int_bound n is uniform between 0 and n included
-
- -
val int_range : int -> int -> int arbitrary
-int_range a b is uniform between a and b included. b must be - larger than a.
-
- -
val small_nat : int arbitrary
-Small unsigned integers
-Since 0.5.1
-
- -
val small_int : int arbitrary
-Small signed integers. See QCheck.Gen.small_int.
-
- -
val (--) : int -> int -> int arbitrary
-Synonym to QCheck.int_range
-
- -
val int32 : int32 arbitrary
-int32 generator. Uniformly distributed
-
- -
val int64 : int64 arbitrary
-int generator. Uniformly distributed
-
- -
val pos_int : int arbitrary
-positive int generator. Uniformly distributed
-
- -
val small_int_corners : unit -> int arbitrary
-As small_int, but each newly created generator starts with - a list of corner cases before falling back on random generation.
-
- -
val neg_int : int arbitrary
-negative int generator. The distribution is similar to that of - small_int, not of pos_int.
-
- -
val char : char arbitrary
-Uniformly distributed on all the chars (not just ascii or - valid latin-1)
-
- -
val printable_char : char arbitrary
-uniformly distributed over a subset of chars
-
- -
val numeral_char : char arbitrary
-uniformy distributed over '0'..'9'
-
- -
val string_gen_of_size : int Gen.t -> char Gen.t -> string arbitrary
-
val string_gen : char Gen.t -> string arbitrary
-generates strings with a distribution of length of small_int
-
- -
val string : string arbitrary
-generates strings with a distribution of length of small_int - and distribution of characters of char
-
- -
val small_string : string arbitrary
-Same as QCheck.string but with a small length (that is, 0--10)
-
- -
val string_of_size : int Gen.t -> string arbitrary
-generates strings with distribution of characters if char
-
- -
val printable_string : string arbitrary
-generates strings with a distribution of length of small_int - and distribution of characters of printable_char
-
- -
val printable_string_of_size : int Gen.t -> string arbitrary
-generates strings with distribution of characters of printable_char
-
- -
val small_printable_string : string arbitrary
-
val numeral_string : string arbitrary
-generates strings with a distribution of length of small_int - and distribution of characters of numeral_char
-
- -
val numeral_string_of_size : int Gen.t -> string arbitrary
-generates strings with a distribution of characters of numeral_char
-
- -
val list : 'a arbitrary -> 'a list arbitrary
-generates lists with length generated by small_int
-
- -
val list_of_size : int Gen.t -> 'a arbitrary -> 'a list arbitrary
-generates lists with length from the given distribution
-
- -
val array : 'a arbitrary -> 'a array arbitrary
-generates arrays with length generated by small_int
-
- -
val array_of_size : int Gen.t -> 'a arbitrary -> 'a array arbitrary
-generates arrays with length from the given distribution
-
- -
val pair : 'a arbitrary -> 'b arbitrary -> ('a * 'b) arbitrary
-combines two generators into a generator of pairs
-
- -
val triple : 'a arbitrary ->
'b arbitrary -> 'c arbitrary -> ('a * 'b * 'c) arbitrary
-combines three generators into a generator of 3-tuples
-
- -
val quad : 'a arbitrary ->
'b arbitrary ->
'c arbitrary ->
'd arbitrary -> ('a * 'b * 'c * 'd) arbitrary
-combines four generators into a generator of 4-tuples
-
- -
val option : 'a arbitrary -> 'a option arbitrary
-choose between returning Some random value, or None
-
- -
val fun1 : 'a arbitrary -> 'b arbitrary -> ('a -> 'b) arbitrary
-generator of functions of arity 1. - The functions are always pure and total functions: -
-
- -
val fun2 : 'a arbitrary ->
'b arbitrary ->
'c arbitrary -> ('a -> 'b -> 'c) arbitrary
-generator of functions of arity 2. The remark about fun1 also apply - here.
-
- -
val oneofl : ?print:'a Print.t ->
?collect:('a -> string) -> 'a list -> 'a arbitrary
-Pick an element randomly in the list
-
- -
val oneofa : ?print:'a Print.t ->
?collect:('a -> string) -> 'a array -> 'a arbitrary
-Pick an element randomly in the array
-
- -
val oneof : 'a arbitrary list -> 'a arbitrary
-Pick a generator among the list, randomly
-
- -
val always : ?print:'a Print.t -> 'a -> 'a arbitrary
-Always return the same element
-
- -
val frequency : ?print:'a Print.t ->
?small:('a -> int) ->
?shrink:'a Shrink.t ->
?collect:('a -> string) ->
(int * 'a arbitrary) list -> 'a arbitrary
-Similar to QCheck.oneof but with frequencies
-
- -
val frequencyl : ?print:'a Print.t ->
?small:('a -> int) -> (int * 'a) list -> 'a arbitrary
-Same as QCheck.oneofl, but each element is paired with its frequency in - the probability distribution (the higher, the more likely)
-
- -
val frequencya : ?print:'a Print.t ->
?small:('a -> int) -> (int * 'a) array -> 'a arbitrary
-Same as QCheck.frequencyl, but with an array
-
- -
val map : ?rev:('b -> 'a) -> ('a -> 'b) -> 'a arbitrary -> 'b arbitrary
-map f a returns a new arbitrary instance that generates values using - a#gen and then transforms them through f.
-
-
rev : if provided, maps values back to type 'a so that the printer, - shrinker, etc. of a can be used. We assume f is monotonic in - this case (that is, smaller inputs are transformed into smaller outputs).
- -
val map_same_type : ('a -> 'a) -> 'a arbitrary -> 'a arbitrary
-Specialization of map when the transformation preserves the type, which - makes shrinker, printer, etc. still relevant
-
- -
val map_keep_input : ?print:'b Print.t ->
?small:('b -> int) ->
('a -> 'b) -> 'a arbitrary -> ('a * 'b) arbitrary
-map_keep_input f a generates random values from a, and maps them into - values of type 'b using the function f, but it also keeps the - original value. - For shrinking, it is assumed that f is monotonic and that smaller input - values will map into smaller values
-
-
print : optional printer for the f's output
- \ No newline at end of file diff --git a/docs/0.5.1/QCheck_runner.html b/docs/0.5.1/QCheck_runner.html deleted file mode 100644 index 4a8136aff6d83b48ec64a80339bfbd789e527fd2..0000000000000000000000000000000000000000 --- a/docs/0.5.1/QCheck_runner.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - -QCheck_runner - - - -

Module QCheck_runner

- -
module QCheck_runner: sig .. end
-

Runners for Tests


-
-
-
-

State


- -
val random_state : unit -> Random.State.t
-Access the current random state
-
- -
val verbose : unit -> bool
-Is the default mode verbose or quiet?
-
- -
val set_seed : int -> unit
-Change the QCheck_runner.random_state by creating a new one, initialized with - the given seed.
-
- -
val set_verbose : bool -> unit
-Change the value of verbose ()
-
-
-

Conversion of tests to OUnit Tests


- -
val to_ounit_test : ?verbose:bool -> ?rand:Random.State.t -> QCheck.Test.t -> OUnit.test
-to_ounit_test ~rand t wraps t into a OUnit test
-
-
verbose : used to print information on stdout (default: verbose())
-
rand : the random generator to use (default: random_state ())
- -
val to_ounit_test_cell : ?verbose:bool -> ?rand:Random.State.t -> 'a QCheck.Test.cell -> OUnit.test
-Same as QCheck_runner.to_ounit_test but with a polymorphic test cell
-
- -
val (>:::) : string -> QCheck.Test.t list -> OUnit.test
-Same as OUnit.>::: but with a list of QCheck tests
-
- -
val to_ounit2_test : ?rand:Random.State.t -> QCheck.Test.t -> OUnit2.test
-to_ounit2_test ?rand t wraps t into a OUnit2 test
-
-
rand : the random generator to use (default: a static seed for reproducibility), - can be overridden with "-seed" on the command-line
- -
val to_ounit2_test_list : ?rand:Random.State.t -> QCheck.Test.t list -> OUnit2.test list
-to_ounit2_test_list ?rand t like to_ounit2_test but for a list of tests
-
-
-

OUnit runners


- -
val run : ?argv:string array -> OUnit.test -> int
-run test runs the test, and returns an error code that is 0 - if all tests passed, 1 otherwise. - This is the default runner used by the comment-to-test generator.
-Raises -
-
argv : the command line arguments to parse parameters from (default Sys.argv)
- -
val run_tap : OUnit.test -> OUnit.test_results
-TAP-compatible test runner, in case we want to use a test harness. - It prints one line per test.
-
-
-

Run a Suite of Tests and Get Results


- -
val run_tests : ?verbose:bool ->
?out:Pervasives.out_channel ->
?rand:Random.State.t -> QCheck.Test.t list -> int
-Run a suite of tests, and print its results. This is an heritage from - the "qcheck" library.
-Returns an error code, 0 if all tests passed, 1 otherwise.
-
-
verbose : if true, prints more information about test cases
- -
val run_tests_main : ?argv:string array -> QCheck.Test.t list -> 'a
-Can be used as the main function of a test file. Exits with a non-0 code - if the tests fail. It refers to QCheck_runner.run_tests for actually running tests - after CLI options have been parsed. -

- - The available options are: -

-

-
-
- \ No newline at end of file diff --git a/docs/0.5.1/html.stamp b/docs/0.5.1/html.stamp deleted file mode 100644 index e9634b4148a8e5ea92fcc70049aa940005d83f15..0000000000000000000000000000000000000000 --- a/docs/0.5.1/html.stamp +++ /dev/null @@ -1 +0,0 @@ -5b7fa0640fc15470543d3a6d92df5f4e \ No newline at end of file diff --git a/docs/0.5.1/index.html b/docs/0.5.1/index.html deleted file mode 100644 index 76c10bbd84257bf7385f11060ec5b886f8d27cf0..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - -

- -

- - - -
QCheck
-Quickcheck inspired property-based testing -
-
QCheck_runner
-Runners for Tests -
-
- - \ No newline at end of file diff --git a/docs/0.5.1/index_attributes.html b/docs/0.5.1/index_attributes.html deleted file mode 100644 index 9466088b5bd2d5722336fca034a061d7680f6058..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_attributes.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - -Index of class attributes - - - -

Index of class attributes

- -
- - \ No newline at end of file diff --git a/docs/0.5.1/index_class_types.html b/docs/0.5.1/index_class_types.html deleted file mode 100644 index efdf512218005f4e7f486df1423c57ad40edd3af..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_class_types.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - -Index of class types - - - -

Index of class types

- -
- - \ No newline at end of file diff --git a/docs/0.5.1/index_classes.html b/docs/0.5.1/index_classes.html deleted file mode 100644 index cef1ddaf2d2822f93e6dc79e2167abe992d1bdf3..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_classes.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - -Index of classes - - - -

Index of classes

- -
- - \ No newline at end of file diff --git a/docs/0.5.1/index_exceptions.html b/docs/0.5.1/index_exceptions.html deleted file mode 100644 index c7b68edb813887da7a4d8fc8fc4ffda5d6189212..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_exceptions.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - -Index of exceptions - - - -

Index of exceptions

- - - - - - -

T
Test_error [QCheck.Test]
-Exception raised when a test raised an exception e, with - the sample that triggered the exception. -
-
Test_fail [QCheck.Test]
-Exception raised when a test failed, with the list of counter-examples. -
-
- - \ No newline at end of file diff --git a/docs/0.5.1/index_extensions.html b/docs/0.5.1/index_extensions.html deleted file mode 100644 index 41b0ba0ed78d864b3c2ae3c1689374ee706038f8..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_extensions.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - -Index of extensions - - - -

Index of extensions

- -
- - \ No newline at end of file diff --git a/docs/0.5.1/index_methods.html b/docs/0.5.1/index_methods.html deleted file mode 100644 index e67d89a4de311d5c3df6f81572a0e3811affba19..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_methods.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - -Index of class methods - - - -

Index of class methods

- -
- - \ No newline at end of file diff --git a/docs/0.5.1/index_module_types.html b/docs/0.5.1/index_module_types.html deleted file mode 100644 index ff33944b19cab30e8b823592136887ef28ce6fc7..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_module_types.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - -Index of module types - - - -

Index of module types

- -
- - \ No newline at end of file diff --git a/docs/0.5.1/index_modules.html b/docs/0.5.1/index_modules.html deleted file mode 100644 index 95779978fcb65b9993821b154c1f5300ba17fed4..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_modules.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - -Index of modules - - - -

Index of modules

- - - - - - - - - - - - - - - - - - - - - - - -

G
Gen [QCheck]
-Generate Random Values -
-

I
Iter [QCheck]
-Iterators -
-

P
Print [QCheck]
-Show Values -
-

Q
QCheck
-Quickcheck inspired property-based testing -
-
QCheck_runner
-Runners for Tests -
-

S
Shrink [QCheck]
-Shrink Values -
-

T
Test [QCheck]
TestResult [QCheck]
-Result of running a test -
-
- - \ No newline at end of file diff --git a/docs/0.5.1/index_types.html b/docs/0.5.1/index_types.html deleted file mode 100644 index f22099d86d84dabd81c286d39f37db515e80ce19..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_types.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - -Index of types - - - -

Index of types

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

A
arbitrary [QCheck]
-a value of type 'a arbitrary is an object with a method for generating random - values of type 'a, and additional methods to compute the size of values, - print them, and possibly shrink them into smaller counterexamples -
-

C
callback [QCheck.Test]
-Callback executed after each test has been run. -
-
cell [QCheck.Test]
-A single property test -
-
counter_ex [QCheck.TestResult]

F
failed_state [QCheck.TestResult]

S
sized [QCheck.Gen]
-Random generator with a size bound -
-
state [QCheck.TestResult]

T
t [QCheck.Test]
t [QCheck.TestResult]
t [QCheck.Shrink]
-Given a counter-example, return an iterator on smaller versions - of the counter-example -
-
t [QCheck.Iter]
t [QCheck.Print]
t [QCheck.Gen]
-A random generator for values of type 'a -
-
- - \ No newline at end of file diff --git a/docs/0.5.1/index_values.html b/docs/0.5.1/index_values.html deleted file mode 100644 index 1da39d23c754e1b5fdd3f68ca073bcce0644d4fc..0000000000000000000000000000000000000000 --- a/docs/0.5.1/index_values.html +++ /dev/null @@ -1,807 +0,0 @@ - - - - - - - - - - -Index of values - - - -

Index of values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(--) [QCheck.Gen]
-Synonym to QCheck.Gen.int_range -
-
(--) [QCheck]
-Synonym to QCheck.int_range -
-
(<*>) [QCheck.Iter]
(<*>) [QCheck.Gen]
-Infix operator for composing a function generator and an argument generator - into a result generator -
-
(<+>) [QCheck.Iter]
-Synonym to QCheck.Iter.append -
-
(==>) [QCheck]
-b1 ==> b2 is the logical implication b1 => b2 - ie not b1 || b2 (except that it is strict and will interact - better with QCheck.Test.check_exn and the likes, because they will know - the precondition was not satisfied.). -
-
(>:::) [QCheck_runner]
-Same as OUnit.>::: but with a list of QCheck tests -
-
(>>=) [QCheck.Iter]
(>>=) [QCheck.Gen]
-Monadic bind for writing dependent generators. -
-
(>|=) [QCheck.Iter]
(>|=) [QCheck.Gen]
-An infix synonym for QCheck.Gen.map -
-

A
always [QCheck]
-Always return the same element -
-
append [QCheck.Iter]
array [QCheck.Shrink]
-Shrink an array. -
-
array [QCheck.Print]
array [QCheck.Gen]
-Builds an array generator from an element generator. -
-
array [QCheck]
-generates arrays with length generated by small_int -
-
array_of_size [QCheck]
-generates arrays with length from the given distribution -
-
array_repeat [QCheck.Gen]
-array_repeat i g builds an array generator from exactly i elements generated by g -
-
array_size [QCheck.Gen]
-Builds an array generator from a (non-negative) size generator and an element generator -
-
assume [QCheck]
-assume cond checks the precondition cond, and does nothing - if cond=true. -
-
assume_fail [QCheck]
-assume_fail () is like assume false, but can take any type - since we know it always fails (like assert false). -
-

B
bool [QCheck.Print]
bool [QCheck.Gen]
-The Boolean generator -
-
bool [QCheck]
-uniform boolean generator -
-

C
char [QCheck.Print]
char [QCheck.Gen]
-Generates characters upto character code 255 -
-
char [QCheck]
-Uniformly distributed on all the chars (not just ascii or - valid latin-1) -
-
check_cell [QCheck.Test]
-check ~rand test generates up to count random - values of type 'a using arbitrary and the random state st. -
-
check_cell_exn [QCheck.Test]
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result. -
-
check_exn [QCheck.Test]
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result. -
-
check_result [QCheck.Test]
-check_result cell res checks that res is Ok _, and returns unit. -
-
choose [QCheck]
-Choose among the given list of generators. -
-
comap [QCheck.Print]

E
empty [QCheck.Iter]

F
find [QCheck.Iter]
fix [QCheck.Gen]
-Fixpoint combinator for generating recursive, size-bounded data types. -
-
float [QCheck.Print]
float [QCheck.Gen]
-Generates floating point numbers -
-
float [QCheck]
-generates regular floats (no nan and no infinities) -
-
frequency [QCheck.Gen]
-Constructs a generator that selects among a given list of generators. -
-
frequency [QCheck]
-Similar to QCheck.oneof but with frequencies -
-
frequencya [QCheck.Gen]
-Constructs a generator that selects among a given array of values. -
-
frequencya [QCheck]
-Same as QCheck.frequencyl, but with an array -
-
frequencyl [QCheck.Gen]
-Constructs a generator that selects among a given list of values. -
-
frequencyl [QCheck]
-Same as QCheck.oneofl, but each element is paired with its frequency in - the probability distribution (the higher, the more likely) -
-
fun1 [QCheck]
-generator of functions of arity 1. -
-
fun2 [QCheck]
-generator of functions of arity 2. -
-

G
generate [QCheck.Gen]
-generate ~n g generates n instances of g -
-
generate1 [QCheck.Gen]
-generate1 g generates one instance of g -
-
get_arbitrary [QCheck.Test]
get_law [QCheck.Test]
get_name [QCheck.Test]

I
int [QCheck.Shrink]
int [QCheck.Print]
int [QCheck.Gen]
-Generates integers uniformly -
-
int [QCheck]
-int generator. -
-
int32 [QCheck]
-int32 generator. -
-
int64 [QCheck]
-int generator. -
-
int_bound [QCheck.Gen]
-Uniform integer generator producing integers within 0... bound. -
-
int_bound [QCheck]
-int_bound n is uniform between 0 and n included -
-
int_range [QCheck.Gen]
-Uniform integer generator producing integers within low,high -
-
int_range [QCheck]
-int_range a b is uniform between a and b included. -
-

J
join [QCheck.Gen]
-Collapses a generator of generators to simply a generator. -
-

L
list [QCheck.Shrink]
-Try to shrink lists by removing elements one by one. -
-
list [QCheck.Print]
list [QCheck.Gen]
-Builds a list generator from an element generator. -
-
list [QCheck]
-generates lists with length generated by small_int -
-
list_of_size [QCheck]
-generates lists with length from the given distribution -
-
list_repeat [QCheck.Gen]
-list_repeat i g builds a list generator from exactly i elements generated by g -
-
list_size [QCheck.Gen]
-Builds a list generator from a (non-negative) size generator and an element generator -
-

M
make [QCheck.Test]
-make arb prop builds a test that checks property prop on instances - of the generator arb. -
-
make [QCheck]
-Builder for arbitrary. -
-
make_cell [QCheck.Test]
-make arb prop builds a test that checks property prop on instances - of the generator arb. -
-
map [QCheck.Iter]
map [QCheck.Gen]
-map f g transforms a generator g by applying f to each generated element -
-
map [QCheck]
-map f a returns a new arbitrary instance that generates values using - a#gen and then transforms them through f. -
-
map2 [QCheck.Iter]
map2 [QCheck.Gen]
-map f g1 g2 transforms two generators g1 and g2 by applying f to each - pair of generated elements -
-
map3 [QCheck.Gen]
-map f g1 g2 g3 transforms two generators g1, g2, and g3 by applying f - to each triple of generated elements -
-
map_keep_input [QCheck.Gen]
-map f g transforms a generator g by applying f to each generated element. -
-
map_keep_input [QCheck]
-map_keep_input f a generates random values from a, and maps them into - values of type 'b using the function f, but it also keeps the - original value. -
-
map_same_type [QCheck]
-Specialization of map when the transformation preserves the type, which - makes shrinker, printer, etc. -
-

N
nat [QCheck.Gen]
-Generates small natural numbers -
-
neg_float [QCheck]
-negative float generator (no nan and no infinities) -
-
neg_int [QCheck.Gen]
-Generates negative integers -
-
neg_int [QCheck]
-negative int generator. -
-
nfloat [QCheck.Gen]
-Generates negative floating point numbers -
-
nil [QCheck.Shrink]
-No shrink -
-
numeral [QCheck.Gen]
-Generates numeral characters -
-
numeral_char [QCheck]
-uniformy distributed over '0'..'9' -
-
numeral_string [QCheck]
-generates strings with a distribution of length of small_int - and distribution of characters of numeral_char -
-
numeral_string_of_size [QCheck]
-generates strings with a distribution of characters of numeral_char -
-

O
of_array [QCheck.Iter]
of_list [QCheck.Iter]
oneof [QCheck.Gen]
-Constructs a generator that selects among a given list of generators -
-
oneof [QCheck]
-Pick a generator among the list, randomly -
-
oneofa [QCheck.Gen]
-Constructs a generator that selects among a given array of values -
-
oneofa [QCheck]
-Pick an element randomly in the array -
-
oneofl [QCheck.Gen]
-Constructs a generator that selects among a given list of values -
-
oneofl [QCheck]
-Pick an element randomly in the list -
-
opt [QCheck.Gen]
-An option generator -
-
option [QCheck.Shrink]
option [QCheck.Print]
option [QCheck]
-choose between returning Some random value, or None -
-

P
pair [QCheck.Shrink]
pair [QCheck.Iter]
pair [QCheck.Print]
pair [QCheck.Gen]
-Generates pairs -
-
pair [QCheck]
-combines two generators into a generator of pairs -
-
pfloat [QCheck.Gen]
-Generates positive floating point numbers -
-
pint [QCheck.Gen]
-Generates positive integers uniformly -
-
pos_float [QCheck]
-positive float generator (no nan and no infinities) -
-
pos_int [QCheck]
-positive int generator. -
-
print_c_ex [QCheck.Test]
print_error [QCheck.Test]
print_fail [QCheck.Test]
print_instance [QCheck.Test]
print_test_error [QCheck.Test]
print_test_fail [QCheck.Test]
printable [QCheck.Gen]
-Generates printable characters -
-
printable_char [QCheck]
-uniformly distributed over a subset of chars -
-
printable_string [QCheck]
-generates strings with a distribution of length of small_int - and distribution of characters of printable_char -
-
printable_string_of_size [QCheck]
-generates strings with distribution of characters of printable_char -
-

Q
quad [QCheck.Shrink]
quad [QCheck.Iter]
quad [QCheck.Print]
quad [QCheck.Gen]
-Generates quadruples -
-
quad [QCheck]
-combines four generators into a generator of 4-tuples -
-

R
random_state [QCheck_runner]
-Access the current random state -
-
return [QCheck.Iter]
return [QCheck.Gen]
-Create a constant generator -
-
run [QCheck_runner]
-run test runs the test, and returns an error code that is 0 - if all tests passed, 1 otherwise. -
-
run_tap [QCheck_runner]
-TAP-compatible test runner, in case we want to use a test harness. -
-
run_tests [QCheck_runner]
-Run a suite of tests, and print its results. -
-
run_tests_main [QCheck_runner]
-Can be used as the main function of a test file. -
-

S
set_collect [QCheck]
set_name [QCheck.Test]
set_print [QCheck]
set_seed [QCheck_runner]
-Change the QCheck_runner.random_state by creating a new one, initialized with - the given seed. -
-
set_shrink [QCheck]
set_small [QCheck]
set_verbose [QCheck_runner]
-Change the value of verbose () -
-
shuffle_a [QCheck.Gen]
-Shuffle the array in place -
-
shuffle_l [QCheck.Gen]
-Creates a generator of shuffled lists -
-
sized [QCheck.Gen]
-Create a generator from a size-bounded generator by first - generating a size using QCheck.Gen.nat and passing the result to the size-bounded generator -
-
sized_size [QCheck.Gen]
-Create a generator from a size-bounded generator by first - generating a size using the integer generator and passing the result - to the size-bounded generator -
-
small_int [QCheck.Gen]
-Small signed integers (not just QCheck.Gen.nat) -
-
small_int [QCheck]
-Small signed integers. -
-
small_int_corners [QCheck]
-As small_int, but each newly created generator starts with - a list of corner cases before falling back on random generation. -
-
small_nat [QCheck.Gen]
-Synonym to QCheck.Gen.nat -
-
small_nat [QCheck]
-Small unsigned integers -
-
small_printable_string [QCheck]
small_string [QCheck.Gen]
-Builds a string generator. -
-
small_string [QCheck]
-Same as QCheck.string but with a small length (that is, 0--10) -
-
string [QCheck.Shrink]
string [QCheck.Print]
string [QCheck.Gen]
-Builds a string generator. -
-
string [QCheck]
-generates strings with a distribution of length of small_int - and distribution of characters of char -
-
string_gen [QCheck]
-generates strings with a distribution of length of small_int -
-
string_gen_of_size [QCheck]
string_of_size [QCheck]
-generates strings with distribution of characters if char -
-
string_size [QCheck.Gen]
-Builds a string generator from a (non-negative) size generator. -
-

T
to_ounit2_test [QCheck_runner]
-to_ounit2_test ?rand t wraps t into a OUnit2 test -
-
to_ounit2_test_list [QCheck_runner]
-to_ounit2_test_list ?rand t like to_ounit2_test but for a list of tests -
-
to_ounit_test [QCheck_runner]
-to_ounit_test ~rand t wraps t into a OUnit test -
-
to_ounit_test_cell [QCheck_runner]
-Same as QCheck_runner.to_ounit_test but with a polymorphic test cell -
-
triple [QCheck.Shrink]
triple [QCheck.Iter]
triple [QCheck.Print]
triple [QCheck.Gen]
-Generates triples -
-
triple [QCheck]
-combines three generators into a generator of 3-tuples -
-

U
ui32 [QCheck.Gen]
-Generates (unsigned) int32 values -
-
ui64 [QCheck.Gen]
-Generates (unsigned) int64 values -
-
unit [QCheck.Gen]
-The unit generator -
-
unit [QCheck]
-always generates (), obviously. -
-

V
verbose [QCheck_runner]
-Is the default mode verbose or quiet? -
-
- - \ No newline at end of file diff --git a/docs/0.5.1/style.css b/docs/0.5.1/style.css deleted file mode 100644 index a5b4578755f28f6915ffe9764c450a732a01000a..0000000000000000000000000000000000000000 --- a/docs/0.5.1/style.css +++ /dev/null @@ -1,39 +0,0 @@ -.keyword { font-weight : bold ; color : Red } -.keywordsign { color : #C04600 } -.comment { color : Green } -.constructor { color : Blue } -.type { color : #5C6585 } -.string { color : Maroon } -.warning { color : Red ; font-weight : bold } -.info { margin-left : 3em; margin-right: 3em } -.param_info { margin-top: 4px; margin-left : 3em; margin-right : 3em } -.code { color : #465F91 ; } -.typetable { border-style : hidden } -.paramstable { border-style : hidden ; padding: 5pt 5pt} -tr { background-color : White } -td.typefieldcomment { background-color : #FFFFFF ; font-size: smaller ;} -div.sig_block {margin-left: 2em} -*:target { background: yellow; } -body {font: 13px sans-serif; color: black; text-align: left; padding: 5px; margin: 0} -h1 { font-size : 20pt ; text-align: center; } -h2 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90BDFF ;padding: 2px; } -h3 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90DDFF ;padding: 2px; } -h4 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90EDFF ;padding: 2px; } -h5 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90FDFF ;padding: 2px; } -h6 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90BDFF ; padding: 2px; } -div.h7 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #E0FFFF ; padding: 2px; } -div.h8 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #F0FFFF ; padding: 2px; } -div.h9 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #FFFFFF ; padding: 2px; } -a {color: #416DFF; text-decoration: none} -a:hover {background-color: #ddd; text-decoration: underline} -pre { margin-bottom: 4px; font-family: monospace; } -pre.verbatim, pre.codepre { } -.indextable {border: 1px #ddd solid; border-collapse: collapse} -.indextable td, .indextable th {border: 1px #ddd solid; min-width: 80px} -.indextable td.module {background-color: #eee ; padding-left: 2px; padding-right: 2px} -.indextable td.module a {color: 4E6272; text-decoration: none; display: block; width: 100%} -.indextable td.module a:hover {text-decoration: underline; background-color: transparent} -.deprecated {color: #888; font-style: italic} -.indextable tr td div.info { margin-left: 2px; margin-right: 2px } -ul.indexlist { margin-left: 0; padding-left: 0;} -ul.indexlist li { list-style-type: none ; margin-left: 0; padding-left: 0; } \ No newline at end of file diff --git a/docs/0.5.1/type_QCheck.Gen.html b/docs/0.5.1/type_QCheck.Gen.html deleted file mode 100644 index 2be60a850f392413142af500a7fd7f0c51bb4bfd..0000000000000000000000000000000000000000 --- a/docs/0.5.1/type_QCheck.Gen.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - -QCheck.Gen - - -sig -  type 'a t = Random.State.t -> 'a -  type 'a sized = int -> Random.State.t -> 'a -  val return : '-> 'QCheck.Gen.t -  val ( >>= ) : 'QCheck.Gen.t -> ('-> 'QCheck.Gen.t) -> 'QCheck.Gen.t -  val ( <*> ) : ('-> 'b) QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t -  val map : ('-> 'b) -> 'QCheck.Gen.t -> 'QCheck.Gen.t -  val map2 : -    ('-> '-> 'c) -> 'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t -  val map3 : -    ('-> '-> '-> 'd) -> -    'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t -  val map_keep_input : -    ('-> 'b) -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t -  val ( >|= ) : 'QCheck.Gen.t -> ('-> 'b) -> 'QCheck.Gen.t -  val oneof : 'QCheck.Gen.t list -> 'QCheck.Gen.t -  val oneofl : 'a list -> 'QCheck.Gen.t -  val oneofa : 'a array -> 'QCheck.Gen.t -  val frequency : (int * 'QCheck.Gen.t) list -> 'QCheck.Gen.t -  val frequencyl : (int * 'a) list -> 'QCheck.Gen.t -  val frequencya : (int * 'a) array -> '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 : 'QCheck.Gen.t -> 'a list QCheck.Gen.t -  val list_size : int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t -  val list_repeat : int -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t -  val array : 'QCheck.Gen.t -> 'a array QCheck.Gen.t -  val array_size : -    int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t -  val array_repeat : int -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t -  val opt : 'QCheck.Gen.t -> 'a option QCheck.Gen.t -  val pair : 'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t -  val triple : -    'QCheck.Gen.t -> -    'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b * 'c) QCheck.Gen.t -  val quad : -    'QCheck.Gen.t -> -    'QCheck.Gen.t -> -    'QCheck.Gen.t -> '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 : 'QCheck.Gen.t QCheck.Gen.t -> 'QCheck.Gen.t -  val sized : 'QCheck.Gen.sized -> 'QCheck.Gen.t -  val sized_size : int QCheck.Gen.t -> 'QCheck.Gen.sized -> 'QCheck.Gen.t -  val fix : -    ('QCheck.Gen.sized -> 'QCheck.Gen.sized) -> 'QCheck.Gen.sized -  val generate : ?rand:Random.State.t -> n:int -> 'QCheck.Gen.t -> 'a list -  val generate1 : ?rand:Random.State.t -> 'QCheck.Gen.t -> 'a -end \ No newline at end of file diff --git a/docs/0.5.1/type_QCheck.Iter.html b/docs/0.5.1/type_QCheck.Iter.html deleted file mode 100644 index f72ce67fabe70c2802963814501062c47c5abf82..0000000000000000000000000000000000000000 --- a/docs/0.5.1/type_QCheck.Iter.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - -QCheck.Iter - - -sig -  type 'a t = ('-> unit) -> unit -  val empty : 'QCheck.Iter.t -  val return : '-> 'QCheck.Iter.t -  val ( <*> ) : -    ('-> 'b) QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t -  val ( >>= ) : -    'QCheck.Iter.t -> ('-> 'QCheck.Iter.t) -> 'QCheck.Iter.t -  val map : ('-> 'b) -> 'QCheck.Iter.t -> 'QCheck.Iter.t -  val map2 : -    ('-> '-> 'c) -> -    'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t -  val ( >|= ) : 'QCheck.Iter.t -> ('-> 'b) -> 'QCheck.Iter.t -  val append : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t -  val ( <+> ) : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t -  val of_list : 'a list -> 'QCheck.Iter.t -  val of_array : 'a array -> 'QCheck.Iter.t -  val pair : 'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b) QCheck.Iter.t -  val triple : -    'QCheck.Iter.t -> -    'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b * 'c) QCheck.Iter.t -  val quad : -    'QCheck.Iter.t -> -    'QCheck.Iter.t -> -    'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b * 'c * 'd) QCheck.Iter.t -  val find : ('-> bool) -> 'QCheck.Iter.t -> 'a option -end \ No newline at end of file diff --git a/docs/0.5.1/type_QCheck.Print.html b/docs/0.5.1/type_QCheck.Print.html deleted file mode 100644 index 5827884b7ee8840550635154150180cdf43285c8..0000000000000000000000000000000000000000 --- a/docs/0.5.1/type_QCheck.Print.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - -QCheck.Print - - -sig -  type 'a t = '-> 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 : 'QCheck.Print.t -> 'a option QCheck.Print.t -  val pair : -    'QCheck.Print.t -> 'QCheck.Print.t -> ('a * 'b) QCheck.Print.t -  val triple : -    'QCheck.Print.t -> -    'QCheck.Print.t -> 'QCheck.Print.t -> ('a * 'b * 'c) QCheck.Print.t -  val quad : -    'QCheck.Print.t -> -    'QCheck.Print.t -> -    'QCheck.Print.t -> -    'QCheck.Print.t -> ('a * 'b * 'c * 'd) QCheck.Print.t -  val list : 'QCheck.Print.t -> 'a list QCheck.Print.t -  val array : 'QCheck.Print.t -> 'a array QCheck.Print.t -  val comap : ('-> 'b) -> 'QCheck.Print.t -> 'QCheck.Print.t -end \ No newline at end of file diff --git a/docs/0.5.1/type_QCheck.Shrink.html b/docs/0.5.1/type_QCheck.Shrink.html deleted file mode 100644 index 5875156c23a057525c254499103e2e2ba78643ab..0000000000000000000000000000000000000000 --- a/docs/0.5.1/type_QCheck.Shrink.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - -QCheck.Shrink - - -sig -  type 'a t = '-> 'QCheck.Iter.t -  val nil : 'QCheck.Shrink.t -  val int : int QCheck.Shrink.t -  val option : 'QCheck.Shrink.t -> 'a option QCheck.Shrink.t -  val string : string QCheck.Shrink.t -  val list : ?shrink:'QCheck.Shrink.t -> 'a list QCheck.Shrink.t -  val array : ?shrink:'QCheck.Shrink.t -> 'a array QCheck.Shrink.t -  val pair : -    'QCheck.Shrink.t -> 'QCheck.Shrink.t -> ('a * 'b) QCheck.Shrink.t -  val triple : -    'QCheck.Shrink.t -> -    'QCheck.Shrink.t -> -    'QCheck.Shrink.t -> ('a * 'b * 'c) QCheck.Shrink.t -  val quad : -    'QCheck.Shrink.t -> -    'QCheck.Shrink.t -> -    'QCheck.Shrink.t -> -    'QCheck.Shrink.t -> ('a * 'b * 'c * 'd) QCheck.Shrink.t -end \ No newline at end of file diff --git a/docs/0.5.1/type_QCheck.Test.html b/docs/0.5.1/type_QCheck.Test.html deleted file mode 100644 index ec26727e72b4a2e33ff85a8426bd980e7d2c10f5..0000000000000000000000000000000000000000 --- a/docs/0.5.1/type_QCheck.Test.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - -QCheck.Test - - -sig -  type 'a cell -  val make_cell : -    ?count:int -> -    ?max_gen:int -> -    ?max_fail:int -> -    ?small:('-> int) -> -    ?name:string -> -    'QCheck.arbitrary -> ('-> bool) -> 'QCheck.Test.cell -  val get_arbitrary : 'QCheck.Test.cell -> 'QCheck.arbitrary -  val get_law : 'QCheck.Test.cell -> '-> bool -  val get_name : 'QCheck.Test.cell -> string option -  val set_name : 'QCheck.Test.cell -> string -> unit -  type t = Test : 'QCheck.Test.cell -> QCheck.Test.t -  val make : -    ?count:int -> -    ?max_gen:int -> -    ?max_fail:int -> -    ?small:('-> int) -> -    ?name:string -> 'QCheck.arbitrary -> ('-> bool) -> QCheck.Test.t -  exception Test_fail of string * string list -  exception Test_error of string * string * exn * string -  val print_instance : 'QCheck.arbitrary -> '-> string -  val print_c_ex : -    'QCheck.arbitrary -> 'QCheck.TestResult.counter_ex -> string -  val print_fail : -    'QCheck.arbitrary -> -    string -> 'QCheck.TestResult.counter_ex list -> string -  val print_error : -    ?st:string -> -    'QCheck.arbitrary -> -    string -> '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 : 'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit -  type 'a callback = -      string -> 'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit -  val check_cell : -    ?call:'QCheck.Test.callback -> -    ?rand:Random.State.t -> 'QCheck.Test.cell -> 'QCheck.TestResult.t -  val check_cell_exn : -    ?call:'QCheck.Test.callback -> -    ?rand:Random.State.t -> 'QCheck.Test.cell -> unit -  val check_exn : ?rand:Random.State.t -> QCheck.Test.t -> unit -end \ No newline at end of file diff --git a/docs/0.5.1/type_QCheck.TestResult.html b/docs/0.5.1/type_QCheck.TestResult.html deleted file mode 100644 index 0e389b60a96310a30c0ab645b6cc2f8c57e09b3a..0000000000000000000000000000000000000000 --- a/docs/0.5.1/type_QCheck.TestResult.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -QCheck.TestResult - - -sig -  type 'a counter_ex = { instance : 'a; shrink_steps : int; } -  type 'a failed_state = 'QCheck.TestResult.counter_ex list -  type 'a state = -      Success -    | Failed of 'QCheck.TestResult.failed_state -    | Error of 'QCheck.TestResult.counter_ex * exn -  type 'a t = { -    mutable state : 'QCheck.TestResult.state; -    mutable count : int; -    mutable count_gen : int; -    collect_tbl : (string, int) Hashtbl.t lazy_t; -  } -end \ No newline at end of file diff --git a/docs/0.5.1/type_QCheck.html b/docs/0.5.1/type_QCheck.html deleted file mode 100644 index f5ffff4aaee579b968764b166783380546e2e0d5..0000000000000000000000000000000000000000 --- a/docs/0.5.1/type_QCheck.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - -QCheck - - -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 : '-> 'QCheck.Gen.t -      val ( >>= ) : -        'QCheck.Gen.t -> ('-> 'QCheck.Gen.t) -> 'QCheck.Gen.t -      val ( <*> ) : -        ('-> 'b) QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t -      val map : ('-> 'b) -> 'QCheck.Gen.t -> 'QCheck.Gen.t -      val map2 : -        ('-> '-> 'c) -> -        'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t -      val map3 : -        ('-> '-> '-> 'd) -> -        'QCheck.Gen.t -> -        'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t -      val map_keep_input : -        ('-> 'b) -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t -      val ( >|= ) : 'QCheck.Gen.t -> ('-> 'b) -> 'QCheck.Gen.t -      val oneof : 'QCheck.Gen.t list -> 'QCheck.Gen.t -      val oneofl : 'a list -> 'QCheck.Gen.t -      val oneofa : 'a array -> 'QCheck.Gen.t -      val frequency : (int * 'QCheck.Gen.t) list -> 'QCheck.Gen.t -      val frequencyl : (int * 'a) list -> 'QCheck.Gen.t -      val frequencya : (int * 'a) array -> '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 : 'QCheck.Gen.t -> 'a list QCheck.Gen.t -      val list_size : -        int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t -      val list_repeat : int -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t -      val array : 'QCheck.Gen.t -> 'a array QCheck.Gen.t -      val array_size : -        int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t -      val array_repeat : int -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t -      val opt : 'QCheck.Gen.t -> 'a option QCheck.Gen.t -      val pair : 'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t -      val triple : -        'QCheck.Gen.t -> -        'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b * 'c) QCheck.Gen.t -      val quad : -        'QCheck.Gen.t -> -        'QCheck.Gen.t -> -        'QCheck.Gen.t -> -        '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 : 'QCheck.Gen.t QCheck.Gen.t -> 'QCheck.Gen.t -      val sized : 'QCheck.Gen.sized -> 'QCheck.Gen.t -      val sized_size : -        int QCheck.Gen.t -> 'QCheck.Gen.sized -> 'QCheck.Gen.t -      val fix : -        ('QCheck.Gen.sized -> 'QCheck.Gen.sized) -> 'QCheck.Gen.sized -      val generate : -        ?rand:Random.State.t -> n:int -> 'QCheck.Gen.t -> 'a list -      val generate1 : ?rand:Random.State.t -> 'QCheck.Gen.t -> 'a -    end -  module Print : -    sig -      type 'a t = '-> 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 : 'QCheck.Print.t -> 'a option QCheck.Print.t -      val pair : -        'QCheck.Print.t -> 'QCheck.Print.t -> ('a * 'b) QCheck.Print.t -      val triple : -        'QCheck.Print.t -> -        'QCheck.Print.t -> -        'QCheck.Print.t -> ('a * 'b * 'c) QCheck.Print.t -      val quad : -        'QCheck.Print.t -> -        'QCheck.Print.t -> -        'QCheck.Print.t -> -        'QCheck.Print.t -> ('a * 'b * 'c * 'd) QCheck.Print.t -      val list : 'QCheck.Print.t -> 'a list QCheck.Print.t -      val array : 'QCheck.Print.t -> 'a array QCheck.Print.t -      val comap : ('-> 'b) -> 'QCheck.Print.t -> 'QCheck.Print.t -    end -  module Iter : -    sig -      type 'a t = ('-> unit) -> unit -      val empty : 'QCheck.Iter.t -      val return : '-> 'QCheck.Iter.t -      val ( <*> ) : -        ('-> 'b) QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t -      val ( >>= ) : -        'QCheck.Iter.t -> ('-> 'QCheck.Iter.t) -> 'QCheck.Iter.t -      val map : ('-> 'b) -> 'QCheck.Iter.t -> 'QCheck.Iter.t -      val map2 : -        ('-> '-> 'c) -> -        'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t -      val ( >|= ) : 'QCheck.Iter.t -> ('-> 'b) -> 'QCheck.Iter.t -      val append : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t -      val ( <+> ) : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t -      val of_list : 'a list -> 'QCheck.Iter.t -      val of_array : 'a array -> 'QCheck.Iter.t -      val pair : -        'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b) QCheck.Iter.t -      val triple : -        'QCheck.Iter.t -> -        'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b * 'c) QCheck.Iter.t -      val quad : -        'QCheck.Iter.t -> -        'QCheck.Iter.t -> -        'QCheck.Iter.t -> -        'QCheck.Iter.t -> ('a * 'b * 'c * 'd) QCheck.Iter.t -      val find : ('-> bool) -> 'QCheck.Iter.t -> 'a option -    end -  module Shrink : -    sig -      type 'a t = '-> 'QCheck.Iter.t -      val nil : 'QCheck.Shrink.t -      val int : int QCheck.Shrink.t -      val option : 'QCheck.Shrink.t -> 'a option QCheck.Shrink.t -      val string : string QCheck.Shrink.t -      val list : ?shrink:'QCheck.Shrink.t -> 'a list QCheck.Shrink.t -      val array : ?shrink:'QCheck.Shrink.t -> 'a array QCheck.Shrink.t -      val pair : -        'QCheck.Shrink.t -> 'QCheck.Shrink.t -> ('a * 'b) QCheck.Shrink.t -      val triple : -        'QCheck.Shrink.t -> -        'QCheck.Shrink.t -> -        'QCheck.Shrink.t -> ('a * 'b * 'c) QCheck.Shrink.t -      val quad : -        'QCheck.Shrink.t -> -        'QCheck.Shrink.t -> -        'QCheck.Shrink.t -> -        'QCheck.Shrink.t -> ('a * 'b * 'c * 'd) QCheck.Shrink.t -    end -  type 'a arbitrary = { -    gen : 'QCheck.Gen.t; -    print : ('-> string) option; -    small : ('-> int) option; -    shrink : 'QCheck.Shrink.t option; -    collect : ('-> string) option; -  } -  val make : -    ?print:'QCheck.Print.t -> -    ?small:('-> int) -> -    ?shrink:'QCheck.Shrink.t -> -    ?collect:('-> string) -> 'QCheck.Gen.t -> 'QCheck.arbitrary -  val set_print : -    'QCheck.Print.t -> 'QCheck.arbitrary -> 'QCheck.arbitrary -  val set_small : ('-> int) -> 'QCheck.arbitrary -> 'QCheck.arbitrary -  val set_shrink : -    'QCheck.Shrink.t -> 'QCheck.arbitrary -> 'QCheck.arbitrary -  val set_collect : -    ('-> string) -> 'QCheck.arbitrary -> 'QCheck.arbitrary -  module TestResult : -    sig -      type 'a counter_ex = { instance : 'a; shrink_steps : int; } -      type 'a failed_state = 'QCheck.TestResult.counter_ex list -      type 'a state = -          Success -        | Failed of 'QCheck.TestResult.failed_state -        | Error of 'QCheck.TestResult.counter_ex * exn -      type 'a t = { -        mutable state : '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:('-> int) -> -        ?name:string -> -        'QCheck.arbitrary -> ('-> bool) -> 'QCheck.Test.cell -      val get_arbitrary : 'QCheck.Test.cell -> 'QCheck.arbitrary -      val get_law : 'QCheck.Test.cell -> '-> bool -      val get_name : 'QCheck.Test.cell -> string option -      val set_name : 'QCheck.Test.cell -> string -> unit -      type t = Test : 'QCheck.Test.cell -> QCheck.Test.t -      val make : -        ?count:int -> -        ?max_gen:int -> -        ?max_fail:int -> -        ?small:('-> int) -> -        ?name:string -> 'QCheck.arbitrary -> ('-> bool) -> QCheck.Test.t -      exception Test_fail of string * string list -      exception Test_error of string * string * exn * string -      val print_instance : 'QCheck.arbitrary -> '-> string -      val print_c_ex : -        'QCheck.arbitrary -> 'QCheck.TestResult.counter_ex -> string -      val print_fail : -        'QCheck.arbitrary -> -        string -> 'QCheck.TestResult.counter_ex list -> string -      val print_error : -        ?st:string -> -        'QCheck.arbitrary -> -        string -> '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 : -        'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit -      type 'a callback = -          string -> 'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit -      val check_cell : -        ?call:'QCheck.Test.callback -> -        ?rand:Random.State.t -> 'QCheck.Test.cell -> 'QCheck.TestResult.t -      val check_cell_exn : -        ?call:'QCheck.Test.callback -> -        ?rand:Random.State.t -> 'QCheck.Test.cell -> unit -      val check_exn : ?rand:Random.State.t -> QCheck.Test.t -> unit -    end -  val choose : 'QCheck.arbitrary list -> '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 : 'QCheck.arbitrary -> 'a list QCheck.arbitrary -  val list_of_size : -    int QCheck.Gen.t -> 'QCheck.arbitrary -> 'a list QCheck.arbitrary -  val array : 'QCheck.arbitrary -> 'a array QCheck.arbitrary -  val array_of_size : -    int QCheck.Gen.t -> 'QCheck.arbitrary -> 'a array QCheck.arbitrary -  val pair : -    'QCheck.arbitrary -> 'QCheck.arbitrary -> ('a * 'b) QCheck.arbitrary -  val triple : -    'QCheck.arbitrary -> -    'QCheck.arbitrary -> -    'QCheck.arbitrary -> ('a * 'b * 'c) QCheck.arbitrary -  val quad : -    'QCheck.arbitrary -> -    'QCheck.arbitrary -> -    'QCheck.arbitrary -> -    'QCheck.arbitrary -> ('a * 'b * 'c * 'd) QCheck.arbitrary -  val option : 'QCheck.arbitrary -> 'a option QCheck.arbitrary -  val fun1 : -    'QCheck.arbitrary -> 'QCheck.arbitrary -> ('-> 'b) QCheck.arbitrary -  val fun2 : -    'QCheck.arbitrary -> -    'QCheck.arbitrary -> -    'QCheck.arbitrary -> ('-> '-> 'c) QCheck.arbitrary -  val oneofl : -    ?print:'QCheck.Print.t -> -    ?collect:('-> string) -> 'a list -> 'QCheck.arbitrary -  val oneofa : -    ?print:'QCheck.Print.t -> -    ?collect:('-> string) -> 'a array -> 'QCheck.arbitrary -  val oneof : 'QCheck.arbitrary list -> 'QCheck.arbitrary -  val always : ?print:'QCheck.Print.t -> '-> 'QCheck.arbitrary -  val frequency : -    ?print:'QCheck.Print.t -> -    ?small:('-> int) -> -    ?shrink:'QCheck.Shrink.t -> -    ?collect:('-> string) -> -    (int * 'QCheck.arbitrary) list -> 'QCheck.arbitrary -  val frequencyl : -    ?print:'QCheck.Print.t -> -    ?small:('-> int) -> (int * 'a) list -> 'QCheck.arbitrary -  val frequencya : -    ?print:'QCheck.Print.t -> -    ?small:('-> int) -> (int * 'a) array -> 'QCheck.arbitrary -  val map : -    ?rev:('-> 'a) -> -    ('-> 'b) -> 'QCheck.arbitrary -> 'QCheck.arbitrary -  val map_same_type : -    ('-> 'a) -> 'QCheck.arbitrary -> 'QCheck.arbitrary -  val map_keep_input : -    ?print:'QCheck.Print.t -> -    ?small:('-> int) -> -    ('-> 'b) -> 'QCheck.arbitrary -> ('a * 'b) QCheck.arbitrary -end \ No newline at end of file diff --git a/docs/0.5.1/type_QCheck_runner.html b/docs/0.5.1/type_QCheck_runner.html deleted file mode 100644 index 71f8cc28e77d1de22b4a149045cd497857de2d2a..0000000000000000000000000000000000000000 --- a/docs/0.5.1/type_QCheck_runner.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - -QCheck_runner - - -sig -  val random_state : unit -> Random.State.t -  val verbose : unit -> bool -  val set_seed : int -> unit -  val set_verbose : bool -> unit -  val to_ounit_test : -    ?verbose:bool -> ?rand:Random.State.t -> QCheck.Test.t -> OUnit.test -  val to_ounit_test_cell : -    ?verbose:bool -> -    ?rand:Random.State.t -> 'QCheck.Test.cell -> OUnit.test -  val ( >::: ) : string -> QCheck.Test.t list -> OUnit.test -  val to_ounit2_test : ?rand:Random.State.t -> QCheck.Test.t -> OUnit2.test -  val to_ounit2_test_list : -    ?rand:Random.State.t -> QCheck.Test.t list -> OUnit2.test list -  val run : ?argv:string array -> OUnit.test -> int -  val run_tap : OUnit.test -> OUnit.test_results -  val run_tests : -    ?verbose:bool -> -    ?out:Pervasives.out_channel -> -    ?rand:Random.State.t -> QCheck.Test.t list -> int -  val run_tests_main : ?argv:string array -> QCheck.Test.t list -> 'a -end \ No newline at end of file diff --git a/docs/0.5.2/QCheck.Gen.html b/docs/0.5.2/QCheck.Gen.html deleted file mode 100644 index db8e100a23b9f02312e482f108515f3593e46ba3..0000000000000000000000000000000000000000 --- a/docs/0.5.2/QCheck.Gen.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - -QCheck.Gen - - - -

Module QCheck.Gen

- -
module Gen: sig .. end
-

Generate Random Values


-
-
- -
type 'a t = Random.State.t -> 'a 
-
-A random generator for values of type 'a
-
- - -
type 'a sized = int -> Random.State.t -> 'a 
-
-Random generator with a size bound
-
- - -
val return : 'a -> 'a t
-Create a constant generator
-
- -
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
-Monadic bind for writing dependent generators. First generates an 'a and then - passes it to the given function, to generate a 'b.
-
- -
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
-Infix operator for composing a function generator and an argument generator - into a result generator
-
- -
val map : ('a -> 'b) -> 'a t -> 'b t
-map f g transforms a generator g by applying f to each generated element
-
- -
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
-map f g1 g2 transforms two generators g1 and g2 by applying f to each - pair of generated elements
-
- -
val map3 : ('a -> 'b -> 'c -> 'd) ->
'a t -> 'b t -> 'c t -> 'd t
-map f g1 g2 g3 transforms two generators g1, g2, and g3 by applying f - to each triple of generated elements
-
- -
val map_keep_input : ('a -> 'b) -> 'a t -> ('a * 'b) t
-map f g transforms a generator g by applying f to each generated element. - Returns both the generated elememt from g and the output from f.
-
- -
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
-An infix synonym for QCheck.Gen.map
-
- -
val oneof : 'a t list -> 'a t
-Constructs a generator that selects among a given list of generators
-
- -
val oneofl : 'a list -> 'a t
-Constructs a generator that selects among a given list of values
-
- -
val oneofa : 'a array -> 'a t
-Constructs a generator that selects among a given array of values
-
- -
val frequency : (int * 'a t) list -> 'a t
-Constructs a generator that selects among a given list of generators. - Each of the given generators are chosen based on a positive integer weight.
-
- -
val frequencyl : (int * 'a) list -> 'a t
-Constructs a generator that selects among a given list of values. - Each of the given values are chosen based on a positive integer weight.
-
- -
val frequencya : (int * 'a) array -> 'a t
-Constructs a generator that selects among a given array of values. - Each of the array entries are chosen based on a positive integer weight.
-
- -
val shuffle_a : 'a array -> unit t
-Shuffle the array in place
-
- -
val shuffle_l : 'a list -> 'a list t
-Creates a generator of shuffled lists
-
- -
val unit : unit t
-The unit generator
-
- -
val bool : bool t
-The Boolean generator
-
- -
val float : float t
-Generates floating point numbers
-
- -
val pfloat : float t
-Generates positive floating point numbers
-
- -
val nfloat : float t
-Generates negative floating point numbers
-
- -
val nat : int t
-Generates small natural numbers
-
- -
val neg_int : int t
-Generates negative integers
-
- -
val pint : int t
-Generates positive integers uniformly
-
- -
val int : int t
-Generates integers uniformly
-
- -
val small_nat : int t
-Synonym to QCheck.Gen.nat
-Since 0.5.1
-
- -
val small_int : int t
-Deprecated.use QCheck.Gen.small_nat
-Small UNSIGNED integers, for retrocompatibility
-
- -
val small_signed_int : int t
-small SIGNED integers
-Since 0.5.2
-
- -
val int_bound : int -> int t
-Uniform integer generator producing integers within 0... bound.
-Raises Invalid_argument if the bound is too high (typically 2^30)
-
- -
val int_range : int -> int -> int t
-Uniform integer generator producing integers within low,high
-Raises Invalid_argument if the range is too large (typically 2^30)
-
- -
val (--) : int -> int -> int t
-Synonym to QCheck.Gen.int_range
-
- -
val ui32 : int32 t
-Generates (unsigned) int32 values
-
- -
val ui64 : int64 t
-Generates (unsigned) int64 values
-
- -
val list : 'a t -> 'a list t
-Builds a list generator from an element generator. List size is generated by QCheck.Gen.nat
-
- -
val list_size : int t -> 'a t -> 'a list t
-Builds a list generator from a (non-negative) size generator and an element generator
-
- -
val list_repeat : int -> 'a t -> 'a list t
-list_repeat i g builds a list generator from exactly i elements generated by g
-
- -
val array : 'a t -> 'a array t
-Builds an array generator from an element generator. Array size is generated by QCheck.Gen.nat
-
- -
val array_size : int t -> 'a t -> 'a array t
-Builds an array generator from a (non-negative) size generator and an element generator
-
- -
val array_repeat : int -> 'a t -> 'a array t
-array_repeat i g builds an array generator from exactly i elements generated by g
-
- -
val opt : 'a t -> 'a option t
-An option generator
-
- -
val pair : 'a t -> 'b t -> ('a * 'b) t
-Generates pairs
-
- -
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-Generates triples
-
- -
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-Generates quadruples
-Since 0.5.1
-
- -
val char : char t
-Generates characters upto character code 255
-
- -
val printable : char t
-Generates printable characters
-
- -
val numeral : char t
-Generates numeral characters
-
- -
val string_size : ?gen:char t -> int t -> string t
-Builds a string generator from a (non-negative) size generator. - Accepts an optional character generator (the default is QCheck.Gen.char)
-
- -
val string : ?gen:char t -> string t
-Builds a string generator. String size is generated by QCheck.Gen.nat. - Accepts an optional character generator (the default is QCheck.Gen.char)
-
- -
val small_string : ?gen:char t -> string t
-Builds a string generator. String size is in the range 0-10. - Accepts an optional character generator (the default is QCheck.Gen.char)
-
- -
val join : 'a t t -> 'a t
-Collapses a generator of generators to simply a generator.
-Since 0.5
-
- -
val sized : 'a sized -> 'a t
-Create a generator from a size-bounded generator by first - generating a size using QCheck.Gen.nat and passing the result to the size-bounded generator
-
- -
val sized_size : int t -> 'a sized -> 'a t
-Create a generator from a size-bounded generator by first - generating a size using the integer generator and passing the result - to the size-bounded generator
-Since 0.5
-
- -
val fix : ('a sized -> 'a sized) -> 'a sized
-Fixpoint combinator for generating recursive, size-bounded data types. - The passed size-parameter should decrease to ensure termination.
-
-
-Example: -
  type tree = Leaf of int | Node of tree * tree
-
-  let leaf x = Leaf x
-  let node x y = Node (x,y)
-
-  let g = QCheck.Gen.(sized @@ fix
-    (fun self n -> match n with
-      | 0 -> map leaf nat
-      | n ->
-        frequency
-          [1, map leaf nat;
-           2, map2 node (self (n/2)) (self (n/2))]
-      ))
-
-  

- -
val generate : ?rand:Random.State.t -> n:int -> 'a t -> 'a list
-generate ~n g generates n instances of g
-
- -
val generate1 : ?rand:Random.State.t -> 'a t -> 'a
-generate1 g generates one instance of g
-
- \ No newline at end of file diff --git a/docs/0.5.2/QCheck.Iter.html b/docs/0.5.2/QCheck.Iter.html deleted file mode 100644 index 56ca27027a52d77da3f948a0e3455ba090594dde..0000000000000000000000000000000000000000 --- a/docs/0.5.2/QCheck.Iter.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Iter - - - -

Module QCheck.Iter

- -
module Iter: sig .. end
-

Iterators

-

- - Compatible with the library "sequence". An iterator i is simply - a function that accepts another function f (of type 'a -> unit) - and calls f on a sequence of elements f x1; f x2; ...; f xn.
-

-
- -
type 'a t = ('a -> unit) -> unit 
- - -
val empty : 'a t
-
val return : 'a -> 'a t
-
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
-
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
-
val map : ('a -> 'b) -> 'a t -> 'b t
-
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
-
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
-
val append : 'a t -> 'a t -> 'a t
-
val (<+>) : 'a t -> 'a t -> 'a t
-Synonym to QCheck.Iter.append
-
- -
val of_list : 'a list -> 'a t
-
val of_array : 'a array -> 'a t
-
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-
val find : ('a -> bool) -> 'a t -> 'a option
\ No newline at end of file diff --git a/docs/0.5.2/QCheck.Print.html b/docs/0.5.2/QCheck.Print.html deleted file mode 100644 index 4ca93a95864f10b3c738f7bf6fd86816073c41a2..0000000000000000000000000000000000000000 --- a/docs/0.5.2/QCheck.Print.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Print - - - -

Module QCheck.Print

- -
module Print: sig .. end
-

Show Values


-
-
- -
type 'a t = 'a -> string 
- - -
val int : int t
-
val bool : bool t
-
val float : float t
-
val char : char t
-
val string : string t
-
val option : 'a t -> 'a option t
-
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-
val list : 'a t -> 'a list t
-
val array : 'a t -> 'a array t
-
val comap : ('a -> 'b) -> 'b t -> 'a t
\ No newline at end of file diff --git a/docs/0.5.2/QCheck.Shrink.html b/docs/0.5.2/QCheck.Shrink.html deleted file mode 100644 index 63224501b70a1fcb377094547147b46181ce042b..0000000000000000000000000000000000000000 --- a/docs/0.5.2/QCheck.Shrink.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Shrink - - - -

Module QCheck.Shrink

- -
module Shrink: sig .. end
-

Shrink Values

-

- - Shrinking is used to reduce the size of a counter-example. It tries - to make the counter-example smaller by decreasing it, or removing - elements, until the property to test holds again; then it returns the - smallest value that still made the test fail
-

-
- -
type 'a t = 'a -> 'a QCheck.Iter.t 
-
-Given a counter-example, return an iterator on smaller versions - of the counter-example
-
- - -
val nil : 'a t
-No shrink
-
- -
val int : int t
-
val option : 'a t -> 'a option t
-
val string : string t
-
val list : ?shrink:'a t -> 'a list t
-Try to shrink lists by removing elements one by one.
-
-
shrink : if provided, will be used to also try to reduce - the elements of the list themselves (e.g. in an int list - one can try to decrease the integers)
- -
val array : ?shrink:'a t -> 'a array t
-Shrink an array.
-
-
shrink : see QCheck.Shrink.list
- -
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t ->
'd t -> ('a * 'b * 'c * 'd) t
\ No newline at end of file diff --git a/docs/0.5.2/QCheck.Test.html b/docs/0.5.2/QCheck.Test.html deleted file mode 100644 index 5e4b9a2ceac7bd70ed9c02b7bba3a7bbc897e7a4..0000000000000000000000000000000000000000 --- a/docs/0.5.2/QCheck.Test.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Test - - - -

Module QCheck.Test

- -
module Test: sig .. end

- -
type 'a cell 
-
-A single property test
-
- - -
val make_cell : ?count:int ->
?long_factor:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string -> 'a QCheck.arbitrary -> ('a -> bool) -> 'a cell
-make arb prop builds a test that checks property prop on instances - of the generator arb.
-
-
count : number of test cases to run, counting only - the test cases which satisfy preconditions.
-
long_factor : the factor by which to multiply count, max_gen and - max_fail when running a long test (default: 1)
-
max_gen : maximum number of times the generation function - is called in total to replace inputs that do not satisfy - preconditions (should be >= count)
-
max_fail : maximum number of failures before we stop generating - inputs. This is useful if shrinking takes too much time.
-
small : kept for compatibility reasons; if provided, replaces - the field arbitrary.small. - If there is no shrinking function but there is a small - function, only the smallest failures will be printed.
-
name : the name of the test
- -
val get_arbitrary : 'a cell -> 'a QCheck.arbitrary
-
val get_law : 'a cell -> 'a -> bool
-
val get_name : 'a cell -> string
-
val set_name : 'a cell -> string -> unit
-
type t = 
- - - - -
-| -Test : 'a cell -> t(*
-Same as 'a cell, but masking the type parameter. This allows to - put tests on different types in the same list of tests.
-
-
*)
- - - -
val make : ?count:int ->
?long_factor:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string -> 'a QCheck.arbitrary -> ('a -> bool) -> t
-make arb prop builds a test that checks property prop on instances - of the generator arb. - See QCheck.Test.make_cell for a description of the parameters.
-
-
-
Running the test

- -
exception Test_fail of string * string list
-
-Exception raised when a test failed, with the list of counter-examples. - Test_fail (name, l) means test name failed on elements of l
-
- -
exception Test_error of string * string * exn * string
-
-Exception raised when a test raised an exception e, with - the sample that triggered the exception. - Test_error (name, i, e, st) - means name failed on i with exception e, and st is the - stacktrace (if enabled) or an empty 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 cell -> 'a QCheck.TestResult.t -> unit
-check_result cell res checks that res is Ok _, and returns unit. - Otherwise, it raises some exception
-Raises -
- -
type res = 
- - - - - - - - - - - - - - - - - - - -
-| -Success
-| -Failure
-| -FalseAssumption
-| -Error of exn * string
- - - -
type 'a step = string -> 'a cell -> 'a -> res -> unit 
-
-Callback executed after each instance of a test has been run. - The callback is given the instance tested, and the current results - of the test.
-
- - -
type 'a callback = string -> 'a cell -> 'a QCheck.TestResult.t -> unit 
-
-Callback executed after each test has been run. - f name cell res means test cell, named name, gave res
-
- - -
val check_cell : ?long:bool ->
?call:'a callback ->
?step:'a step ->
?rand:Random.State.t -> 'a cell -> 'a QCheck.TestResult.t
-check ~long ~rand test generates up to count random - values of type 'a using arbitrary and the random state st. The - predicate law is called on them and if it returns false or raises an - exception then we have a counter example for the law.
-Returns the result of the test
-
-
long : if true then multiply the number of instances to generate - by the cell's long_factor
-
call : function called on each test case, with the result
-
step : function called on each instance of the test case, with the result
- -
val check_cell_exn : ?long:bool ->
?call:'a callback ->
?step:'a step ->
?rand:Random.State.t -> 'a cell -> unit
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
-Raises -
- -
val check_exn : ?long:bool -> ?rand:Random.State.t -> t -> unit
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
-Raises -
- \ No newline at end of file diff --git a/docs/0.5.2/QCheck.TestResult.html b/docs/0.5.2/QCheck.TestResult.html deleted file mode 100644 index c204a9c8e5dffd939fac86291cdb0ed2da4b4181..0000000000000000000000000000000000000000 --- a/docs/0.5.2/QCheck.TestResult.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.TestResult - - - -

Module QCheck.TestResult

- -
module TestResult: sig .. end
-Result of running a test
-
-
- -
type 'a counter_ex = {
- - - - - - - - - -
-   -instance : 'a;(*
-The counter-example(s)
-
-
*)
-   -shrink_steps : int;(*
-How many shrinking steps for this counterex
-
-
*)
-} - - - -
type 'a failed_state = 'a counter_ex list 
- - -
type 'a state = 
- - - - - - - - - - - - - - -
-| -Success
-| -Failed of 'a failed_state(*
-Failed instances
-
-
*)
-| -Error of 'a counter_ex * exn * string(*
-Error, backtrace, and instance - that triggered it
-
-
*)
- - - -
type 'a t = {
- - - - - - - - - - - - - - - - - - - -
-   -mutable state : 'a state;
-   -mutable count : int;
-   -mutable count_gen : int;
-   -collect_tbl : (string, int) Hashtbl.t lazy_t;
-} - - - \ No newline at end of file diff --git a/docs/0.5.2/QCheck.html b/docs/0.5.2/QCheck.html deleted file mode 100644 index 136b2a6970ccd88b42646d3e6a3af4004abd1871..0000000000000000000000000000000000000000 --- a/docs/0.5.2/QCheck.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - - - - - - - - - -QCheck - - - -

Module QCheck

- -
module QCheck: sig .. end
-

Quickcheck inspired property-based testing


-
-
-
-The library takes inspiration from Haskell's QuickCheck library. The -rough idea is that the programer describes invariants that values of -a certain type need to satisfy ("properties"), as functions from this type -to bool. She also needs to desribe how to generate random values of the type, -so that the property is tried and checked on a number of random instances. -

- -This explains the organization of this module: -

-

- - -Examples: -

-

- -
let test =
-  QCheck.(Test.make ~count:1000
-   (list int) (fun l -> List.rev (List.rev l) = l));;
-
-QCheck.Test.check_exn test;;
-
-

-

- -
let test = QCheck.(
-  Test.make
-    ~count:10_000 ~max_fail:3
-    (list small_nat)
-    (fun l -> l = List.sort compare l));;
-QCheck.Test.check_exn test;;
-
-

-

- -
type tree = Leaf of int | Node of tree * tree
-
-let leaf x = Leaf x
-let node x y = Node (x,y)
-
-let g = QCheck.Gen.(sized @@ fix
-  (fun self n -> match n with
-    | 0 -> map leaf nat
-    | n ->
-      frequency
-        [1, map leaf nat;
-         2, map2 node (self (n/2)) (self (n/2))]
-    ))
-
-Gen.generate ~n:20 g;;
-
-

- -More complex and powerful combinators can be found in Gabriel Scherer's -Generator module. Its documentation can be found - here.
- -

val (==>) : bool -> bool -> bool
-b1 ==> b2 is the logical implication b1 => b2 - ie not b1 || b2 (except that it is strict and will interact - better with QCheck.Test.check_exn and the likes, because they will know - the precondition was not satisfied.). -

- - WARNING: this function should only be used in a property - (see QCheck.Test.make), because it raises a special exception in case of - failure of the first argument, to distinguish between failed test - and failed precondition. Because of OCaml's evaluation order, - both b1 and b2 are always evaluated; if b2 should only be - evaluated when b1 holds, see QCheck.assume.
-

- -
val assume : bool -> unit
-assume cond checks the precondition cond, and does nothing - if cond=true. If cond=false, it interrupts the current test. -

- - WARNING This function, like QCheck.(==>), should only be used in - a test. not outside. - Example: -

      Test.make (list int) (fun l ->
-        assume (l <> []);
-        List.hd l :: List.tl l = l)
-    

-Since 0.5.1
-
- -
val assume_fail : unit -> 'a
-assume_fail () is like assume false, but can take any type - since we know it always fails (like assert false). - This is useful to ignore some branches in if or match. -

- - Example: -

      Test.make (list int) (function
-        | [] -> assume_fail ()
-        | _::_ as l -> List.hd l :: List.tl l = l)
-    

-Since 0.5.1
-
- -
module Gen: sig .. end
-Generate Random Values -
-
-

Pretty printing


- -
module Print: sig .. end
-Show Values -
- -
module Iter: sig .. end
-Iterators -
- -
module Shrink: sig .. end
-Shrink Values -
-
-

Arbitrary

-

- - A value of type 'a arbitrary glues together a random generator, - and optional functions for shrinking, printing, computing the size, - etc. It is the "normal" way of describing how to generate - values of a given type, to be then used in tests (see QCheck.Test)
- -

type 'a arbitrary = {
- - - - - - - - - - - - - - - - - - - - - - - - -
-   -gen : 'a Gen.t;
-   -print : ('a -> string) option;(*
-print values
-
-
*)
-   -small : ('a -> int) option;(*
-size of example
-
-
*)
-   -shrink : 'a Shrink.t option;(*
-shrink to smaller examples
-
-
*)
-   -collect : ('a -> string) option;(*
-map value to tag, and group by tag
-
-
*)
-} - -
-a value of type 'a arbitrary is an object with a method for generating random - values of type 'a, and additional methods to compute the size of values, - print them, and possibly shrink them into smaller counterexamples -

- - NOTE the collect field is unstable and might be removed, or - moved into QCheck.Test.
-

- - -
val make : ?print:'a Print.t ->
?small:('a -> int) ->
?shrink:'a Shrink.t ->
?collect:('a -> string) -> 'a Gen.t -> 'a arbitrary
-Builder for arbitrary. Default is to only have a generator, but other - arguments can be added
-
- -
val set_print : 'a Print.t -> 'a arbitrary -> 'a arbitrary
-
val set_small : ('a -> int) -> 'a arbitrary -> 'a arbitrary
-
val set_shrink : 'a Shrink.t -> 'a arbitrary -> 'a arbitrary
-
val set_collect : ('a -> string) -> 'a arbitrary -> 'a arbitrary

-

Tests

-

- - A test is a universal property of type foo -> bool for some type foo, - with an object of type foo arbitrary used to generate, print, etc. values - of type foo. -

- - See QCheck.Test.make to build a test, and QCheck.Test.check_exn to - run one test simply. - For more serious testing, it is better to create a testsuite - and use QCheck_runner.
- -

module TestResult: sig .. end
-Result of running a test -
- -
module Test: sig .. end

-

Combinators for QCheck.arbitrary


- -
val choose : 'a arbitrary list -> 'a arbitrary
-Choose among the given list of generators. The list must not - be empty; if it is Invalid_argument is raised.
-
- -
val unit : unit arbitrary
-always generates (), obviously.
-
- -
val bool : bool arbitrary
-uniform boolean generator
-
- -
val float : float arbitrary
-generates regular floats (no nan and no infinities)
-
- -
val pos_float : float arbitrary
-positive float generator (no nan and no infinities)
-
- -
val neg_float : float arbitrary
-negative float generator (no nan and no infinities)
-
- -
val int : int arbitrary
-int generator. Uniformly distributed
-
- -
val int_bound : int -> int arbitrary
-int_bound n is uniform between 0 and n included
-
- -
val int_range : int -> int -> int arbitrary
-int_range a b is uniform between a and b included. b must be - larger than a.
-
- -
val small_nat : int arbitrary
-Small unsigned integers
-Since 0.5.1
-
- -
val small_int : int arbitrary
-Deprecated.use QCheck.small_signed_int
-Small unsigned integers. See QCheck.Gen.small_int.
-
- -
val small_signed_int : int arbitrary
-Small signed integers
-Since 0.5.2
-
- -
val (--) : int -> int -> int arbitrary
-Synonym to QCheck.int_range
-
- -
val int32 : int32 arbitrary
-int32 generator. Uniformly distributed
-
- -
val int64 : int64 arbitrary
-int generator. Uniformly distributed
-
- -
val pos_int : int arbitrary
-positive int generator. Uniformly distributed
-
- -
val small_int_corners : unit -> int arbitrary
-As small_int, but each newly created generator starts with - a list of corner cases before falling back on random generation.
-
- -
val neg_int : int arbitrary
-negative int generator. The distribution is similar to that of - small_int, not of pos_int.
-
- -
val char : char arbitrary
-Uniformly distributed on all the chars (not just ascii or - valid latin-1)
-
- -
val printable_char : char arbitrary
-uniformly distributed over a subset of chars
-
- -
val numeral_char : char arbitrary
-uniformy distributed over '0'..'9'
-
- -
val string_gen_of_size : int Gen.t -> char Gen.t -> string arbitrary
-
val string_gen : char Gen.t -> string arbitrary
-generates strings with a distribution of length of small_nat
-
- -
val string : string arbitrary
-generates strings with a distribution of length of small_nat - and distribution of characters of char
-
- -
val small_string : string arbitrary
-Same as QCheck.string but with a small length (that is, 0--10)
-
- -
val string_of_size : int Gen.t -> string arbitrary
-generates strings with distribution of characters if char
-
- -
val printable_string : string arbitrary
-generates strings with a distribution of length of small_nat - and distribution of characters of printable_char
-
- -
val printable_string_of_size : int Gen.t -> string arbitrary
-generates strings with distribution of characters of printable_char
-
- -
val small_printable_string : string arbitrary
-
val numeral_string : string arbitrary
-generates strings with a distribution of length of small_nat - and distribution of characters of numeral_char
-
- -
val numeral_string_of_size : int Gen.t -> string arbitrary
-generates strings with a distribution of characters of numeral_char
-
- -
val list : 'a arbitrary -> 'a list arbitrary
-generates lists with length generated by small_nat
-
- -
val list_of_size : int Gen.t -> 'a arbitrary -> 'a list arbitrary
-generates lists with length from the given distribution
-
- -
val array : 'a arbitrary -> 'a array arbitrary
-generates arrays with length generated by small_nat
-
- -
val array_of_size : int Gen.t -> 'a arbitrary -> 'a array arbitrary
-generates arrays with length from the given distribution
-
- -
val pair : 'a arbitrary -> 'b arbitrary -> ('a * 'b) arbitrary
-combines two generators into a generator of pairs
-
- -
val triple : 'a arbitrary ->
'b arbitrary -> 'c arbitrary -> ('a * 'b * 'c) arbitrary
-combines three generators into a generator of 3-tuples
-
- -
val quad : 'a arbitrary ->
'b arbitrary ->
'c arbitrary ->
'd arbitrary -> ('a * 'b * 'c * 'd) arbitrary
-combines four generators into a generator of 4-tuples
-
- -
val option : 'a arbitrary -> 'a option arbitrary
-choose between returning Some random value, or None
-
- -
val fun1 : 'a arbitrary -> 'b arbitrary -> ('a -> 'b) arbitrary
-generator of functions of arity 1. - The functions are always pure and total functions: -
-
- -
val fun2 : 'a arbitrary ->
'b arbitrary ->
'c arbitrary -> ('a -> 'b -> 'c) arbitrary
-generator of functions of arity 2. The remark about fun1 also apply - here.
-
- -
val oneofl : ?print:'a Print.t ->
?collect:('a -> string) -> 'a list -> 'a arbitrary
-Pick an element randomly in the list
-
- -
val oneofa : ?print:'a Print.t ->
?collect:('a -> string) -> 'a array -> 'a arbitrary
-Pick an element randomly in the array
-
- -
val oneof : 'a arbitrary list -> 'a arbitrary
-Pick a generator among the list, randomly
-
- -
val always : ?print:'a Print.t -> 'a -> 'a arbitrary
-Always return the same element
-
- -
val frequency : ?print:'a Print.t ->
?small:('a -> int) ->
?shrink:'a Shrink.t ->
?collect:('a -> string) ->
(int * 'a arbitrary) list -> 'a arbitrary
-Similar to QCheck.oneof but with frequencies
-
- -
val frequencyl : ?print:'a Print.t ->
?small:('a -> int) -> (int * 'a) list -> 'a arbitrary
-Same as QCheck.oneofl, but each element is paired with its frequency in - the probability distribution (the higher, the more likely)
-
- -
val frequencya : ?print:'a Print.t ->
?small:('a -> int) -> (int * 'a) array -> 'a arbitrary
-Same as QCheck.frequencyl, but with an array
-
- -
val map : ?rev:('b -> 'a) -> ('a -> 'b) -> 'a arbitrary -> 'b arbitrary
-map f a returns a new arbitrary instance that generates values using - a#gen and then transforms them through f.
-
-
rev : if provided, maps values back to type 'a so that the printer, - shrinker, etc. of a can be used. We assume f is monotonic in - this case (that is, smaller inputs are transformed into smaller outputs).
- -
val map_same_type : ('a -> 'a) -> 'a arbitrary -> 'a arbitrary
-Specialization of map when the transformation preserves the type, which - makes shrinker, printer, etc. still relevant
-
- -
val map_keep_input : ?print:'b Print.t ->
?small:('b -> int) ->
('a -> 'b) -> 'a arbitrary -> ('a * 'b) arbitrary
-map_keep_input f a generates random values from a, and maps them into - values of type 'b using the function f, but it also keeps the - original value. - For shrinking, it is assumed that f is monotonic and that smaller input - values will map into smaller values
-
-
print : optional printer for the f's output
- \ No newline at end of file diff --git a/docs/0.5.2/QCheck_runner.html b/docs/0.5.2/QCheck_runner.html deleted file mode 100644 index 4a6057026ff07b1127001058f139056bfdf2577e..0000000000000000000000000000000000000000 --- a/docs/0.5.2/QCheck_runner.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - -QCheck_runner - - - -

Module QCheck_runner

- -
module QCheck_runner: sig .. end
-

Runners for Tests


-
-
-
-

State


- -
val random_state : unit -> Random.State.t
-Access the current random state
-
- -
val verbose : unit -> bool
-Is the default mode verbose or quiet?
-
- -
val long_tests : unit -> bool
-Is the default mode to run long tests or nor?
-
- -
val set_seed : int -> unit
-Change the QCheck_runner.random_state by creating a new one, initialized with - the given seed.
-
- -
val set_verbose : bool -> unit
-Change the value of verbose ()
-
- -
val set_long_tests : bool -> unit
-Change the value of long_tests ()
-
-
-

Conversion of tests to OUnit Tests


- -
val to_ounit_test : ?verbose:bool ->
?long:bool -> ?rand:Random.State.t -> QCheck.Test.t -> OUnit.test
-to_ounit_test ~rand t wraps t into a OUnit test
-
-
verbose : used to print information on stdout (default: verbose())
-
rand : the random generator to use (default: random_state ())
- -
val to_ounit_test_cell : ?verbose:bool ->
?long:bool -> ?rand:Random.State.t -> 'a QCheck.Test.cell -> OUnit.test
-Same as QCheck_runner.to_ounit_test but with a polymorphic test cell
-
- -
val (>:::) : string -> QCheck.Test.t list -> OUnit.test
-Same as OUnit.>::: but with a list of QCheck tests
-
- -
val to_ounit2_test : ?rand:Random.State.t -> QCheck.Test.t -> OUnit2.test
-to_ounit2_test ?rand t wraps t into a OUnit2 test
-
-
rand : the random generator to use (default: a static seed for reproducibility), - can be overridden with "-seed" on the command-line
- -
val to_ounit2_test_list : ?rand:Random.State.t -> QCheck.Test.t list -> OUnit2.test list
-to_ounit2_test_list ?rand t like to_ounit2_test but for a list of tests
-
-
-

OUnit runners


- -
val run : ?argv:string array -> OUnit.test -> int
-run test runs the test, and returns an error code that is 0 - if all tests passed, 1 otherwise. - This is the default runner used by the comment-to-test generator.
-Raises -
-
argv : the command line arguments to parse parameters from (default Sys.argv)
- -
val run_tap : OUnit.test -> OUnit.test_results
-TAP-compatible test runner, in case we want to use a test harness. - It prints one line per test.
-
-
-

Run a Suite of Tests and Get Results


- -
val run_tests : ?verbose:bool ->
?long:bool ->
?out:Pervasives.out_channel ->
?rand:Random.State.t -> QCheck.Test.t list -> int
-Run a suite of tests, and print its results. This is an heritage from - the "qcheck" library.
-Returns an error code, 0 if all tests passed, 1 otherwise.
-
-
verbose : if true, prints more information about test cases
- -
val run_tests_main : ?argv:string array -> QCheck.Test.t list -> 'a
-Can be used as the main function of a test file. Exits with a non-0 code - if the tests fail. It refers to QCheck_runner.run_tests for actually running tests - after CLI options have been parsed. -

- - The available options are: -

-

-
-
- \ No newline at end of file diff --git a/docs/0.5.2/html.stamp b/docs/0.5.2/html.stamp deleted file mode 100644 index 7b495403b518cc2086b05d4889f523ad48a8667c..0000000000000000000000000000000000000000 --- a/docs/0.5.2/html.stamp +++ /dev/null @@ -1 +0,0 @@ -77a8ca20298fea26be614e828812dbf3 \ No newline at end of file diff --git a/docs/0.5.2/index.html b/docs/0.5.2/index.html deleted file mode 100644 index 10965bb1364d27f2aa809532e911a953c6d8dc69..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - -

- -

- - - -
QCheck
-Quickcheck inspired property-based testing -
-
QCheck_runner
-Runners for Tests -
-
- - \ No newline at end of file diff --git a/docs/0.5.2/index_attributes.html b/docs/0.5.2/index_attributes.html deleted file mode 100644 index e1f0a8508332f8bc0eb5c979d596a553f62e5954..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_attributes.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of class attributes - - - -

Index of class attributes

- -
- - \ No newline at end of file diff --git a/docs/0.5.2/index_class_types.html b/docs/0.5.2/index_class_types.html deleted file mode 100644 index a9205d15d3f25acb9d1ac9e61ff2ddd8facd3c93..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_class_types.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of class types - - - -

Index of class types

- -
- - \ No newline at end of file diff --git a/docs/0.5.2/index_classes.html b/docs/0.5.2/index_classes.html deleted file mode 100644 index dedec69ab28c30776557e9a13a9ad02df6f08278..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_classes.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of classes - - - -

Index of classes

- -
- - \ No newline at end of file diff --git a/docs/0.5.2/index_exceptions.html b/docs/0.5.2/index_exceptions.html deleted file mode 100644 index 0e3cf90c958d7d2e946fc2be09b39e0ffe2172a6..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_exceptions.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - -Index of exceptions - - - -

Index of exceptions

- - - - - - -

T
Test_error [QCheck.Test]
-Exception raised when a test raised an exception e, with - the sample that triggered the exception. -
-
Test_fail [QCheck.Test]
-Exception raised when a test failed, with the list of counter-examples. -
-
- - \ No newline at end of file diff --git a/docs/0.5.2/index_extensions.html b/docs/0.5.2/index_extensions.html deleted file mode 100644 index 5b7d02e7e16eb78daa592beaa56f56dcb55ababd..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_extensions.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of extensions - - - -

Index of extensions

- -
- - \ No newline at end of file diff --git a/docs/0.5.2/index_methods.html b/docs/0.5.2/index_methods.html deleted file mode 100644 index f03dc720c3d6534e84dcfe41d1c5c75677318889..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_methods.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of class methods - - - -

Index of class methods

- -
- - \ No newline at end of file diff --git a/docs/0.5.2/index_module_types.html b/docs/0.5.2/index_module_types.html deleted file mode 100644 index 2f0fec4eab1f8f34b016f85594d1803e5981a211..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_module_types.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of module types - - - -

Index of module types

- -
- - \ No newline at end of file diff --git a/docs/0.5.2/index_modules.html b/docs/0.5.2/index_modules.html deleted file mode 100644 index 41493666db9c0c6b9bb3abda1756f3c5b57d509c..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_modules.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - -Index of modules - - - -

Index of modules

- - - - - - - - - - - - - - - - - - - - - - - -

G
Gen [QCheck]
-Generate Random Values -
-

I
Iter [QCheck]
-Iterators -
-

P
Print [QCheck]
-Show Values -
-

Q
QCheck
-Quickcheck inspired property-based testing -
-
QCheck_runner
-Runners for Tests -
-

S
Shrink [QCheck]
-Shrink Values -
-

T
Test [QCheck]
TestResult [QCheck]
-Result of running a test -
-
- - \ No newline at end of file diff --git a/docs/0.5.2/index_types.html b/docs/0.5.2/index_types.html deleted file mode 100644 index abfeaaceb85b2bcbe48083a81678ce1dcb002263..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_types.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - -Index of types - - - -

Index of types

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

A
arbitrary [QCheck]
-a value of type 'a arbitrary is an object with a method for generating random - values of type 'a, and additional methods to compute the size of values, - print them, and possibly shrink them into smaller counterexamples -
-

C
callback [QCheck.Test]
-Callback executed after each test has been run. -
-
cell [QCheck.Test]
-A single property test -
-
counter_ex [QCheck.TestResult]

F
failed_state [QCheck.TestResult]

R
res [QCheck.Test]

S
sized [QCheck.Gen]
-Random generator with a size bound -
-
state [QCheck.TestResult]
step [QCheck.Test]
-Callback executed after each instance of a test has been run. -
-

T
t [QCheck.Test]
t [QCheck.TestResult]
t [QCheck.Shrink]
-Given a counter-example, return an iterator on smaller versions - of the counter-example -
-
t [QCheck.Iter]
t [QCheck.Print]
t [QCheck.Gen]
-A random generator for values of type 'a -
-
- - \ No newline at end of file diff --git a/docs/0.5.2/index_values.html b/docs/0.5.2/index_values.html deleted file mode 100644 index 9429085987dfe257e42a4aa4aa3981c58d832a1f..0000000000000000000000000000000000000000 --- a/docs/0.5.2/index_values.html +++ /dev/null @@ -1,828 +0,0 @@ - - - - - - - - - - - -Index of values - - - -

Index of values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(--) [QCheck.Gen]
-Synonym to QCheck.Gen.int_range -
-
(--) [QCheck]
-Synonym to QCheck.int_range -
-
(<*>) [QCheck.Iter]
(<*>) [QCheck.Gen]
-Infix operator for composing a function generator and an argument generator - into a result generator -
-
(<+>) [QCheck.Iter]
-Synonym to QCheck.Iter.append -
-
(==>) [QCheck]
-b1 ==> b2 is the logical implication b1 => b2 - ie not b1 || b2 (except that it is strict and will interact - better with QCheck.Test.check_exn and the likes, because they will know - the precondition was not satisfied.). -
-
(>:::) [QCheck_runner]
-Same as OUnit.>::: but with a list of QCheck tests -
-
(>>=) [QCheck.Iter]
(>>=) [QCheck.Gen]
-Monadic bind for writing dependent generators. -
-
(>|=) [QCheck.Iter]
(>|=) [QCheck.Gen]
-An infix synonym for QCheck.Gen.map -
-

A
always [QCheck]
-Always return the same element -
-
append [QCheck.Iter]
array [QCheck.Shrink]
-Shrink an array. -
-
array [QCheck.Print]
array [QCheck.Gen]
-Builds an array generator from an element generator. -
-
array [QCheck]
-generates arrays with length generated by small_nat -
-
array_of_size [QCheck]
-generates arrays with length from the given distribution -
-
array_repeat [QCheck.Gen]
-array_repeat i g builds an array generator from exactly i elements generated by g -
-
array_size [QCheck.Gen]
-Builds an array generator from a (non-negative) size generator and an element generator -
-
assume [QCheck]
-assume cond checks the precondition cond, and does nothing - if cond=true. -
-
assume_fail [QCheck]
-assume_fail () is like assume false, but can take any type - since we know it always fails (like assert false). -
-

B
bool [QCheck.Print]
bool [QCheck.Gen]
-The Boolean generator -
-
bool [QCheck]
-uniform boolean generator -
-

C
char [QCheck.Print]
char [QCheck.Gen]
-Generates characters upto character code 255 -
-
char [QCheck]
-Uniformly distributed on all the chars (not just ascii or - valid latin-1) -
-
check_cell [QCheck.Test]
-check ~long ~rand test generates up to count random - values of type 'a using arbitrary and the random state st. -
-
check_cell_exn [QCheck.Test]
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result. -
-
check_exn [QCheck.Test]
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result. -
-
check_result [QCheck.Test]
-check_result cell res checks that res is Ok _, and returns unit. -
-
choose [QCheck]
-Choose among the given list of generators. -
-
comap [QCheck.Print]

E
empty [QCheck.Iter]

F
find [QCheck.Iter]
fix [QCheck.Gen]
-Fixpoint combinator for generating recursive, size-bounded data types. -
-
float [QCheck.Print]
float [QCheck.Gen]
-Generates floating point numbers -
-
float [QCheck]
-generates regular floats (no nan and no infinities) -
-
frequency [QCheck.Gen]
-Constructs a generator that selects among a given list of generators. -
-
frequency [QCheck]
-Similar to QCheck.oneof but with frequencies -
-
frequencya [QCheck.Gen]
-Constructs a generator that selects among a given array of values. -
-
frequencya [QCheck]
-Same as QCheck.frequencyl, but with an array -
-
frequencyl [QCheck.Gen]
-Constructs a generator that selects among a given list of values. -
-
frequencyl [QCheck]
-Same as QCheck.oneofl, but each element is paired with its frequency in - the probability distribution (the higher, the more likely) -
-
fun1 [QCheck]
-generator of functions of arity 1. -
-
fun2 [QCheck]
-generator of functions of arity 2. -
-

G
generate [QCheck.Gen]
-generate ~n g generates n instances of g -
-
generate1 [QCheck.Gen]
-generate1 g generates one instance of g -
-
get_arbitrary [QCheck.Test]
get_law [QCheck.Test]
get_name [QCheck.Test]

I
int [QCheck.Shrink]
int [QCheck.Print]
int [QCheck.Gen]
-Generates integers uniformly -
-
int [QCheck]
-int generator. -
-
int32 [QCheck]
-int32 generator. -
-
int64 [QCheck]
-int generator. -
-
int_bound [QCheck.Gen]
-Uniform integer generator producing integers within 0... bound. -
-
int_bound [QCheck]
-int_bound n is uniform between 0 and n included -
-
int_range [QCheck.Gen]
-Uniform integer generator producing integers within low,high -
-
int_range [QCheck]
-int_range a b is uniform between a and b included. -
-

J
join [QCheck.Gen]
-Collapses a generator of generators to simply a generator. -
-

L
list [QCheck.Shrink]
-Try to shrink lists by removing elements one by one. -
-
list [QCheck.Print]
list [QCheck.Gen]
-Builds a list generator from an element generator. -
-
list [QCheck]
-generates lists with length generated by small_nat -
-
list_of_size [QCheck]
-generates lists with length from the given distribution -
-
list_repeat [QCheck.Gen]
-list_repeat i g builds a list generator from exactly i elements generated by g -
-
list_size [QCheck.Gen]
-Builds a list generator from a (non-negative) size generator and an element generator -
-
long_tests [QCheck_runner]
-Is the default mode to run long tests or nor? -
-

M
make [QCheck.Test]
-make arb prop builds a test that checks property prop on instances - of the generator arb. -
-
make [QCheck]
-Builder for arbitrary. -
-
make_cell [QCheck.Test]
-make arb prop builds a test that checks property prop on instances - of the generator arb. -
-
map [QCheck.Iter]
map [QCheck.Gen]
-map f g transforms a generator g by applying f to each generated element -
-
map [QCheck]
-map f a returns a new arbitrary instance that generates values using - a#gen and then transforms them through f. -
-
map2 [QCheck.Iter]
map2 [QCheck.Gen]
-map f g1 g2 transforms two generators g1 and g2 by applying f to each - pair of generated elements -
-
map3 [QCheck.Gen]
-map f g1 g2 g3 transforms two generators g1, g2, and g3 by applying f - to each triple of generated elements -
-
map_keep_input [QCheck.Gen]
-map f g transforms a generator g by applying f to each generated element. -
-
map_keep_input [QCheck]
-map_keep_input f a generates random values from a, and maps them into - values of type 'b using the function f, but it also keeps the - original value. -
-
map_same_type [QCheck]
-Specialization of map when the transformation preserves the type, which - makes shrinker, printer, etc. -
-

N
nat [QCheck.Gen]
-Generates small natural numbers -
-
neg_float [QCheck]
-negative float generator (no nan and no infinities) -
-
neg_int [QCheck.Gen]
-Generates negative integers -
-
neg_int [QCheck]
-negative int generator. -
-
nfloat [QCheck.Gen]
-Generates negative floating point numbers -
-
nil [QCheck.Shrink]
-No shrink -
-
numeral [QCheck.Gen]
-Generates numeral characters -
-
numeral_char [QCheck]
-uniformy distributed over '0'..'9' -
-
numeral_string [QCheck]
-generates strings with a distribution of length of small_nat - and distribution of characters of numeral_char -
-
numeral_string_of_size [QCheck]
-generates strings with a distribution of characters of numeral_char -
-

O
of_array [QCheck.Iter]
of_list [QCheck.Iter]
oneof [QCheck.Gen]
-Constructs a generator that selects among a given list of generators -
-
oneof [QCheck]
-Pick a generator among the list, randomly -
-
oneofa [QCheck.Gen]
-Constructs a generator that selects among a given array of values -
-
oneofa [QCheck]
-Pick an element randomly in the array -
-
oneofl [QCheck.Gen]
-Constructs a generator that selects among a given list of values -
-
oneofl [QCheck]
-Pick an element randomly in the list -
-
opt [QCheck.Gen]
-An option generator -
-
option [QCheck.Shrink]
option [QCheck.Print]
option [QCheck]
-choose between returning Some random value, or None -
-

P
pair [QCheck.Shrink]
pair [QCheck.Iter]
pair [QCheck.Print]
pair [QCheck.Gen]
-Generates pairs -
-
pair [QCheck]
-combines two generators into a generator of pairs -
-
pfloat [QCheck.Gen]
-Generates positive floating point numbers -
-
pint [QCheck.Gen]
-Generates positive integers uniformly -
-
pos_float [QCheck]
-positive float generator (no nan and no infinities) -
-
pos_int [QCheck]
-positive int generator. -
-
print_c_ex [QCheck.Test]
print_error [QCheck.Test]
print_fail [QCheck.Test]
print_instance [QCheck.Test]
print_test_error [QCheck.Test]
print_test_fail [QCheck.Test]
printable [QCheck.Gen]
-Generates printable characters -
-
printable_char [QCheck]
-uniformly distributed over a subset of chars -
-
printable_string [QCheck]
-generates strings with a distribution of length of small_nat - and distribution of characters of printable_char -
-
printable_string_of_size [QCheck]
-generates strings with distribution of characters of printable_char -
-

Q
quad [QCheck.Shrink]
quad [QCheck.Iter]
quad [QCheck.Print]
quad [QCheck.Gen]
-Generates quadruples -
-
quad [QCheck]
-combines four generators into a generator of 4-tuples -
-

R
random_state [QCheck_runner]
-Access the current random state -
-
return [QCheck.Iter]
return [QCheck.Gen]
-Create a constant generator -
-
run [QCheck_runner]
-run test runs the test, and returns an error code that is 0 - if all tests passed, 1 otherwise. -
-
run_tap [QCheck_runner]
-TAP-compatible test runner, in case we want to use a test harness. -
-
run_tests [QCheck_runner]
-Run a suite of tests, and print its results. -
-
run_tests_main [QCheck_runner]
-Can be used as the main function of a test file. -
-

S
set_collect [QCheck]
set_long_tests [QCheck_runner]
-Change the value of long_tests () -
-
set_name [QCheck.Test]
set_print [QCheck]
set_seed [QCheck_runner]
-Change the QCheck_runner.random_state by creating a new one, initialized with - the given seed. -
-
set_shrink [QCheck]
set_small [QCheck]
set_verbose [QCheck_runner]
-Change the value of verbose () -
-
shuffle_a [QCheck.Gen]
-Shuffle the array in place -
-
shuffle_l [QCheck.Gen]
-Creates a generator of shuffled lists -
-
sized [QCheck.Gen]
-Create a generator from a size-bounded generator by first - generating a size using QCheck.Gen.nat and passing the result to the size-bounded generator -
-
sized_size [QCheck.Gen]
-Create a generator from a size-bounded generator by first - generating a size using the integer generator and passing the result - to the size-bounded generator -
-
small_int [QCheck.Gen]
-Small UNSIGNED integers, for retrocompatibility -
-
small_int [QCheck]
-Small unsigned integers. -
-
small_int_corners [QCheck]
-As small_int, but each newly created generator starts with - a list of corner cases before falling back on random generation. -
-
small_nat [QCheck.Gen]
-Synonym to QCheck.Gen.nat -
-
small_nat [QCheck]
-Small unsigned integers -
-
small_printable_string [QCheck]
small_signed_int [QCheck.Gen]
-small SIGNED integers -
-
small_signed_int [QCheck]
-Small signed integers -
-
small_string [QCheck.Gen]
-Builds a string generator. -
-
small_string [QCheck]
-Same as QCheck.string but with a small length (that is, 0--10) -
-
string [QCheck.Shrink]
string [QCheck.Print]
string [QCheck.Gen]
-Builds a string generator. -
-
string [QCheck]
-generates strings with a distribution of length of small_nat - and distribution of characters of char -
-
string_gen [QCheck]
-generates strings with a distribution of length of small_nat -
-
string_gen_of_size [QCheck]
string_of_size [QCheck]
-generates strings with distribution of characters if char -
-
string_size [QCheck.Gen]
-Builds a string generator from a (non-negative) size generator. -
-

T
to_ounit2_test [QCheck_runner]
-to_ounit2_test ?rand t wraps t into a OUnit2 test -
-
to_ounit2_test_list [QCheck_runner]
-to_ounit2_test_list ?rand t like to_ounit2_test but for a list of tests -
-
to_ounit_test [QCheck_runner]
-to_ounit_test ~rand t wraps t into a OUnit test -
-
to_ounit_test_cell [QCheck_runner]
-Same as QCheck_runner.to_ounit_test but with a polymorphic test cell -
-
triple [QCheck.Shrink]
triple [QCheck.Iter]
triple [QCheck.Print]
triple [QCheck.Gen]
-Generates triples -
-
triple [QCheck]
-combines three generators into a generator of 3-tuples -
-

U
ui32 [QCheck.Gen]
-Generates (unsigned) int32 values -
-
ui64 [QCheck.Gen]
-Generates (unsigned) int64 values -
-
unit [QCheck.Gen]
-The unit generator -
-
unit [QCheck]
-always generates (), obviously. -
-

V
verbose [QCheck_runner]
-Is the default mode verbose or quiet? -
-
- - \ No newline at end of file diff --git a/docs/0.5.2/style.css b/docs/0.5.2/style.css deleted file mode 100644 index a5b4578755f28f6915ffe9764c450a732a01000a..0000000000000000000000000000000000000000 --- a/docs/0.5.2/style.css +++ /dev/null @@ -1,39 +0,0 @@ -.keyword { font-weight : bold ; color : Red } -.keywordsign { color : #C04600 } -.comment { color : Green } -.constructor { color : Blue } -.type { color : #5C6585 } -.string { color : Maroon } -.warning { color : Red ; font-weight : bold } -.info { margin-left : 3em; margin-right: 3em } -.param_info { margin-top: 4px; margin-left : 3em; margin-right : 3em } -.code { color : #465F91 ; } -.typetable { border-style : hidden } -.paramstable { border-style : hidden ; padding: 5pt 5pt} -tr { background-color : White } -td.typefieldcomment { background-color : #FFFFFF ; font-size: smaller ;} -div.sig_block {margin-left: 2em} -*:target { background: yellow; } -body {font: 13px sans-serif; color: black; text-align: left; padding: 5px; margin: 0} -h1 { font-size : 20pt ; text-align: center; } -h2 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90BDFF ;padding: 2px; } -h3 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90DDFF ;padding: 2px; } -h4 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90EDFF ;padding: 2px; } -h5 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90FDFF ;padding: 2px; } -h6 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90BDFF ; padding: 2px; } -div.h7 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #E0FFFF ; padding: 2px; } -div.h8 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #F0FFFF ; padding: 2px; } -div.h9 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #FFFFFF ; padding: 2px; } -a {color: #416DFF; text-decoration: none} -a:hover {background-color: #ddd; text-decoration: underline} -pre { margin-bottom: 4px; font-family: monospace; } -pre.verbatim, pre.codepre { } -.indextable {border: 1px #ddd solid; border-collapse: collapse} -.indextable td, .indextable th {border: 1px #ddd solid; min-width: 80px} -.indextable td.module {background-color: #eee ; padding-left: 2px; padding-right: 2px} -.indextable td.module a {color: 4E6272; text-decoration: none; display: block; width: 100%} -.indextable td.module a:hover {text-decoration: underline; background-color: transparent} -.deprecated {color: #888; font-style: italic} -.indextable tr td div.info { margin-left: 2px; margin-right: 2px } -ul.indexlist { margin-left: 0; padding-left: 0;} -ul.indexlist li { list-style-type: none ; margin-left: 0; padding-left: 0; } \ No newline at end of file diff --git a/docs/0.5.2/type_QCheck.Gen.html b/docs/0.5.2/type_QCheck.Gen.html deleted file mode 100644 index 42421459a0a362429df37f5ffa3580e756b2bf3c..0000000000000000000000000000000000000000 --- a/docs/0.5.2/type_QCheck.Gen.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - -QCheck.Gen - - -sig
-  type 'a t = Random.State.t -> 'a
-  type 'a sized = int -> Random.State.t -> 'a
-  val return : '-> 'QCheck.Gen.t
-  val ( >>= ) : 'QCheck.Gen.t -> ('-> 'QCheck.Gen.t) -> 'QCheck.Gen.t
-  val ( <*> ) : ('-> 'b) QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-  val map : ('-> 'b) -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-  val map2 :
-    ('-> '-> 'c) -> 'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-  val map3 :
-    ('-> '-> '-> 'd) ->
-    'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-  val map_keep_input :
-    ('-> 'b) -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
-  val ( >|= ) : 'QCheck.Gen.t -> ('-> 'b) -> 'QCheck.Gen.t
-  val oneof : 'QCheck.Gen.t list -> 'QCheck.Gen.t
-  val oneofl : 'a list -> 'QCheck.Gen.t
-  val oneofa : 'a array -> 'QCheck.Gen.t
-  val frequency : (int * 'QCheck.Gen.t) list -> 'QCheck.Gen.t
-  val frequencyl : (int * 'a) list -> 'QCheck.Gen.t
-  val frequencya : (int * 'a) array -> '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 small_signed_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 : 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-  val list_size : int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-  val list_repeat : int -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-  val array : 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-  val array_size :
-    int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-  val array_repeat : int -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-  val opt : 'QCheck.Gen.t -> 'a option QCheck.Gen.t
-  val pair : 'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
-  val triple :
-    'QCheck.Gen.t ->
-    'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b * 'c) QCheck.Gen.t
-  val quad :
-    'QCheck.Gen.t ->
-    'QCheck.Gen.t ->
-    'QCheck.Gen.t -> '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 : 'QCheck.Gen.t QCheck.Gen.t -> 'QCheck.Gen.t
-  val sized : 'QCheck.Gen.sized -> 'QCheck.Gen.t
-  val sized_size : int QCheck.Gen.t -> 'QCheck.Gen.sized -> 'QCheck.Gen.t
-  val fix :
-    ('QCheck.Gen.sized -> 'QCheck.Gen.sized) -> 'QCheck.Gen.sized
-  val generate : ?rand:Random.State.t -> n:int -> 'QCheck.Gen.t -> 'a list
-  val generate1 : ?rand:Random.State.t -> 'QCheck.Gen.t -> 'a
-end
\ No newline at end of file diff --git a/docs/0.5.2/type_QCheck.Iter.html b/docs/0.5.2/type_QCheck.Iter.html deleted file mode 100644 index 25c7f02f5eba0b4e59aae7a6bc2e595af50c6063..0000000000000000000000000000000000000000 --- a/docs/0.5.2/type_QCheck.Iter.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - -QCheck.Iter - - -sig
-  type 'a t = ('-> unit) -> unit
-  val empty : 'QCheck.Iter.t
-  val return : '-> 'QCheck.Iter.t
-  val ( <*> ) :
-    ('-> 'b) QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val ( >>= ) :
-    'QCheck.Iter.t -> ('-> 'QCheck.Iter.t) -> 'QCheck.Iter.t
-  val map : ('-> 'b) -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val map2 :
-    ('-> '-> 'c) ->
-    'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val ( >|= ) : 'QCheck.Iter.t -> ('-> 'b) -> 'QCheck.Iter.t
-  val append : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val ( <+> ) : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val of_list : 'a list -> 'QCheck.Iter.t
-  val of_array : 'a array -> 'QCheck.Iter.t
-  val pair : 'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b) QCheck.Iter.t
-  val triple :
-    'QCheck.Iter.t ->
-    'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b * 'c) QCheck.Iter.t
-  val quad :
-    'QCheck.Iter.t ->
-    'QCheck.Iter.t ->
-    'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b * 'c * 'd) QCheck.Iter.t
-  val find : ('-> bool) -> 'QCheck.Iter.t -> 'a option
-end
\ No newline at end of file diff --git a/docs/0.5.2/type_QCheck.Print.html b/docs/0.5.2/type_QCheck.Print.html deleted file mode 100644 index 57fb7c1e83bf4abb35791d622b0d88768fb07fb9..0000000000000000000000000000000000000000 --- a/docs/0.5.2/type_QCheck.Print.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - -QCheck.Print - - -sig
-  type 'a t = '-> 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 : 'QCheck.Print.t -> 'a option QCheck.Print.t
-  val pair :
-    'QCheck.Print.t -> 'QCheck.Print.t -> ('a * 'b) QCheck.Print.t
-  val triple :
-    'QCheck.Print.t ->
-    'QCheck.Print.t -> 'QCheck.Print.t -> ('a * 'b * 'c) QCheck.Print.t
-  val quad :
-    'QCheck.Print.t ->
-    'QCheck.Print.t ->
-    'QCheck.Print.t ->
-    'QCheck.Print.t -> ('a * 'b * 'c * 'd) QCheck.Print.t
-  val list : 'QCheck.Print.t -> 'a list QCheck.Print.t
-  val array : 'QCheck.Print.t -> 'a array QCheck.Print.t
-  val comap : ('-> 'b) -> 'QCheck.Print.t -> 'QCheck.Print.t
-end
\ No newline at end of file diff --git a/docs/0.5.2/type_QCheck.Shrink.html b/docs/0.5.2/type_QCheck.Shrink.html deleted file mode 100644 index a60967dad7434f1a152e599c47e31f4943967c7a..0000000000000000000000000000000000000000 --- a/docs/0.5.2/type_QCheck.Shrink.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - -QCheck.Shrink - - -sig
-  type 'a t = '-> 'QCheck.Iter.t
-  val nil : 'QCheck.Shrink.t
-  val int : int QCheck.Shrink.t
-  val option : 'QCheck.Shrink.t -> 'a option QCheck.Shrink.t
-  val string : string QCheck.Shrink.t
-  val list : ?shrink:'QCheck.Shrink.t -> 'a list QCheck.Shrink.t
-  val array : ?shrink:'QCheck.Shrink.t -> 'a array QCheck.Shrink.t
-  val pair :
-    'QCheck.Shrink.t -> 'QCheck.Shrink.t -> ('a * 'b) QCheck.Shrink.t
-  val triple :
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t -> ('a * 'b * 'c) QCheck.Shrink.t
-  val quad :
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t -> ('a * 'b * 'c * 'd) QCheck.Shrink.t
-end
\ No newline at end of file diff --git a/docs/0.5.2/type_QCheck.Test.html b/docs/0.5.2/type_QCheck.Test.html deleted file mode 100644 index a45ef391f391e52c22e8e1717ed2b8422d64ca77..0000000000000000000000000000000000000000 --- a/docs/0.5.2/type_QCheck.Test.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - -QCheck.Test - - -sig
-  type 'a cell
-  val make_cell :
-    ?count:int ->
-    ?long_factor:int ->
-    ?max_gen:int ->
-    ?max_fail:int ->
-    ?small:('-> int) ->
-    ?name:string ->
-    'QCheck.arbitrary -> ('-> bool) -> 'QCheck.Test.cell
-  val get_arbitrary : 'QCheck.Test.cell -> 'QCheck.arbitrary
-  val get_law : 'QCheck.Test.cell -> '-> bool
-  val get_name : 'QCheck.Test.cell -> string
-  val set_name : 'QCheck.Test.cell -> string -> unit
-  type t = Test : 'QCheck.Test.cell -> QCheck.Test.t
-  val make :
-    ?count:int ->
-    ?long_factor:int ->
-    ?max_gen:int ->
-    ?max_fail:int ->
-    ?small:('-> int) ->
-    ?name:string -> 'QCheck.arbitrary -> ('-> bool) -> QCheck.Test.t
-  exception Test_fail of string * string list
-  exception Test_error of string * string * exn * string
-  val print_instance : 'QCheck.arbitrary -> '-> string
-  val print_c_ex :
-    'QCheck.arbitrary -> 'QCheck.TestResult.counter_ex -> string
-  val print_fail :
-    'QCheck.arbitrary ->
-    string -> 'QCheck.TestResult.counter_ex list -> string
-  val print_error :
-    ?st:string ->
-    'QCheck.arbitrary ->
-    string -> '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 : 'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit
-  type res = Success | Failure | FalseAssumption | Error of exn * string
-  type 'a step =
-      string -> 'QCheck.Test.cell -> '-> QCheck.Test.res -> unit
-  type 'a callback =
-      string -> 'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit
-  val check_cell :
-    ?long:bool ->
-    ?call:'QCheck.Test.callback ->
-    ?step:'QCheck.Test.step ->
-    ?rand:Random.State.t -> 'QCheck.Test.cell -> 'QCheck.TestResult.t
-  val check_cell_exn :
-    ?long:bool ->
-    ?call:'QCheck.Test.callback ->
-    ?step:'QCheck.Test.step ->
-    ?rand:Random.State.t -> 'QCheck.Test.cell -> unit
-  val check_exn : ?long:bool -> ?rand:Random.State.t -> QCheck.Test.t -> unit
-end
\ No newline at end of file diff --git a/docs/0.5.2/type_QCheck.TestResult.html b/docs/0.5.2/type_QCheck.TestResult.html deleted file mode 100644 index e38494223cd931df3d2327cf1607b5b15a088683..0000000000000000000000000000000000000000 --- a/docs/0.5.2/type_QCheck.TestResult.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - -QCheck.TestResult - - -sig
-  type 'a counter_ex = { instance : 'a; shrink_steps : int; }
-  type 'a failed_state = 'QCheck.TestResult.counter_ex list
-  type 'a state =
-      Success
-    | Failed of 'QCheck.TestResult.failed_state
-    | Error of 'QCheck.TestResult.counter_ex * exn * string
-  type 'a t = {
-    mutable state : 'QCheck.TestResult.state;
-    mutable count : int;
-    mutable count_gen : int;
-    collect_tbl : (string, int) Hashtbl.t lazy_t;
-  }
-end
\ No newline at end of file diff --git a/docs/0.5.2/type_QCheck.html b/docs/0.5.2/type_QCheck.html deleted file mode 100644 index 3ce5451b4852f46e68db605c42563b94f905dece..0000000000000000000000000000000000000000 --- a/docs/0.5.2/type_QCheck.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - -QCheck - - -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 : '-> 'QCheck.Gen.t
-      val ( >>= ) :
-        'QCheck.Gen.t -> ('-> 'QCheck.Gen.t) -> 'QCheck.Gen.t
-      val ( <*> ) :
-        ('-> 'b) QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-      val map : ('-> 'b) -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-      val map2 :
-        ('-> '-> 'c) ->
-        'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-      val map3 :
-        ('-> '-> '-> 'd) ->
-        'QCheck.Gen.t ->
-        'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-      val map_keep_input :
-        ('-> 'b) -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
-      val ( >|= ) : 'QCheck.Gen.t -> ('-> 'b) -> 'QCheck.Gen.t
-      val oneof : 'QCheck.Gen.t list -> 'QCheck.Gen.t
-      val oneofl : 'a list -> 'QCheck.Gen.t
-      val oneofa : 'a array -> 'QCheck.Gen.t
-      val frequency : (int * 'QCheck.Gen.t) list -> 'QCheck.Gen.t
-      val frequencyl : (int * 'a) list -> 'QCheck.Gen.t
-      val frequencya : (int * 'a) array -> '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 small_signed_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 : 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-      val list_size :
-        int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-      val list_repeat : int -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-      val array : 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-      val array_size :
-        int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-      val array_repeat : int -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-      val opt : 'QCheck.Gen.t -> 'a option QCheck.Gen.t
-      val pair : 'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
-      val triple :
-        'QCheck.Gen.t ->
-        'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b * 'c) QCheck.Gen.t
-      val quad :
-        'QCheck.Gen.t ->
-        'QCheck.Gen.t ->
-        'QCheck.Gen.t ->
-        '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 : 'QCheck.Gen.t QCheck.Gen.t -> 'QCheck.Gen.t
-      val sized : 'QCheck.Gen.sized -> 'QCheck.Gen.t
-      val sized_size :
-        int QCheck.Gen.t -> 'QCheck.Gen.sized -> 'QCheck.Gen.t
-      val fix :
-        ('QCheck.Gen.sized -> 'QCheck.Gen.sized) -> 'QCheck.Gen.sized
-      val generate :
-        ?rand:Random.State.t -> n:int -> 'QCheck.Gen.t -> 'a list
-      val generate1 : ?rand:Random.State.t -> 'QCheck.Gen.t -> 'a
-    end
-  module Print :
-    sig
-      type 'a t = '-> 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 : 'QCheck.Print.t -> 'a option QCheck.Print.t
-      val pair :
-        'QCheck.Print.t -> 'QCheck.Print.t -> ('a * 'b) QCheck.Print.t
-      val triple :
-        'QCheck.Print.t ->
-        'QCheck.Print.t ->
-        'QCheck.Print.t -> ('a * 'b * 'c) QCheck.Print.t
-      val quad :
-        'QCheck.Print.t ->
-        'QCheck.Print.t ->
-        'QCheck.Print.t ->
-        'QCheck.Print.t -> ('a * 'b * 'c * 'd) QCheck.Print.t
-      val list : 'QCheck.Print.t -> 'a list QCheck.Print.t
-      val array : 'QCheck.Print.t -> 'a array QCheck.Print.t
-      val comap : ('-> 'b) -> 'QCheck.Print.t -> 'QCheck.Print.t
-    end
-  module Iter :
-    sig
-      type 'a t = ('-> unit) -> unit
-      val empty : 'QCheck.Iter.t
-      val return : '-> 'QCheck.Iter.t
-      val ( <*> ) :
-        ('-> 'b) QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val ( >>= ) :
-        'QCheck.Iter.t -> ('-> 'QCheck.Iter.t) -> 'QCheck.Iter.t
-      val map : ('-> 'b) -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val map2 :
-        ('-> '-> 'c) ->
-        'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val ( >|= ) : 'QCheck.Iter.t -> ('-> 'b) -> 'QCheck.Iter.t
-      val append : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val ( <+> ) : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val of_list : 'a list -> 'QCheck.Iter.t
-      val of_array : 'a array -> 'QCheck.Iter.t
-      val pair :
-        'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b) QCheck.Iter.t
-      val triple :
-        'QCheck.Iter.t ->
-        'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b * 'c) QCheck.Iter.t
-      val quad :
-        'QCheck.Iter.t ->
-        'QCheck.Iter.t ->
-        'QCheck.Iter.t ->
-        'QCheck.Iter.t -> ('a * 'b * 'c * 'd) QCheck.Iter.t
-      val find : ('-> bool) -> 'QCheck.Iter.t -> 'a option
-    end
-  module Shrink :
-    sig
-      type 'a t = '-> 'QCheck.Iter.t
-      val nil : 'QCheck.Shrink.t
-      val int : int QCheck.Shrink.t
-      val option : 'QCheck.Shrink.t -> 'a option QCheck.Shrink.t
-      val string : string QCheck.Shrink.t
-      val list : ?shrink:'QCheck.Shrink.t -> 'a list QCheck.Shrink.t
-      val array : ?shrink:'QCheck.Shrink.t -> 'a array QCheck.Shrink.t
-      val pair :
-        'QCheck.Shrink.t -> 'QCheck.Shrink.t -> ('a * 'b) QCheck.Shrink.t
-      val triple :
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t -> ('a * 'b * 'c) QCheck.Shrink.t
-      val quad :
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t -> ('a * 'b * 'c * 'd) QCheck.Shrink.t
-    end
-  type 'a arbitrary = {
-    gen : 'QCheck.Gen.t;
-    print : ('-> string) option;
-    small : ('-> int) option;
-    shrink : 'QCheck.Shrink.t option;
-    collect : ('-> string) option;
-  }
-  val make :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) ->
-    ?shrink:'QCheck.Shrink.t ->
-    ?collect:('-> string) -> 'QCheck.Gen.t -> 'QCheck.arbitrary
-  val set_print :
-    'QCheck.Print.t -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val set_small : ('-> int) -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val set_shrink :
-    'QCheck.Shrink.t -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val set_collect :
-    ('-> string) -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  module TestResult :
-    sig
-      type 'a counter_ex = { instance : 'a; shrink_steps : int; }
-      type 'a failed_state = 'QCheck.TestResult.counter_ex list
-      type 'a state =
-          Success
-        | Failed of 'QCheck.TestResult.failed_state
-        | Error of 'QCheck.TestResult.counter_ex * exn * string
-      type 'a t = {
-        mutable state : '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 ->
-        ?long_factor:int ->
-        ?max_gen:int ->
-        ?max_fail:int ->
-        ?small:('-> int) ->
-        ?name:string ->
-        'QCheck.arbitrary -> ('-> bool) -> 'QCheck.Test.cell
-      val get_arbitrary : 'QCheck.Test.cell -> 'QCheck.arbitrary
-      val get_law : 'QCheck.Test.cell -> '-> bool
-      val get_name : 'QCheck.Test.cell -> string
-      val set_name : 'QCheck.Test.cell -> string -> unit
-      type t = Test : 'QCheck.Test.cell -> QCheck.Test.t
-      val make :
-        ?count:int ->
-        ?long_factor:int ->
-        ?max_gen:int ->
-        ?max_fail:int ->
-        ?small:('-> int) ->
-        ?name:string -> 'QCheck.arbitrary -> ('-> bool) -> QCheck.Test.t
-      exception Test_fail of string * string list
-      exception Test_error of string * string * exn * string
-      val print_instance : 'QCheck.arbitrary -> '-> string
-      val print_c_ex :
-        'QCheck.arbitrary -> 'QCheck.TestResult.counter_ex -> string
-      val print_fail :
-        'QCheck.arbitrary ->
-        string -> 'QCheck.TestResult.counter_ex list -> string
-      val print_error :
-        ?st:string ->
-        'QCheck.arbitrary ->
-        string -> '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 :
-        'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit
-      type res = Success | Failure | FalseAssumption | Error of exn * string
-      type 'a step =
-          string -> 'QCheck.Test.cell -> '-> QCheck.Test.res -> unit
-      type 'a callback =
-          string -> 'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit
-      val check_cell :
-        ?long:bool ->
-        ?call:'QCheck.Test.callback ->
-        ?step:'QCheck.Test.step ->
-        ?rand:Random.State.t -> 'QCheck.Test.cell -> 'QCheck.TestResult.t
-      val check_cell_exn :
-        ?long:bool ->
-        ?call:'QCheck.Test.callback ->
-        ?step:'QCheck.Test.step ->
-        ?rand:Random.State.t -> 'QCheck.Test.cell -> unit
-      val check_exn :
-        ?long:bool -> ?rand:Random.State.t -> QCheck.Test.t -> unit
-    end
-  val choose : 'QCheck.arbitrary list -> '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 small_signed_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 : 'QCheck.arbitrary -> 'a list QCheck.arbitrary
-  val list_of_size :
-    int QCheck.Gen.t -> 'QCheck.arbitrary -> 'a list QCheck.arbitrary
-  val array : 'QCheck.arbitrary -> 'a array QCheck.arbitrary
-  val array_of_size :
-    int QCheck.Gen.t -> 'QCheck.arbitrary -> 'a array QCheck.arbitrary
-  val pair :
-    'QCheck.arbitrary -> 'QCheck.arbitrary -> ('a * 'b) QCheck.arbitrary
-  val triple :
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary -> ('a * 'b * 'c) QCheck.arbitrary
-  val quad :
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary -> ('a * 'b * 'c * 'd) QCheck.arbitrary
-  val option : 'QCheck.arbitrary -> 'a option QCheck.arbitrary
-  val fun1 :
-    'QCheck.arbitrary -> 'QCheck.arbitrary -> ('-> 'b) QCheck.arbitrary
-  val fun2 :
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary -> ('-> '-> 'c) QCheck.arbitrary
-  val oneofl :
-    ?print:'QCheck.Print.t ->
-    ?collect:('-> string) -> 'a list -> 'QCheck.arbitrary
-  val oneofa :
-    ?print:'QCheck.Print.t ->
-    ?collect:('-> string) -> 'a array -> 'QCheck.arbitrary
-  val oneof : 'QCheck.arbitrary list -> 'QCheck.arbitrary
-  val always : ?print:'QCheck.Print.t -> '-> 'QCheck.arbitrary
-  val frequency :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) ->
-    ?shrink:'QCheck.Shrink.t ->
-    ?collect:('-> string) ->
-    (int * 'QCheck.arbitrary) list -> 'QCheck.arbitrary
-  val frequencyl :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) -> (int * 'a) list -> 'QCheck.arbitrary
-  val frequencya :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) -> (int * 'a) array -> 'QCheck.arbitrary
-  val map :
-    ?rev:('-> 'a) ->
-    ('-> 'b) -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val map_same_type :
-    ('-> 'a) -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val map_keep_input :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) ->
-    ('-> 'b) -> 'QCheck.arbitrary -> ('a * 'b) QCheck.arbitrary
-end
\ No newline at end of file diff --git a/docs/0.5.2/type_QCheck_runner.html b/docs/0.5.2/type_QCheck_runner.html deleted file mode 100644 index 0c9d74c217f8f8371c5354adeafae42f91957919..0000000000000000000000000000000000000000 --- a/docs/0.5.2/type_QCheck_runner.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - -QCheck_runner - - -sig
-  val random_state : unit -> Random.State.t
-  val verbose : unit -> bool
-  val long_tests : unit -> bool
-  val set_seed : int -> unit
-  val set_verbose : bool -> unit
-  val set_long_tests : bool -> unit
-  val to_ounit_test :
-    ?verbose:bool ->
-    ?long:bool -> ?rand:Random.State.t -> QCheck.Test.t -> OUnit.test
-  val to_ounit_test_cell :
-    ?verbose:bool ->
-    ?long:bool -> ?rand:Random.State.t -> 'QCheck.Test.cell -> OUnit.test
-  val ( >::: ) : string -> QCheck.Test.t list -> OUnit.test
-  val to_ounit2_test : ?rand:Random.State.t -> QCheck.Test.t -> OUnit2.test
-  val to_ounit2_test_list :
-    ?rand:Random.State.t -> QCheck.Test.t list -> OUnit2.test list
-  val run : ?argv:string array -> OUnit.test -> int
-  val run_tap : OUnit.test -> OUnit.test_results
-  val run_tests :
-    ?verbose:bool ->
-    ?long:bool ->
-    ?out:Pervasives.out_channel ->
-    ?rand:Random.State.t -> QCheck.Test.t list -> int
-  val run_tests_main : ?argv:string array -> QCheck.Test.t list -> 'a
-end
\ No newline at end of file diff --git a/docs/0.5.3/QCheck.Gen.html b/docs/0.5.3/QCheck.Gen.html deleted file mode 100644 index 2f8cd16a5ff1d6a93abddb54bc05fb8e378e8952..0000000000000000000000000000000000000000 --- a/docs/0.5.3/QCheck.Gen.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - - - - - -QCheck.Gen - - - -

Module QCheck.Gen

- -
module Gen: sig .. end
-

Generate Random Values


-
-
- -
type 'a t = Random.State.t -> 'a 
-
-A random generator for values of type 'a
-
- - -
type 'a sized = int -> Random.State.t -> 'a 
-
-Random generator with a size bound
-
- - -
val return : 'a -> 'a t
-Create a constant generator
-
- -
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
-Monadic bind for writing dependent generators. First generates an 'a and then - passes it to the given function, to generate a 'b.
-
- -
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
-Infix operator for composing a function generator and an argument generator - into a result generator
-
- -
val map : ('a -> 'b) -> 'a t -> 'b t
-map f g transforms a generator g by applying f to each generated element
-
- -
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
-map f g1 g2 transforms two generators g1 and g2 by applying f to each - pair of generated elements
-
- -
val map3 : ('a -> 'b -> 'c -> 'd) ->
'a t -> 'b t -> 'c t -> 'd t
-map f g1 g2 g3 transforms two generators g1, g2, and g3 by applying f - to each triple of generated elements
-
- -
val map_keep_input : ('a -> 'b) -> 'a t -> ('a * 'b) t
-map f g transforms a generator g by applying f to each generated element. - Returns both the generated elememt from g and the output from f.
-
- -
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
-An infix synonym for QCheck.Gen.map
-
- -
val oneof : 'a t list -> 'a t
-Constructs a generator that selects among a given list of generators
-
- -
val oneofl : 'a list -> 'a t
-Constructs a generator that selects among a given list of values
-
- -
val oneofa : 'a array -> 'a t
-Constructs a generator that selects among a given array of values
-
- -
val frequency : (int * 'a t) list -> 'a t
-Constructs a generator that selects among a given list of generators. - Each of the given generators are chosen based on a positive integer weight.
-
- -
val frequencyl : (int * 'a) list -> 'a t
-Constructs a generator that selects among a given list of values. - Each of the given values are chosen based on a positive integer weight.
-
- -
val frequencya : (int * 'a) array -> 'a t
-Constructs a generator that selects among a given array of values. - Each of the array entries are chosen based on a positive integer weight.
-
- -
val shuffle_a : 'a array -> unit t
-Shuffle the array in place
-
- -
val shuffle_l : 'a list -> 'a list t
-Creates a generator of shuffled lists
-
- -
val unit : unit t
-The unit generator
-
- -
val bool : bool t
-The Boolean generator
-
- -
val float : float t
-Generates floating point numbers
-
- -
val pfloat : float t
-Generates positive floating point numbers
-
- -
val nfloat : float t
-Generates negative floating point numbers
-
- -
val nat : int t
-Generates small natural numbers
-
- -
val neg_int : int t
-Generates negative integers
-
- -
val pint : int t
-Generates positive integers uniformly
-
- -
val int : int t
-Generates integers uniformly
-
- -
val small_nat : int t
-Synonym to QCheck.Gen.nat
-Since 0.5.1
-
- -
val small_int : int t
-Deprecated.use QCheck.Gen.small_nat
-Small UNSIGNED integers, for retrocompatibility
-
- -
val small_signed_int : int t
-small SIGNED integers
-Since 0.5.2
-
- -
val int_bound : int -> int t
-Uniform integer generator producing integers within 0... bound.
-Raises Invalid_argument if the bound is too high (typically 2^30)
-
- -
val int_range : int -> int -> int t
-Uniform integer generator producing integers within low,high
-Raises Invalid_argument if the range is too large (typically 2^30)
-
- -
val (--) : int -> int -> int t
-Synonym to QCheck.Gen.int_range
-
- -
val ui32 : int32 t
-Generates (unsigned) int32 values
-
- -
val ui64 : int64 t
-Generates (unsigned) int64 values
-
- -
val list : 'a t -> 'a list t
-Builds a list generator from an element generator. List size is generated by QCheck.Gen.nat
-
- -
val list_size : int t -> 'a t -> 'a list t
-Builds a list generator from a (non-negative) size generator and an element generator
-
- -
val list_repeat : int -> 'a t -> 'a list t
-list_repeat i g builds a list generator from exactly i elements generated by g
-
- -
val array : 'a t -> 'a array t
-Builds an array generator from an element generator. Array size is generated by QCheck.Gen.nat
-
- -
val array_size : int t -> 'a t -> 'a array t
-Builds an array generator from a (non-negative) size generator and an element generator
-
- -
val array_repeat : int -> 'a t -> 'a array t
-array_repeat i g builds an array generator from exactly i elements generated by g
-
- -
val opt : 'a t -> 'a option t
-An option generator
-
- -
val pair : 'a t -> 'b t -> ('a * 'b) t
-Generates pairs
-
- -
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-Generates triples
-
- -
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-Generates quadruples
-Since 0.5.1
-
- -
val char : char t
-Generates characters upto character code 255
-
- -
val printable : char t
-Generates printable characters
-
- -
val numeral : char t
-Generates numeral characters
-
- -
val string_size : ?gen:char t -> int t -> string t
-Builds a string generator from a (non-negative) size generator. - Accepts an optional character generator (the default is QCheck.Gen.char)
-
- -
val string : ?gen:char t -> string t
-Builds a string generator. String size is generated by QCheck.Gen.nat. - Accepts an optional character generator (the default is QCheck.Gen.char)
-
- -
val small_string : ?gen:char t -> string t
-Builds a string generator. String size is in the range 0--10. - Accepts an optional character generator (the default is QCheck.Gen.char)
-
- -
val small_list : 'a t -> 'a list t
-Generates lists of small size (range 0 -- 10).
-Since 0.5.3
-
- -
val join : 'a t t -> 'a t
-Collapses a generator of generators to simply a generator.
-Since 0.5
-
- -
val sized : 'a sized -> 'a t
-Create a generator from a size-bounded generator by first - generating a size using QCheck.Gen.nat and passing the result to the size-bounded generator
-
- -
val sized_size : int t -> 'a sized -> 'a t
-Create a generator from a size-bounded generator by first - generating a size using the integer generator and passing the result - to the size-bounded generator
-Since 0.5
-
- -
val fix : ('a sized -> 'a sized) -> 'a sized
-Fixpoint combinator for generating recursive, size-bounded data types. - The passed size-parameter should decrease to ensure termination.
-
-
-Example: -
  type tree = Leaf of int | Node of tree * tree
-
-  let leaf x = Leaf x
-  let node x y = Node (x,y)
-
-  let g = QCheck.Gen.(sized @@ fix
-    (fun self n -> match n with
-      | 0 -> map leaf nat
-      | n ->
-        frequency
-          [1, map leaf nat;
-           2, map2 node (self (n/2)) (self (n/2))]
-      ))
-
-  

- -
val generate : ?rand:Random.State.t -> n:int -> 'a t -> 'a list
-generate ~n g generates n instances of g
-
- -
val generate1 : ?rand:Random.State.t -> 'a t -> 'a
-generate1 g generates one instance of g
-
- \ No newline at end of file diff --git a/docs/0.5.3/QCheck.Iter.html b/docs/0.5.3/QCheck.Iter.html deleted file mode 100644 index 56ca27027a52d77da3f948a0e3455ba090594dde..0000000000000000000000000000000000000000 --- a/docs/0.5.3/QCheck.Iter.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Iter - - - -

Module QCheck.Iter

- -
module Iter: sig .. end
-

Iterators

-

- - Compatible with the library "sequence". An iterator i is simply - a function that accepts another function f (of type 'a -> unit) - and calls f on a sequence of elements f x1; f x2; ...; f xn.
-

-
- -
type 'a t = ('a -> unit) -> unit 
- - -
val empty : 'a t
-
val return : 'a -> 'a t
-
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
-
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
-
val map : ('a -> 'b) -> 'a t -> 'b t
-
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
-
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
-
val append : 'a t -> 'a t -> 'a t
-
val (<+>) : 'a t -> 'a t -> 'a t
-Synonym to QCheck.Iter.append
-
- -
val of_list : 'a list -> 'a t
-
val of_array : 'a array -> 'a t
-
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-
val find : ('a -> bool) -> 'a t -> 'a option
\ No newline at end of file diff --git a/docs/0.5.3/QCheck.Print.html b/docs/0.5.3/QCheck.Print.html deleted file mode 100644 index a642df060550c79ca818eceaef99403bdb4ae444..0000000000000000000000000000000000000000 --- a/docs/0.5.3/QCheck.Print.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Print - - - -

Module QCheck.Print

- -
module Print: sig .. end
-

Show Values


-
-
- -
type 'a t = 'a -> string 
-
-Printer for values of type 'a
-
- - -
val int : int t
-Integer printer
-
- -
val bool : bool t
-Boolean printer
-
- -
val float : float t
-Floating point number printer
-
- -
val char : char t
-Character printer
-
- -
val string : string t
-String printer
-
- -
val option : 'a t -> 'a option t
-Option printer
-
- -
val pair : 'a t -> 'b t -> ('a * 'b) t
-Pair printer. Expects printers for each component
-
- -
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-Triple (3-tuple) printer. Expects printers for each component
-
- -
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-Quadruple (4-tuple) printer. Expects printers for each component
-
- -
val list : 'a t -> 'a list t
-List printer. Expects a printer for the list element type
-
- -
val array : 'a t -> 'a array t
-Array printer. Expects a printer for the array entry type
-
- -
val comap : ('a -> 'b) -> 'b t -> 'a t
-comap f p maps p, a printer of type 'b, to a printer of type 'a by - first converting a printed value using f : 'a -> 'b.
-
- \ No newline at end of file diff --git a/docs/0.5.3/QCheck.Shrink.html b/docs/0.5.3/QCheck.Shrink.html deleted file mode 100644 index 63224501b70a1fcb377094547147b46181ce042b..0000000000000000000000000000000000000000 --- a/docs/0.5.3/QCheck.Shrink.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Shrink - - - -

Module QCheck.Shrink

- -
module Shrink: sig .. end
-

Shrink Values

-

- - Shrinking is used to reduce the size of a counter-example. It tries - to make the counter-example smaller by decreasing it, or removing - elements, until the property to test holds again; then it returns the - smallest value that still made the test fail
-

-
- -
type 'a t = 'a -> 'a QCheck.Iter.t 
-
-Given a counter-example, return an iterator on smaller versions - of the counter-example
-
- - -
val nil : 'a t
-No shrink
-
- -
val int : int t
-
val option : 'a t -> 'a option t
-
val string : string t
-
val list : ?shrink:'a t -> 'a list t
-Try to shrink lists by removing elements one by one.
-
-
shrink : if provided, will be used to also try to reduce - the elements of the list themselves (e.g. in an int list - one can try to decrease the integers)
- -
val array : ?shrink:'a t -> 'a array t
-Shrink an array.
-
-
shrink : see QCheck.Shrink.list
- -
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t ->
'd t -> ('a * 'b * 'c * 'd) t
\ No newline at end of file diff --git a/docs/0.5.3/QCheck.Test.html b/docs/0.5.3/QCheck.Test.html deleted file mode 100644 index 90cb3e3e2169b12b1030dbe952f66a7809b42b42..0000000000000000000000000000000000000000 --- a/docs/0.5.3/QCheck.Test.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Test - - - -

Module QCheck.Test

- -
module Test: sig .. end

- -
type 'a cell 
-
-A single property test
-
- - -
val make_cell : ?count:int ->
?long_factor:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string -> 'a QCheck.arbitrary -> ('a -> bool) -> 'a cell
-make arb prop builds a test that checks property prop on instances - of the generator arb.
-
-
count : number of test cases to run, counting only - the test cases which satisfy preconditions.
-
long_factor : the factor by which to multiply count, max_gen and - max_fail when running a long test (default: 1)
-
max_gen : maximum number of times the generation function - is called in total to replace inputs that do not satisfy - preconditions (should be >= count)
-
max_fail : maximum number of failures before we stop generating - inputs. This is useful if shrinking takes too much time.
-
small : kept for compatibility reasons; if provided, replaces - the field arbitrary.small. - If there is no shrinking function but there is a small - function, only the smallest failures will be printed.
-
name : the name of the test
- -
val get_arbitrary : 'a cell -> 'a QCheck.arbitrary
-
val get_law : 'a cell -> 'a -> bool
-
val get_name : 'a cell -> string
-
val set_name : 'a cell -> string -> unit
-
val get_count : 'a cell -> int
-Get the count of a cell
-Since 0.5.3
-
- -
val get_long_factor : 'a cell -> int
-Get the long factor of a cell
-Since 0.5.3
-
- -
type t = 
- - - - -
-| -Test : 'a cell -> t(*
-Same as 'a cell, but masking the type parameter. This allows to - put tests on different types in the same list of tests.
-
-
*)
- - - -
val make : ?count:int ->
?long_factor:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string -> 'a QCheck.arbitrary -> ('a -> bool) -> t
-make arb prop builds a test that checks property prop on instances - of the generator arb. - See QCheck.Test.make_cell for a description of the parameters.
-
-
-
Running the test

- -
exception Test_fail of string * string list
-
-Exception raised when a test failed, with the list of counter-examples. - Test_fail (name, l) means test name failed on elements of l
-
- -
exception Test_error of string * string * exn * string
-
-Exception raised when a test raised an exception e, with - the sample that triggered the exception. - Test_error (name, i, e, st) - means name failed on i with exception e, and st is the - stacktrace (if enabled) or an empty 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 cell -> 'a QCheck.TestResult.t -> unit
-check_result cell res checks that res is Ok _, and returns unit. - Otherwise, it raises some exception
-Raises -
- -
type res = 
- - - - - - - - - - - - - - - - - - - -
-| -Success
-| -Failure
-| -FalseAssumption
-| -Error of exn * string
- - - -
type 'a step = string -> 'a cell -> 'a -> res -> unit 
-
-Callback executed after each instance of a test has been run. - The callback is given the instance tested, and the current results - of the test.
-
- - -
type 'a callback = string -> 'a cell -> 'a QCheck.TestResult.t -> unit 
-
-Callback executed after each test has been run. - f name cell res means test cell, named name, gave res
-
- - -
val check_cell : ?long:bool ->
?call:'a callback ->
?step:'a step ->
?rand:Random.State.t -> 'a cell -> 'a QCheck.TestResult.t
-check ~long ~rand test generates up to count random - values of type 'a using arbitrary and the random state st. The - predicate law is called on them and if it returns false or raises an - exception then we have a counter example for the law.
-Returns the result of the test
-
-
long : if true then multiply the number of instances to generate - by the cell's long_factor
-
call : function called on each test case, with the result
-
step : function called on each instance of the test case, with the result
- -
val check_cell_exn : ?long:bool ->
?call:'a callback ->
?step:'a step ->
?rand:Random.State.t -> 'a cell -> unit
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
-Raises -
- -
val check_exn : ?long:bool -> ?rand:Random.State.t -> t -> unit
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
-Raises -
- \ No newline at end of file diff --git a/docs/0.5.3/QCheck.TestResult.html b/docs/0.5.3/QCheck.TestResult.html deleted file mode 100644 index c204a9c8e5dffd939fac86291cdb0ed2da4b4181..0000000000000000000000000000000000000000 --- a/docs/0.5.3/QCheck.TestResult.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.TestResult - - - -

Module QCheck.TestResult

- -
module TestResult: sig .. end
-Result of running a test
-
-
- -
type 'a counter_ex = {
- - - - - - - - - -
-   -instance : 'a;(*
-The counter-example(s)
-
-
*)
-   -shrink_steps : int;(*
-How many shrinking steps for this counterex
-
-
*)
-} - - - -
type 'a failed_state = 'a counter_ex list 
- - -
type 'a state = 
- - - - - - - - - - - - - - -
-| -Success
-| -Failed of 'a failed_state(*
-Failed instances
-
-
*)
-| -Error of 'a counter_ex * exn * string(*
-Error, backtrace, and instance - that triggered it
-
-
*)
- - - -
type 'a t = {
- - - - - - - - - - - - - - - - - - - -
-   -mutable state : 'a state;
-   -mutable count : int;
-   -mutable count_gen : int;
-   -collect_tbl : (string, int) Hashtbl.t lazy_t;
-} - - - \ No newline at end of file diff --git a/docs/0.5.3/QCheck.html b/docs/0.5.3/QCheck.html deleted file mode 100644 index e5dae5df831fe674be9aca41bd1f78c280e2bd40..0000000000000000000000000000000000000000 --- a/docs/0.5.3/QCheck.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - - - - - - - - - - - -QCheck - - - -

Module QCheck

- -
module QCheck: sig .. end
-

Quickcheck inspired property-based testing


-
-
-
-The library takes inspiration from Haskell's QuickCheck library. The -rough idea is that the programer describes invariants that values of -a certain type need to satisfy ("properties"), as functions from this type -to bool. She also needs to desribe how to generate random values of the type, -so that the property is tried and checked on a number of random instances. -

- -This explains the organization of this module: -

-

- - -Examples: -

-

- -
let test =
-  QCheck.(Test.make ~count:1000
-   (list int) (fun l -> List.rev (List.rev l) = l));;
-
-QCheck.Test.check_exn test;;
-
-

-

- -
let test = QCheck.(
-  Test.make
-    ~count:10_000 ~max_fail:3
-    (list small_nat)
-    (fun l -> l = List.sort compare l));;
-QCheck.Test.check_exn test;;
-
-

-

- -
type tree = Leaf of int | Node of tree * tree
-
-let leaf x = Leaf x
-let node x y = Node (x,y)
-
-let g = QCheck.Gen.(sized @@ fix
-  (fun self n -> match n with
-    | 0 -> map leaf nat
-    | n ->
-      frequency
-        [1, map leaf nat;
-         2, map2 node (self (n/2)) (self (n/2))]
-    ))
-
-Gen.generate ~n:20 g;;
-
-

- -More complex and powerful combinators can be found in Gabriel Scherer's -Generator module. Its documentation can be found - here.
- -

val (==>) : bool -> bool -> bool
-b1 ==> b2 is the logical implication b1 => b2 - ie not b1 || b2 (except that it is strict and will interact - better with QCheck.Test.check_exn and the likes, because they will know - the precondition was not satisfied.). -

- - WARNING: this function should only be used in a property - (see QCheck.Test.make), because it raises a special exception in case of - failure of the first argument, to distinguish between failed test - and failed precondition. Because of OCaml's evaluation order, - both b1 and b2 are always evaluated; if b2 should only be - evaluated when b1 holds, see QCheck.assume.
-

- -
val assume : bool -> unit
-assume cond checks the precondition cond, and does nothing - if cond=true. If cond=false, it interrupts the current test. -

- - WARNING This function, like QCheck.(==>), should only be used in - a test. not outside. - Example: -

      Test.make (list int) (fun l ->
-        assume (l <> []);
-        List.hd l :: List.tl l = l)
-    

-Since 0.5.1
-
- -
val assume_fail : unit -> 'a
-assume_fail () is like assume false, but can take any type - since we know it always fails (like assert false). - This is useful to ignore some branches in if or match. -

- - Example: -

      Test.make (list int) (function
-        | [] -> assume_fail ()
-        | _::_ as l -> List.hd l :: List.tl l = l)
-    

-Since 0.5.1
-
- -
module Gen: sig .. end
-Generate Random Values -
-
-

Pretty printing


- -
module Print: sig .. end
-Show Values -
- -
module Iter: sig .. end
-Iterators -
- -
module Shrink: sig .. end
-Shrink Values -
-
-

Arbitrary

-

- - A value of type 'a arbitrary glues together a random generator, - and optional functions for shrinking, printing, computing the size, - etc. It is the "normal" way of describing how to generate - values of a given type, to be then used in tests (see QCheck.Test)
- -

type 'a arbitrary = {
- - - - - - - - - - - - - - - - - - - - - - - - -
-   -gen : 'a Gen.t;
-   -print : ('a -> string) option;(*
-print values
-
-
*)
-   -small : ('a -> int) option;(*
-size of example
-
-
*)
-   -shrink : 'a Shrink.t option;(*
-shrink to smaller examples
-
-
*)
-   -collect : ('a -> string) option;(*
-map value to tag, and group by tag
-
-
*)
-} - -
-a value of type 'a arbitrary is an object with a method for generating random - values of type 'a, and additional methods to compute the size of values, - print them, and possibly shrink them into smaller counterexamples -

- - NOTE the collect field is unstable and might be removed, or - moved into QCheck.Test.
-

- - -
val make : ?print:'a Print.t ->
?small:('a -> int) ->
?shrink:'a Shrink.t ->
?collect:('a -> string) -> 'a Gen.t -> 'a arbitrary
-Builder for arbitrary. Default is to only have a generator, but other - arguments can be added
-
- -
val set_print : 'a Print.t -> 'a arbitrary -> 'a arbitrary
-
val set_small : ('a -> int) -> 'a arbitrary -> 'a arbitrary
-
val set_shrink : 'a Shrink.t -> 'a arbitrary -> 'a arbitrary
-
val set_collect : ('a -> string) -> 'a arbitrary -> 'a arbitrary

-

Tests

-

- - A test is a universal property of type foo -> bool for some type foo, - with an object of type foo arbitrary used to generate, print, etc. values - of type foo. -

- - See QCheck.Test.make to build a test, and QCheck.Test.check_exn to - run one test simply. - For more serious testing, it is better to create a testsuite - and use QCheck_runner.
- -

module TestResult: sig .. end
-Result of running a test -
- -
module Test: sig .. end

-

Combinators for QCheck.arbitrary


- -
val choose : 'a arbitrary list -> 'a arbitrary
-Choose among the given list of generators. The list must not - be empty; if it is Invalid_argument is raised.
-
- -
val unit : unit arbitrary
-always generates (), obviously.
-
- -
val bool : bool arbitrary
-uniform boolean generator
-
- -
val float : float arbitrary
-generates regular floats (no nan and no infinities)
-
- -
val pos_float : float arbitrary
-positive float generator (no nan and no infinities)
-
- -
val neg_float : float arbitrary
-negative float generator (no nan and no infinities)
-
- -
val int : int arbitrary
-int generator. Uniformly distributed
-
- -
val int_bound : int -> int arbitrary
-int_bound n is uniform between 0 and n included
-
- -
val int_range : int -> int -> int arbitrary
-int_range a b is uniform between a and b included. b must be - larger than a.
-
- -
val small_nat : int arbitrary
-Small unsigned integers
-Since 0.5.1
-
- -
val small_int : int arbitrary
-Deprecated.use QCheck.small_signed_int
-Small unsigned integers. See QCheck.Gen.small_int.
-
- -
val small_signed_int : int arbitrary
-Small signed integers
-Since 0.5.2
-
- -
val (--) : int -> int -> int arbitrary
-Synonym to QCheck.int_range
-
- -
val int32 : int32 arbitrary
-int32 generator. Uniformly distributed
-
- -
val int64 : int64 arbitrary
-int generator. Uniformly distributed
-
- -
val pos_int : int arbitrary
-positive int generator. Uniformly distributed
-
- -
val small_int_corners : unit -> int arbitrary
-As small_int, but each newly created generator starts with - a list of corner cases before falling back on random generation.
-
- -
val neg_int : int arbitrary
-negative int generator. The distribution is similar to that of - small_int, not of pos_int.
-
- -
val char : char arbitrary
-Uniformly distributed on all the chars (not just ascii or - valid latin-1)
-
- -
val printable_char : char arbitrary
-uniformly distributed over a subset of chars
-
- -
val numeral_char : char arbitrary
-uniformy distributed over '0'..'9'
-
- -
val string_gen_of_size : int Gen.t -> char Gen.t -> string arbitrary
-
val string_gen : char Gen.t -> string arbitrary
-generates strings with a distribution of length of small_nat
-
- -
val string : string arbitrary
-generates strings with a distribution of length of small_nat - and distribution of characters of char
-
- -
val small_string : string arbitrary
-Same as QCheck.string but with a small length (that is, 0--10)
-
- -
val small_list : 'a arbitrary -> 'a list arbitrary
-Generates lists of small size (range 0 -- 10).
-Since 0.5.3
-
- -
val string_of_size : int Gen.t -> string arbitrary
-generates strings with distribution of characters if char
-
- -
val printable_string : string arbitrary
-generates strings with a distribution of length of small_nat - and distribution of characters of printable_char
-
- -
val printable_string_of_size : int Gen.t -> string arbitrary
-generates strings with distribution of characters of printable_char
-
- -
val small_printable_string : string arbitrary
-
val numeral_string : string arbitrary
-generates strings with a distribution of length of small_nat - and distribution of characters of numeral_char
-
- -
val numeral_string_of_size : int Gen.t -> string arbitrary
-generates strings with a distribution of characters of numeral_char
-
- -
val list : 'a arbitrary -> 'a list arbitrary
-generates lists with length generated by small_nat
-
- -
val list_of_size : int Gen.t -> 'a arbitrary -> 'a list arbitrary
-generates lists with length from the given distribution
-
- -
val array : 'a arbitrary -> 'a array arbitrary
-generates arrays with length generated by small_nat
-
- -
val array_of_size : int Gen.t -> 'a arbitrary -> 'a array arbitrary
-generates arrays with length from the given distribution
-
- -
val pair : 'a arbitrary -> 'b arbitrary -> ('a * 'b) arbitrary
-combines two generators into a generator of pairs
-
- -
val triple : 'a arbitrary ->
'b arbitrary -> 'c arbitrary -> ('a * 'b * 'c) arbitrary
-combines three generators into a generator of 3-tuples
-
- -
val quad : 'a arbitrary ->
'b arbitrary ->
'c arbitrary ->
'd arbitrary -> ('a * 'b * 'c * 'd) arbitrary
-combines four generators into a generator of 4-tuples
-
- -
val option : 'a arbitrary -> 'a option arbitrary
-choose between returning Some random value, or None
-
- -
val fun1 : 'a arbitrary -> 'b arbitrary -> ('a -> 'b) arbitrary
-generator of functions of arity 1. - The functions are always pure and total functions: -
-
- -
val fun2 : 'a arbitrary ->
'b arbitrary ->
'c arbitrary -> ('a -> 'b -> 'c) arbitrary
-generator of functions of arity 2. The remark about fun1 also apply - here.
-
- -
val oneofl : ?print:'a Print.t ->
?collect:('a -> string) -> 'a list -> 'a arbitrary
-Pick an element randomly in the list
-
- -
val oneofa : ?print:'a Print.t ->
?collect:('a -> string) -> 'a array -> 'a arbitrary
-Pick an element randomly in the array
-
- -
val oneof : 'a arbitrary list -> 'a arbitrary
-Pick a generator among the list, randomly
-
- -
val always : ?print:'a Print.t -> 'a -> 'a arbitrary
-Always return the same element
-
- -
val frequency : ?print:'a Print.t ->
?small:('a -> int) ->
?shrink:'a Shrink.t ->
?collect:('a -> string) ->
(int * 'a arbitrary) list -> 'a arbitrary
-Similar to QCheck.oneof but with frequencies
-
- -
val frequencyl : ?print:'a Print.t ->
?small:('a -> int) -> (int * 'a) list -> 'a arbitrary
-Same as QCheck.oneofl, but each element is paired with its frequency in - the probability distribution (the higher, the more likely)
-
- -
val frequencya : ?print:'a Print.t ->
?small:('a -> int) -> (int * 'a) array -> 'a arbitrary
-Same as QCheck.frequencyl, but with an array
-
- -
val map : ?rev:('b -> 'a) -> ('a -> 'b) -> 'a arbitrary -> 'b arbitrary
-map f a returns a new arbitrary instance that generates values using - a#gen and then transforms them through f.
-
-
rev : if provided, maps values back to type 'a so that the printer, - shrinker, etc. of a can be used. We assume f is monotonic in - this case (that is, smaller inputs are transformed into smaller outputs).
- -
val map_same_type : ('a -> 'a) -> 'a arbitrary -> 'a arbitrary
-Specialization of map when the transformation preserves the type, which - makes shrinker, printer, etc. still relevant
-
- -
val map_keep_input : ?print:'b Print.t ->
?small:('b -> int) ->
('a -> 'b) -> 'a arbitrary -> ('a * 'b) arbitrary
-map_keep_input f a generates random values from a, and maps them into - values of type 'b using the function f, but it also keeps the - original value. - For shrinking, it is assumed that f is monotonic and that smaller input - values will map into smaller values
-
-
print : optional printer for the f's output
- \ No newline at end of file diff --git a/docs/0.5.3/QCheck_runner.html b/docs/0.5.3/QCheck_runner.html deleted file mode 100644 index d9a8a9b4dfd886d2d6ddd8e097b34dd221bda44b..0000000000000000000000000000000000000000 --- a/docs/0.5.3/QCheck_runner.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - -QCheck_runner - - - -

Module QCheck_runner

- -
module QCheck_runner: sig .. end
-

Runners for Tests

-

- - Once you built some tests using QCheck.Test.make, you need to - run the tests. This module contains several runners, - which are designed to run every test and report the result. -

- - By default, you can use QCheck_runner.run_tests in a test program as follows: -

      let testsuite = [
-        Test.make ...;
-        Test.make ...;
-      ]
-
-      let () =
-        let errcode = QCheck_runners.run_tests ~verbose:true testsuite in
-        exit errcode
-    
- which will run the tests, and exit the program. The error code - will be 0 if all tests pass, 1 otherwise. -

- - QCheck_runner.run_tests_main can be used as a shortcut for that, also - featuring command-line parsing (using Arg) to activate - verbose mode and others.
-

-
-
-

State


- -
val random_state : unit -> Random.State.t
-Access the current random state
-
- -
val verbose : unit -> bool
-Is the default mode verbose or quiet?
-
- -
val long_tests : unit -> bool
-Is the default mode to run long tests or nor?
-
- -
val set_seed : int -> unit
-Change the QCheck_runner.random_state by creating a new one, initialized with - the given seed.
-
- -
val set_verbose : bool -> unit
-Change the value of verbose ()
-
- -
val set_long_tests : bool -> unit
-Change the value of long_tests ()
-
-
-

Conversion of tests to OUnit Tests


- -
val to_ounit_test : ?verbose:bool ->
?long:bool -> ?rand:Random.State.t -> QCheck.Test.t -> OUnit.test
-to_ounit_test ~rand t wraps t into a OUnit test
-
-
verbose : used to print information on stdout (default: verbose())
-
rand : the random generator to use (default: random_state ())
- -
val to_ounit_test_cell : ?verbose:bool ->
?long:bool -> ?rand:Random.State.t -> 'a QCheck.Test.cell -> OUnit.test
-Same as QCheck_runner.to_ounit_test but with a polymorphic test cell
-
- -
val (>:::) : string -> QCheck.Test.t list -> OUnit.test
-Same as OUnit.>::: but with a list of QCheck tests
-
- -
val to_ounit2_test : ?rand:Random.State.t -> QCheck.Test.t -> OUnit2.test
-to_ounit2_test ?rand t wraps t into a OUnit2 test
-
-
rand : the random generator to use (default: a static seed for reproducibility), - can be overridden with "-seed" on the command-line
- -
val to_ounit2_test_list : ?rand:Random.State.t -> QCheck.Test.t list -> OUnit2.test list
-to_ounit2_test_list ?rand t like to_ounit2_test but for a list of tests
-
-
-

OUnit runners


- -
val run : ?argv:string array -> OUnit.test -> int
-run test runs the test, and returns an error code that is 0 - if all tests passed, 1 otherwise. - This is the default runner used by the comment-to-test generator.
-Raises -
-
argv : the command line arguments to parse parameters from (default Sys.argv)
- -
val run_tap : OUnit.test -> OUnit.test_results
-TAP-compatible test runner, in case we want to use a test harness. - It prints one line per test.
-
-
-

Run a Suite of Tests and Get Results


- -
val run_tests : ?verbose:bool ->
?long:bool ->
?out:Pervasives.out_channel ->
?rand:Random.State.t -> QCheck.Test.t list -> int
-Run a suite of tests, and print its results. This is an heritage from - the "qcheck" library.
-Returns an error code, 0 if all tests passed, 1 otherwise.
-
-
verbose : if true, prints more information about test cases
- -
val run_tests_main : ?argv:string array -> QCheck.Test.t list -> 'a
-Can be used as the main function of a test file. Exits with a non-0 code - if the tests fail. It refers to QCheck_runner.run_tests for actually running tests - after CLI options have been parsed. -

- - The available options are: -

-

- - Below is an example of the output of the run_tests and run_tests_main - function:
random seed: 174620056
-generated  error;  fail; pass / total       time -- test name
-[✓] (1000)    0 ;    0 ; 1000 / 1000 --     0.5s -- list_rev_is_involutive
-[✗] (   1)    0 ;    1 ;    0 /   10 --     0.0s -- fail_sort_id
-[✗] (   1)    1 ;    0 ;    0 /   10 --     0.0s -- error_raise_exn
-
---- Failure --------------------------------------------------------------------
-
-Test fail_sort_id failed (112 shrink steps):
-
-[1; 0]
-
-=== Error ======================================================================
-
-Test error_raise_exn errored on (56 shrink steps):
-
-0
-
-exception QCheck_test.Error
-Raised at file "example/QCheck_test.ml", line 19, characters 20-25
-Called from file "src/QCheck.ml", line 846, characters 13-33
-
-================================================================================
-failure (1 tests failed, 1 tests errored, ran 3 tests)

-
- \ No newline at end of file diff --git a/docs/0.5.3/html.stamp b/docs/0.5.3/html.stamp deleted file mode 100644 index 505993be9518e783dd10b0748120ba0763ae7c31..0000000000000000000000000000000000000000 --- a/docs/0.5.3/html.stamp +++ /dev/null @@ -1 +0,0 @@ -02c9a76b5d90225a856412181951a1b0 \ No newline at end of file diff --git a/docs/0.5.3/index.html b/docs/0.5.3/index.html deleted file mode 100644 index 10965bb1364d27f2aa809532e911a953c6d8dc69..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - -

- -

- - - -
QCheck
-Quickcheck inspired property-based testing -
-
QCheck_runner
-Runners for Tests -
-
- - \ No newline at end of file diff --git a/docs/0.5.3/index_attributes.html b/docs/0.5.3/index_attributes.html deleted file mode 100644 index e1f0a8508332f8bc0eb5c979d596a553f62e5954..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_attributes.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of class attributes - - - -

Index of class attributes

- -
- - \ No newline at end of file diff --git a/docs/0.5.3/index_class_types.html b/docs/0.5.3/index_class_types.html deleted file mode 100644 index a9205d15d3f25acb9d1ac9e61ff2ddd8facd3c93..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_class_types.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of class types - - - -

Index of class types

- -
- - \ No newline at end of file diff --git a/docs/0.5.3/index_classes.html b/docs/0.5.3/index_classes.html deleted file mode 100644 index dedec69ab28c30776557e9a13a9ad02df6f08278..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_classes.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of classes - - - -

Index of classes

- -
- - \ No newline at end of file diff --git a/docs/0.5.3/index_exceptions.html b/docs/0.5.3/index_exceptions.html deleted file mode 100644 index 0e3cf90c958d7d2e946fc2be09b39e0ffe2172a6..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_exceptions.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - -Index of exceptions - - - -

Index of exceptions

- - - - - - -

T
Test_error [QCheck.Test]
-Exception raised when a test raised an exception e, with - the sample that triggered the exception. -
-
Test_fail [QCheck.Test]
-Exception raised when a test failed, with the list of counter-examples. -
-
- - \ No newline at end of file diff --git a/docs/0.5.3/index_extensions.html b/docs/0.5.3/index_extensions.html deleted file mode 100644 index 5b7d02e7e16eb78daa592beaa56f56dcb55ababd..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_extensions.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of extensions - - - -

Index of extensions

- -
- - \ No newline at end of file diff --git a/docs/0.5.3/index_methods.html b/docs/0.5.3/index_methods.html deleted file mode 100644 index f03dc720c3d6534e84dcfe41d1c5c75677318889..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_methods.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of class methods - - - -

Index of class methods

- -
- - \ No newline at end of file diff --git a/docs/0.5.3/index_module_types.html b/docs/0.5.3/index_module_types.html deleted file mode 100644 index 2f0fec4eab1f8f34b016f85594d1803e5981a211..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_module_types.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of module types - - - -

Index of module types

- -
- - \ No newline at end of file diff --git a/docs/0.5.3/index_modules.html b/docs/0.5.3/index_modules.html deleted file mode 100644 index 41493666db9c0c6b9bb3abda1756f3c5b57d509c..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_modules.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - -Index of modules - - - -

Index of modules

- - - - - - - - - - - - - - - - - - - - - - - -

G
Gen [QCheck]
-Generate Random Values -
-

I
Iter [QCheck]
-Iterators -
-

P
Print [QCheck]
-Show Values -
-

Q
QCheck
-Quickcheck inspired property-based testing -
-
QCheck_runner
-Runners for Tests -
-

S
Shrink [QCheck]
-Shrink Values -
-

T
Test [QCheck]
TestResult [QCheck]
-Result of running a test -
-
- - \ No newline at end of file diff --git a/docs/0.5.3/index_types.html b/docs/0.5.3/index_types.html deleted file mode 100644 index 600b6915d9611a88dbd4025e4c9971bca2b13758..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_types.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - -Index of types - - - -

Index of types

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

A
arbitrary [QCheck]
-a value of type 'a arbitrary is an object with a method for generating random - values of type 'a, and additional methods to compute the size of values, - print them, and possibly shrink them into smaller counterexamples -
-

C
callback [QCheck.Test]
-Callback executed after each test has been run. -
-
cell [QCheck.Test]
-A single property test -
-
counter_ex [QCheck.TestResult]

F
failed_state [QCheck.TestResult]

R
res [QCheck.Test]

S
sized [QCheck.Gen]
-Random generator with a size bound -
-
state [QCheck.TestResult]
step [QCheck.Test]
-Callback executed after each instance of a test has been run. -
-

T
t [QCheck.Test]
t [QCheck.TestResult]
t [QCheck.Shrink]
-Given a counter-example, return an iterator on smaller versions - of the counter-example -
-
t [QCheck.Iter]
t [QCheck.Print]
-Printer for values of type 'a -
-
t [QCheck.Gen]
-A random generator for values of type 'a -
-
- - \ No newline at end of file diff --git a/docs/0.5.3/index_values.html b/docs/0.5.3/index_values.html deleted file mode 100644 index 29d6435349a656f468b3678d51515e4ce353a450..0000000000000000000000000000000000000000 --- a/docs/0.5.3/index_values.html +++ /dev/null @@ -1,885 +0,0 @@ - - - - - - - - - - - -Index of values - - - -

Index of values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(--) [QCheck.Gen]
-Synonym to QCheck.Gen.int_range -
-
(--) [QCheck]
-Synonym to QCheck.int_range -
-
(<*>) [QCheck.Iter]
(<*>) [QCheck.Gen]
-Infix operator for composing a function generator and an argument generator - into a result generator -
-
(<+>) [QCheck.Iter]
-Synonym to QCheck.Iter.append -
-
(==>) [QCheck]
-b1 ==> b2 is the logical implication b1 => b2 - ie not b1 || b2 (except that it is strict and will interact - better with QCheck.Test.check_exn and the likes, because they will know - the precondition was not satisfied.). -
-
(>:::) [QCheck_runner]
-Same as OUnit.>::: but with a list of QCheck tests -
-
(>>=) [QCheck.Iter]
(>>=) [QCheck.Gen]
-Monadic bind for writing dependent generators. -
-
(>|=) [QCheck.Iter]
(>|=) [QCheck.Gen]
-An infix synonym for QCheck.Gen.map -
-

A
always [QCheck]
-Always return the same element -
-
append [QCheck.Iter]
array [QCheck.Shrink]
-Shrink an array. -
-
array [QCheck.Print]
-Array printer. -
-
array [QCheck.Gen]
-Builds an array generator from an element generator. -
-
array [QCheck]
-generates arrays with length generated by small_nat -
-
array_of_size [QCheck]
-generates arrays with length from the given distribution -
-
array_repeat [QCheck.Gen]
-array_repeat i g builds an array generator from exactly i elements generated by g -
-
array_size [QCheck.Gen]
-Builds an array generator from a (non-negative) size generator and an element generator -
-
assume [QCheck]
-assume cond checks the precondition cond, and does nothing - if cond=true. -
-
assume_fail [QCheck]
-assume_fail () is like assume false, but can take any type - since we know it always fails (like assert false). -
-

B
bool [QCheck.Print]
-Boolean printer -
-
bool [QCheck.Gen]
-The Boolean generator -
-
bool [QCheck]
-uniform boolean generator -
-

C
char [QCheck.Print]
-Character printer -
-
char [QCheck.Gen]
-Generates characters upto character code 255 -
-
char [QCheck]
-Uniformly distributed on all the chars (not just ascii or - valid latin-1) -
-
check_cell [QCheck.Test]
-check ~long ~rand test generates up to count random - values of type 'a using arbitrary and the random state st. -
-
check_cell_exn [QCheck.Test]
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result. -
-
check_exn [QCheck.Test]
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result. -
-
check_result [QCheck.Test]
-check_result cell res checks that res is Ok _, and returns unit. -
-
choose [QCheck]
-Choose among the given list of generators. -
-
comap [QCheck.Print]
-comap f p maps p, a printer of type 'b, to a printer of type 'a by - first converting a printed value using f : 'a -> 'b. -
-

E
empty [QCheck.Iter]

F
find [QCheck.Iter]
fix [QCheck.Gen]
-Fixpoint combinator for generating recursive, size-bounded data types. -
-
float [QCheck.Print]
-Floating point number printer -
-
float [QCheck.Gen]
-Generates floating point numbers -
-
float [QCheck]
-generates regular floats (no nan and no infinities) -
-
frequency [QCheck.Gen]
-Constructs a generator that selects among a given list of generators. -
-
frequency [QCheck]
-Similar to QCheck.oneof but with frequencies -
-
frequencya [QCheck.Gen]
-Constructs a generator that selects among a given array of values. -
-
frequencya [QCheck]
-Same as QCheck.frequencyl, but with an array -
-
frequencyl [QCheck.Gen]
-Constructs a generator that selects among a given list of values. -
-
frequencyl [QCheck]
-Same as QCheck.oneofl, but each element is paired with its frequency in - the probability distribution (the higher, the more likely) -
-
fun1 [QCheck]
-generator of functions of arity 1. -
-
fun2 [QCheck]
-generator of functions of arity 2. -
-

G
generate [QCheck.Gen]
-generate ~n g generates n instances of g -
-
generate1 [QCheck.Gen]
-generate1 g generates one instance of g -
-
get_arbitrary [QCheck.Test]
get_count [QCheck.Test]
-Get the count of a cell -
-
get_law [QCheck.Test]
get_long_factor [QCheck.Test]
-Get the long factor of a cell -
-
get_name [QCheck.Test]

I
int [QCheck.Shrink]
int [QCheck.Print]
-Integer printer -
-
int [QCheck.Gen]
-Generates integers uniformly -
-
int [QCheck]
-int generator. -
-
int32 [QCheck]
-int32 generator. -
-
int64 [QCheck]
-int generator. -
-
int_bound [QCheck.Gen]
-Uniform integer generator producing integers within 0... bound. -
-
int_bound [QCheck]
-int_bound n is uniform between 0 and n included -
-
int_range [QCheck.Gen]
-Uniform integer generator producing integers within low,high -
-
int_range [QCheck]
-int_range a b is uniform between a and b included. -
-

J
join [QCheck.Gen]
-Collapses a generator of generators to simply a generator. -
-

L
list [QCheck.Shrink]
-Try to shrink lists by removing elements one by one. -
-
list [QCheck.Print]
-List printer. -
-
list [QCheck.Gen]
-Builds a list generator from an element generator. -
-
list [QCheck]
-generates lists with length generated by small_nat -
-
list_of_size [QCheck]
-generates lists with length from the given distribution -
-
list_repeat [QCheck.Gen]
-list_repeat i g builds a list generator from exactly i elements generated by g -
-
list_size [QCheck.Gen]
-Builds a list generator from a (non-negative) size generator and an element generator -
-
long_tests [QCheck_runner]
-Is the default mode to run long tests or nor? -
-

M
make [QCheck.Test]
-make arb prop builds a test that checks property prop on instances - of the generator arb. -
-
make [QCheck]
-Builder for arbitrary. -
-
make_cell [QCheck.Test]
-make arb prop builds a test that checks property prop on instances - of the generator arb. -
-
map [QCheck.Iter]
map [QCheck.Gen]
-map f g transforms a generator g by applying f to each generated element -
-
map [QCheck]
-map f a returns a new arbitrary instance that generates values using - a#gen and then transforms them through f. -
-
map2 [QCheck.Iter]
map2 [QCheck.Gen]
-map f g1 g2 transforms two generators g1 and g2 by applying f to each - pair of generated elements -
-
map3 [QCheck.Gen]
-map f g1 g2 g3 transforms two generators g1, g2, and g3 by applying f - to each triple of generated elements -
-
map_keep_input [QCheck.Gen]
-map f g transforms a generator g by applying f to each generated element. -
-
map_keep_input [QCheck]
-map_keep_input f a generates random values from a, and maps them into - values of type 'b using the function f, but it also keeps the - original value. -
-
map_same_type [QCheck]
-Specialization of map when the transformation preserves the type, which - makes shrinker, printer, etc. -
-

N
nat [QCheck.Gen]
-Generates small natural numbers -
-
neg_float [QCheck]
-negative float generator (no nan and no infinities) -
-
neg_int [QCheck.Gen]
-Generates negative integers -
-
neg_int [QCheck]
-negative int generator. -
-
nfloat [QCheck.Gen]
-Generates negative floating point numbers -
-
nil [QCheck.Shrink]
-No shrink -
-
numeral [QCheck.Gen]
-Generates numeral characters -
-
numeral_char [QCheck]
-uniformy distributed over '0'..'9' -
-
numeral_string [QCheck]
-generates strings with a distribution of length of small_nat - and distribution of characters of numeral_char -
-
numeral_string_of_size [QCheck]
-generates strings with a distribution of characters of numeral_char -
-

O
of_array [QCheck.Iter]
of_list [QCheck.Iter]
oneof [QCheck.Gen]
-Constructs a generator that selects among a given list of generators -
-
oneof [QCheck]
-Pick a generator among the list, randomly -
-
oneofa [QCheck.Gen]
-Constructs a generator that selects among a given array of values -
-
oneofa [QCheck]
-Pick an element randomly in the array -
-
oneofl [QCheck.Gen]
-Constructs a generator that selects among a given list of values -
-
oneofl [QCheck]
-Pick an element randomly in the list -
-
opt [QCheck.Gen]
-An option generator -
-
option [QCheck.Shrink]
option [QCheck.Print]
-Option printer -
-
option [QCheck]
-choose between returning Some random value, or None -
-

P
pair [QCheck.Shrink]
pair [QCheck.Iter]
pair [QCheck.Print]
-Pair printer. -
-
pair [QCheck.Gen]
-Generates pairs -
-
pair [QCheck]
-combines two generators into a generator of pairs -
-
pfloat [QCheck.Gen]
-Generates positive floating point numbers -
-
pint [QCheck.Gen]
-Generates positive integers uniformly -
-
pos_float [QCheck]
-positive float generator (no nan and no infinities) -
-
pos_int [QCheck]
-positive int generator. -
-
print_c_ex [QCheck.Test]
print_error [QCheck.Test]
print_fail [QCheck.Test]
print_instance [QCheck.Test]
print_test_error [QCheck.Test]
print_test_fail [QCheck.Test]
printable [QCheck.Gen]
-Generates printable characters -
-
printable_char [QCheck]
-uniformly distributed over a subset of chars -
-
printable_string [QCheck]
-generates strings with a distribution of length of small_nat - and distribution of characters of printable_char -
-
printable_string_of_size [QCheck]
-generates strings with distribution of characters of printable_char -
-

Q
quad [QCheck.Shrink]
quad [QCheck.Iter]
quad [QCheck.Print]
-Quadruple (4-tuple) printer. -
-
quad [QCheck.Gen]
-Generates quadruples -
-
quad [QCheck]
-combines four generators into a generator of 4-tuples -
-

R
random_state [QCheck_runner]
-Access the current random state -
-
return [QCheck.Iter]
return [QCheck.Gen]
-Create a constant generator -
-
run [QCheck_runner]
-run test runs the test, and returns an error code that is 0 - if all tests passed, 1 otherwise. -
-
run_tap [QCheck_runner]
-TAP-compatible test runner, in case we want to use a test harness. -
-
run_tests [QCheck_runner]
-Run a suite of tests, and print its results. -
-
run_tests_main [QCheck_runner]
-Can be used as the main function of a test file. -
-

S
set_collect [QCheck]
set_long_tests [QCheck_runner]
-Change the value of long_tests () -
-
set_name [QCheck.Test]
set_print [QCheck]
set_seed [QCheck_runner]
-Change the QCheck_runner.random_state by creating a new one, initialized with - the given seed. -
-
set_shrink [QCheck]
set_small [QCheck]
set_verbose [QCheck_runner]
-Change the value of verbose () -
-
shuffle_a [QCheck.Gen]
-Shuffle the array in place -
-
shuffle_l [QCheck.Gen]
-Creates a generator of shuffled lists -
-
sized [QCheck.Gen]
-Create a generator from a size-bounded generator by first - generating a size using QCheck.Gen.nat and passing the result to the size-bounded generator -
-
sized_size [QCheck.Gen]
-Create a generator from a size-bounded generator by first - generating a size using the integer generator and passing the result - to the size-bounded generator -
-
small_int [QCheck.Gen]
-Small UNSIGNED integers, for retrocompatibility -
-
small_int [QCheck]
-Small unsigned integers. -
-
small_int_corners [QCheck]
-As small_int, but each newly created generator starts with - a list of corner cases before falling back on random generation. -
-
small_list [QCheck.Gen]
-Generates lists of small size (range 0 -- 10). -
-
small_list [QCheck]
-Generates lists of small size (range 0 -- 10). -
-
small_nat [QCheck.Gen]
-Synonym to QCheck.Gen.nat -
-
small_nat [QCheck]
-Small unsigned integers -
-
small_printable_string [QCheck]
small_signed_int [QCheck.Gen]
-small SIGNED integers -
-
small_signed_int [QCheck]
-Small signed integers -
-
small_string [QCheck.Gen]
-Builds a string generator. -
-
small_string [QCheck]
-Same as QCheck.string but with a small length (that is, 0--10) -
-
string [QCheck.Shrink]
string [QCheck.Print]
-String printer -
-
string [QCheck.Gen]
-Builds a string generator. -
-
string [QCheck]
-generates strings with a distribution of length of small_nat - and distribution of characters of char -
-
string_gen [QCheck]
-generates strings with a distribution of length of small_nat -
-
string_gen_of_size [QCheck]
string_of_size [QCheck]
-generates strings with distribution of characters if char -
-
string_size [QCheck.Gen]
-Builds a string generator from a (non-negative) size generator. -
-

T
to_ounit2_test [QCheck_runner]
-to_ounit2_test ?rand t wraps t into a OUnit2 test -
-
to_ounit2_test_list [QCheck_runner]
-to_ounit2_test_list ?rand t like to_ounit2_test but for a list of tests -
-
to_ounit_test [QCheck_runner]
-to_ounit_test ~rand t wraps t into a OUnit test -
-
to_ounit_test_cell [QCheck_runner]
-Same as QCheck_runner.to_ounit_test but with a polymorphic test cell -
-
triple [QCheck.Shrink]
triple [QCheck.Iter]
triple [QCheck.Print]
-Triple (3-tuple) printer. -
-
triple [QCheck.Gen]
-Generates triples -
-
triple [QCheck]
-combines three generators into a generator of 3-tuples -
-

U
ui32 [QCheck.Gen]
-Generates (unsigned) int32 values -
-
ui64 [QCheck.Gen]
-Generates (unsigned) int64 values -
-
unit [QCheck.Gen]
-The unit generator -
-
unit [QCheck]
-always generates (), obviously. -
-

V
verbose [QCheck_runner]
-Is the default mode verbose or quiet? -
-
- - \ No newline at end of file diff --git a/docs/0.5.3/style.css b/docs/0.5.3/style.css deleted file mode 100644 index a5b4578755f28f6915ffe9764c450a732a01000a..0000000000000000000000000000000000000000 --- a/docs/0.5.3/style.css +++ /dev/null @@ -1,39 +0,0 @@ -.keyword { font-weight : bold ; color : Red } -.keywordsign { color : #C04600 } -.comment { color : Green } -.constructor { color : Blue } -.type { color : #5C6585 } -.string { color : Maroon } -.warning { color : Red ; font-weight : bold } -.info { margin-left : 3em; margin-right: 3em } -.param_info { margin-top: 4px; margin-left : 3em; margin-right : 3em } -.code { color : #465F91 ; } -.typetable { border-style : hidden } -.paramstable { border-style : hidden ; padding: 5pt 5pt} -tr { background-color : White } -td.typefieldcomment { background-color : #FFFFFF ; font-size: smaller ;} -div.sig_block {margin-left: 2em} -*:target { background: yellow; } -body {font: 13px sans-serif; color: black; text-align: left; padding: 5px; margin: 0} -h1 { font-size : 20pt ; text-align: center; } -h2 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90BDFF ;padding: 2px; } -h3 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90DDFF ;padding: 2px; } -h4 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90EDFF ;padding: 2px; } -h5 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90FDFF ;padding: 2px; } -h6 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90BDFF ; padding: 2px; } -div.h7 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #E0FFFF ; padding: 2px; } -div.h8 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #F0FFFF ; padding: 2px; } -div.h9 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #FFFFFF ; padding: 2px; } -a {color: #416DFF; text-decoration: none} -a:hover {background-color: #ddd; text-decoration: underline} -pre { margin-bottom: 4px; font-family: monospace; } -pre.verbatim, pre.codepre { } -.indextable {border: 1px #ddd solid; border-collapse: collapse} -.indextable td, .indextable th {border: 1px #ddd solid; min-width: 80px} -.indextable td.module {background-color: #eee ; padding-left: 2px; padding-right: 2px} -.indextable td.module a {color: 4E6272; text-decoration: none; display: block; width: 100%} -.indextable td.module a:hover {text-decoration: underline; background-color: transparent} -.deprecated {color: #888; font-style: italic} -.indextable tr td div.info { margin-left: 2px; margin-right: 2px } -ul.indexlist { margin-left: 0; padding-left: 0;} -ul.indexlist li { list-style-type: none ; margin-left: 0; padding-left: 0; } \ No newline at end of file diff --git a/docs/0.5.3/type_QCheck.Gen.html b/docs/0.5.3/type_QCheck.Gen.html deleted file mode 100644 index 5d27557632f791e3fddfa685d6be7262fc75839e..0000000000000000000000000000000000000000 --- a/docs/0.5.3/type_QCheck.Gen.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - -QCheck.Gen - - -sig
-  type 'a t = Random.State.t -> 'a
-  type 'a sized = int -> Random.State.t -> 'a
-  val return : '-> 'QCheck.Gen.t
-  val ( >>= ) : 'QCheck.Gen.t -> ('-> 'QCheck.Gen.t) -> 'QCheck.Gen.t
-  val ( <*> ) : ('-> 'b) QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-  val map : ('-> 'b) -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-  val map2 :
-    ('-> '-> 'c) -> 'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-  val map3 :
-    ('-> '-> '-> 'd) ->
-    'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-  val map_keep_input :
-    ('-> 'b) -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
-  val ( >|= ) : 'QCheck.Gen.t -> ('-> 'b) -> 'QCheck.Gen.t
-  val oneof : 'QCheck.Gen.t list -> 'QCheck.Gen.t
-  val oneofl : 'a list -> 'QCheck.Gen.t
-  val oneofa : 'a array -> 'QCheck.Gen.t
-  val frequency : (int * 'QCheck.Gen.t) list -> 'QCheck.Gen.t
-  val frequencyl : (int * 'a) list -> 'QCheck.Gen.t
-  val frequencya : (int * 'a) array -> '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 small_signed_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 : 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-  val list_size : int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-  val list_repeat : int -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-  val array : 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-  val array_size :
-    int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-  val array_repeat : int -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-  val opt : 'QCheck.Gen.t -> 'a option QCheck.Gen.t
-  val pair : 'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
-  val triple :
-    'QCheck.Gen.t ->
-    'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b * 'c) QCheck.Gen.t
-  val quad :
-    'QCheck.Gen.t ->
-    'QCheck.Gen.t ->
-    'QCheck.Gen.t -> '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 small_list : 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-  val join : 'QCheck.Gen.t QCheck.Gen.t -> 'QCheck.Gen.t
-  val sized : 'QCheck.Gen.sized -> 'QCheck.Gen.t
-  val sized_size : int QCheck.Gen.t -> 'QCheck.Gen.sized -> 'QCheck.Gen.t
-  val fix :
-    ('QCheck.Gen.sized -> 'QCheck.Gen.sized) -> 'QCheck.Gen.sized
-  val generate : ?rand:Random.State.t -> n:int -> 'QCheck.Gen.t -> 'a list
-  val generate1 : ?rand:Random.State.t -> 'QCheck.Gen.t -> 'a
-end
\ No newline at end of file diff --git a/docs/0.5.3/type_QCheck.Iter.html b/docs/0.5.3/type_QCheck.Iter.html deleted file mode 100644 index 25c7f02f5eba0b4e59aae7a6bc2e595af50c6063..0000000000000000000000000000000000000000 --- a/docs/0.5.3/type_QCheck.Iter.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - -QCheck.Iter - - -sig
-  type 'a t = ('-> unit) -> unit
-  val empty : 'QCheck.Iter.t
-  val return : '-> 'QCheck.Iter.t
-  val ( <*> ) :
-    ('-> 'b) QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val ( >>= ) :
-    'QCheck.Iter.t -> ('-> 'QCheck.Iter.t) -> 'QCheck.Iter.t
-  val map : ('-> 'b) -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val map2 :
-    ('-> '-> 'c) ->
-    'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val ( >|= ) : 'QCheck.Iter.t -> ('-> 'b) -> 'QCheck.Iter.t
-  val append : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val ( <+> ) : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-  val of_list : 'a list -> 'QCheck.Iter.t
-  val of_array : 'a array -> 'QCheck.Iter.t
-  val pair : 'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b) QCheck.Iter.t
-  val triple :
-    'QCheck.Iter.t ->
-    'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b * 'c) QCheck.Iter.t
-  val quad :
-    'QCheck.Iter.t ->
-    'QCheck.Iter.t ->
-    'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b * 'c * 'd) QCheck.Iter.t
-  val find : ('-> bool) -> 'QCheck.Iter.t -> 'a option
-end
\ No newline at end of file diff --git a/docs/0.5.3/type_QCheck.Print.html b/docs/0.5.3/type_QCheck.Print.html deleted file mode 100644 index 57fb7c1e83bf4abb35791d622b0d88768fb07fb9..0000000000000000000000000000000000000000 --- a/docs/0.5.3/type_QCheck.Print.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - -QCheck.Print - - -sig
-  type 'a t = '-> 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 : 'QCheck.Print.t -> 'a option QCheck.Print.t
-  val pair :
-    'QCheck.Print.t -> 'QCheck.Print.t -> ('a * 'b) QCheck.Print.t
-  val triple :
-    'QCheck.Print.t ->
-    'QCheck.Print.t -> 'QCheck.Print.t -> ('a * 'b * 'c) QCheck.Print.t
-  val quad :
-    'QCheck.Print.t ->
-    'QCheck.Print.t ->
-    'QCheck.Print.t ->
-    'QCheck.Print.t -> ('a * 'b * 'c * 'd) QCheck.Print.t
-  val list : 'QCheck.Print.t -> 'a list QCheck.Print.t
-  val array : 'QCheck.Print.t -> 'a array QCheck.Print.t
-  val comap : ('-> 'b) -> 'QCheck.Print.t -> 'QCheck.Print.t
-end
\ No newline at end of file diff --git a/docs/0.5.3/type_QCheck.Shrink.html b/docs/0.5.3/type_QCheck.Shrink.html deleted file mode 100644 index a60967dad7434f1a152e599c47e31f4943967c7a..0000000000000000000000000000000000000000 --- a/docs/0.5.3/type_QCheck.Shrink.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - -QCheck.Shrink - - -sig
-  type 'a t = '-> 'QCheck.Iter.t
-  val nil : 'QCheck.Shrink.t
-  val int : int QCheck.Shrink.t
-  val option : 'QCheck.Shrink.t -> 'a option QCheck.Shrink.t
-  val string : string QCheck.Shrink.t
-  val list : ?shrink:'QCheck.Shrink.t -> 'a list QCheck.Shrink.t
-  val array : ?shrink:'QCheck.Shrink.t -> 'a array QCheck.Shrink.t
-  val pair :
-    'QCheck.Shrink.t -> 'QCheck.Shrink.t -> ('a * 'b) QCheck.Shrink.t
-  val triple :
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t -> ('a * 'b * 'c) QCheck.Shrink.t
-  val quad :
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t ->
-    'QCheck.Shrink.t -> ('a * 'b * 'c * 'd) QCheck.Shrink.t
-end
\ No newline at end of file diff --git a/docs/0.5.3/type_QCheck.Test.html b/docs/0.5.3/type_QCheck.Test.html deleted file mode 100644 index eeb3c58d74e33a86bb4f4df5ad180fa97ff8d4e6..0000000000000000000000000000000000000000 --- a/docs/0.5.3/type_QCheck.Test.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - -QCheck.Test - - -sig
-  type 'a cell
-  val make_cell :
-    ?count:int ->
-    ?long_factor:int ->
-    ?max_gen:int ->
-    ?max_fail:int ->
-    ?small:('-> int) ->
-    ?name:string ->
-    'QCheck.arbitrary -> ('-> bool) -> 'QCheck.Test.cell
-  val get_arbitrary : 'QCheck.Test.cell -> 'QCheck.arbitrary
-  val get_law : 'QCheck.Test.cell -> '-> bool
-  val get_name : 'QCheck.Test.cell -> string
-  val set_name : 'QCheck.Test.cell -> string -> unit
-  val get_count : 'QCheck.Test.cell -> int
-  val get_long_factor : 'QCheck.Test.cell -> int
-  type t = Test : 'QCheck.Test.cell -> QCheck.Test.t
-  val make :
-    ?count:int ->
-    ?long_factor:int ->
-    ?max_gen:int ->
-    ?max_fail:int ->
-    ?small:('-> int) ->
-    ?name:string -> 'QCheck.arbitrary -> ('-> bool) -> QCheck.Test.t
-  exception Test_fail of string * string list
-  exception Test_error of string * string * exn * string
-  val print_instance : 'QCheck.arbitrary -> '-> string
-  val print_c_ex :
-    'QCheck.arbitrary -> 'QCheck.TestResult.counter_ex -> string
-  val print_fail :
-    'QCheck.arbitrary ->
-    string -> 'QCheck.TestResult.counter_ex list -> string
-  val print_error :
-    ?st:string ->
-    'QCheck.arbitrary ->
-    string -> '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 : 'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit
-  type res = Success | Failure | FalseAssumption | Error of exn * string
-  type 'a step =
-      string -> 'QCheck.Test.cell -> '-> QCheck.Test.res -> unit
-  type 'a callback =
-      string -> 'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit
-  val check_cell :
-    ?long:bool ->
-    ?call:'QCheck.Test.callback ->
-    ?step:'QCheck.Test.step ->
-    ?rand:Random.State.t -> 'QCheck.Test.cell -> 'QCheck.TestResult.t
-  val check_cell_exn :
-    ?long:bool ->
-    ?call:'QCheck.Test.callback ->
-    ?step:'QCheck.Test.step ->
-    ?rand:Random.State.t -> 'QCheck.Test.cell -> unit
-  val check_exn : ?long:bool -> ?rand:Random.State.t -> QCheck.Test.t -> unit
-end
\ No newline at end of file diff --git a/docs/0.5.3/type_QCheck.TestResult.html b/docs/0.5.3/type_QCheck.TestResult.html deleted file mode 100644 index e38494223cd931df3d2327cf1607b5b15a088683..0000000000000000000000000000000000000000 --- a/docs/0.5.3/type_QCheck.TestResult.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - -QCheck.TestResult - - -sig
-  type 'a counter_ex = { instance : 'a; shrink_steps : int; }
-  type 'a failed_state = 'QCheck.TestResult.counter_ex list
-  type 'a state =
-      Success
-    | Failed of 'QCheck.TestResult.failed_state
-    | Error of 'QCheck.TestResult.counter_ex * exn * string
-  type 'a t = {
-    mutable state : 'QCheck.TestResult.state;
-    mutable count : int;
-    mutable count_gen : int;
-    collect_tbl : (string, int) Hashtbl.t lazy_t;
-  }
-end
\ No newline at end of file diff --git a/docs/0.5.3/type_QCheck.html b/docs/0.5.3/type_QCheck.html deleted file mode 100644 index 137fc9a0294ee1580ce15bdfc11edf0c8c2aa1da..0000000000000000000000000000000000000000 --- a/docs/0.5.3/type_QCheck.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - - - - -QCheck - - -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 : '-> 'QCheck.Gen.t
-      val ( >>= ) :
-        'QCheck.Gen.t -> ('-> 'QCheck.Gen.t) -> 'QCheck.Gen.t
-      val ( <*> ) :
-        ('-> 'b) QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-      val map : ('-> 'b) -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-      val map2 :
-        ('-> '-> 'c) ->
-        'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-      val map3 :
-        ('-> '-> '-> 'd) ->
-        'QCheck.Gen.t ->
-        'QCheck.Gen.t -> 'QCheck.Gen.t -> 'QCheck.Gen.t
-      val map_keep_input :
-        ('-> 'b) -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
-      val ( >|= ) : 'QCheck.Gen.t -> ('-> 'b) -> 'QCheck.Gen.t
-      val oneof : 'QCheck.Gen.t list -> 'QCheck.Gen.t
-      val oneofl : 'a list -> 'QCheck.Gen.t
-      val oneofa : 'a array -> 'QCheck.Gen.t
-      val frequency : (int * 'QCheck.Gen.t) list -> 'QCheck.Gen.t
-      val frequencyl : (int * 'a) list -> 'QCheck.Gen.t
-      val frequencya : (int * 'a) array -> '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 small_signed_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 : 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-      val list_size :
-        int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-      val list_repeat : int -> 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-      val array : 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-      val array_size :
-        int QCheck.Gen.t -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-      val array_repeat : int -> 'QCheck.Gen.t -> 'a array QCheck.Gen.t
-      val opt : 'QCheck.Gen.t -> 'a option QCheck.Gen.t
-      val pair : 'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b) QCheck.Gen.t
-      val triple :
-        'QCheck.Gen.t ->
-        'QCheck.Gen.t -> 'QCheck.Gen.t -> ('a * 'b * 'c) QCheck.Gen.t
-      val quad :
-        'QCheck.Gen.t ->
-        'QCheck.Gen.t ->
-        'QCheck.Gen.t ->
-        '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 small_list : 'QCheck.Gen.t -> 'a list QCheck.Gen.t
-      val join : 'QCheck.Gen.t QCheck.Gen.t -> 'QCheck.Gen.t
-      val sized : 'QCheck.Gen.sized -> 'QCheck.Gen.t
-      val sized_size :
-        int QCheck.Gen.t -> 'QCheck.Gen.sized -> 'QCheck.Gen.t
-      val fix :
-        ('QCheck.Gen.sized -> 'QCheck.Gen.sized) -> 'QCheck.Gen.sized
-      val generate :
-        ?rand:Random.State.t -> n:int -> 'QCheck.Gen.t -> 'a list
-      val generate1 : ?rand:Random.State.t -> 'QCheck.Gen.t -> 'a
-    end
-  module Print :
-    sig
-      type 'a t = '-> 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 : 'QCheck.Print.t -> 'a option QCheck.Print.t
-      val pair :
-        'QCheck.Print.t -> 'QCheck.Print.t -> ('a * 'b) QCheck.Print.t
-      val triple :
-        'QCheck.Print.t ->
-        'QCheck.Print.t ->
-        'QCheck.Print.t -> ('a * 'b * 'c) QCheck.Print.t
-      val quad :
-        'QCheck.Print.t ->
-        'QCheck.Print.t ->
-        'QCheck.Print.t ->
-        'QCheck.Print.t -> ('a * 'b * 'c * 'd) QCheck.Print.t
-      val list : 'QCheck.Print.t -> 'a list QCheck.Print.t
-      val array : 'QCheck.Print.t -> 'a array QCheck.Print.t
-      val comap : ('-> 'b) -> 'QCheck.Print.t -> 'QCheck.Print.t
-    end
-  module Iter :
-    sig
-      type 'a t = ('-> unit) -> unit
-      val empty : 'QCheck.Iter.t
-      val return : '-> 'QCheck.Iter.t
-      val ( <*> ) :
-        ('-> 'b) QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val ( >>= ) :
-        'QCheck.Iter.t -> ('-> 'QCheck.Iter.t) -> 'QCheck.Iter.t
-      val map : ('-> 'b) -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val map2 :
-        ('-> '-> 'c) ->
-        'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val ( >|= ) : 'QCheck.Iter.t -> ('-> 'b) -> 'QCheck.Iter.t
-      val append : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val ( <+> ) : 'QCheck.Iter.t -> 'QCheck.Iter.t -> 'QCheck.Iter.t
-      val of_list : 'a list -> 'QCheck.Iter.t
-      val of_array : 'a array -> 'QCheck.Iter.t
-      val pair :
-        'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b) QCheck.Iter.t
-      val triple :
-        'QCheck.Iter.t ->
-        'QCheck.Iter.t -> 'QCheck.Iter.t -> ('a * 'b * 'c) QCheck.Iter.t
-      val quad :
-        'QCheck.Iter.t ->
-        'QCheck.Iter.t ->
-        'QCheck.Iter.t ->
-        'QCheck.Iter.t -> ('a * 'b * 'c * 'd) QCheck.Iter.t
-      val find : ('-> bool) -> 'QCheck.Iter.t -> 'a option
-    end
-  module Shrink :
-    sig
-      type 'a t = '-> 'QCheck.Iter.t
-      val nil : 'QCheck.Shrink.t
-      val int : int QCheck.Shrink.t
-      val option : 'QCheck.Shrink.t -> 'a option QCheck.Shrink.t
-      val string : string QCheck.Shrink.t
-      val list : ?shrink:'QCheck.Shrink.t -> 'a list QCheck.Shrink.t
-      val array : ?shrink:'QCheck.Shrink.t -> 'a array QCheck.Shrink.t
-      val pair :
-        'QCheck.Shrink.t -> 'QCheck.Shrink.t -> ('a * 'b) QCheck.Shrink.t
-      val triple :
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t -> ('a * 'b * 'c) QCheck.Shrink.t
-      val quad :
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t ->
-        'QCheck.Shrink.t -> ('a * 'b * 'c * 'd) QCheck.Shrink.t
-    end
-  type 'a arbitrary = {
-    gen : 'QCheck.Gen.t;
-    print : ('-> string) option;
-    small : ('-> int) option;
-    shrink : 'QCheck.Shrink.t option;
-    collect : ('-> string) option;
-  }
-  val make :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) ->
-    ?shrink:'QCheck.Shrink.t ->
-    ?collect:('-> string) -> 'QCheck.Gen.t -> 'QCheck.arbitrary
-  val set_print :
-    'QCheck.Print.t -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val set_small : ('-> int) -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val set_shrink :
-    'QCheck.Shrink.t -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val set_collect :
-    ('-> string) -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  module TestResult :
-    sig
-      type 'a counter_ex = { instance : 'a; shrink_steps : int; }
-      type 'a failed_state = 'QCheck.TestResult.counter_ex list
-      type 'a state =
-          Success
-        | Failed of 'QCheck.TestResult.failed_state
-        | Error of 'QCheck.TestResult.counter_ex * exn * string
-      type 'a t = {
-        mutable state : '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 ->
-        ?long_factor:int ->
-        ?max_gen:int ->
-        ?max_fail:int ->
-        ?small:('-> int) ->
-        ?name:string ->
-        'QCheck.arbitrary -> ('-> bool) -> 'QCheck.Test.cell
-      val get_arbitrary : 'QCheck.Test.cell -> 'QCheck.arbitrary
-      val get_law : 'QCheck.Test.cell -> '-> bool
-      val get_name : 'QCheck.Test.cell -> string
-      val set_name : 'QCheck.Test.cell -> string -> unit
-      val get_count : 'QCheck.Test.cell -> int
-      val get_long_factor : 'QCheck.Test.cell -> int
-      type t = Test : 'QCheck.Test.cell -> QCheck.Test.t
-      val make :
-        ?count:int ->
-        ?long_factor:int ->
-        ?max_gen:int ->
-        ?max_fail:int ->
-        ?small:('-> int) ->
-        ?name:string -> 'QCheck.arbitrary -> ('-> bool) -> QCheck.Test.t
-      exception Test_fail of string * string list
-      exception Test_error of string * string * exn * string
-      val print_instance : 'QCheck.arbitrary -> '-> string
-      val print_c_ex :
-        'QCheck.arbitrary -> 'QCheck.TestResult.counter_ex -> string
-      val print_fail :
-        'QCheck.arbitrary ->
-        string -> 'QCheck.TestResult.counter_ex list -> string
-      val print_error :
-        ?st:string ->
-        'QCheck.arbitrary ->
-        string -> '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 :
-        'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit
-      type res = Success | Failure | FalseAssumption | Error of exn * string
-      type 'a step =
-          string -> 'QCheck.Test.cell -> '-> QCheck.Test.res -> unit
-      type 'a callback =
-          string -> 'QCheck.Test.cell -> 'QCheck.TestResult.t -> unit
-      val check_cell :
-        ?long:bool ->
-        ?call:'QCheck.Test.callback ->
-        ?step:'QCheck.Test.step ->
-        ?rand:Random.State.t -> 'QCheck.Test.cell -> 'QCheck.TestResult.t
-      val check_cell_exn :
-        ?long:bool ->
-        ?call:'QCheck.Test.callback ->
-        ?step:'QCheck.Test.step ->
-        ?rand:Random.State.t -> 'QCheck.Test.cell -> unit
-      val check_exn :
-        ?long:bool -> ?rand:Random.State.t -> QCheck.Test.t -> unit
-    end
-  val choose : 'QCheck.arbitrary list -> '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 small_signed_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 small_list : 'QCheck.arbitrary -> 'a list 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 : 'QCheck.arbitrary -> 'a list QCheck.arbitrary
-  val list_of_size :
-    int QCheck.Gen.t -> 'QCheck.arbitrary -> 'a list QCheck.arbitrary
-  val array : 'QCheck.arbitrary -> 'a array QCheck.arbitrary
-  val array_of_size :
-    int QCheck.Gen.t -> 'QCheck.arbitrary -> 'a array QCheck.arbitrary
-  val pair :
-    'QCheck.arbitrary -> 'QCheck.arbitrary -> ('a * 'b) QCheck.arbitrary
-  val triple :
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary -> ('a * 'b * 'c) QCheck.arbitrary
-  val quad :
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary -> ('a * 'b * 'c * 'd) QCheck.arbitrary
-  val option : 'QCheck.arbitrary -> 'a option QCheck.arbitrary
-  val fun1 :
-    'QCheck.arbitrary -> 'QCheck.arbitrary -> ('-> 'b) QCheck.arbitrary
-  val fun2 :
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary ->
-    'QCheck.arbitrary -> ('-> '-> 'c) QCheck.arbitrary
-  val oneofl :
-    ?print:'QCheck.Print.t ->
-    ?collect:('-> string) -> 'a list -> 'QCheck.arbitrary
-  val oneofa :
-    ?print:'QCheck.Print.t ->
-    ?collect:('-> string) -> 'a array -> 'QCheck.arbitrary
-  val oneof : 'QCheck.arbitrary list -> 'QCheck.arbitrary
-  val always : ?print:'QCheck.Print.t -> '-> 'QCheck.arbitrary
-  val frequency :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) ->
-    ?shrink:'QCheck.Shrink.t ->
-    ?collect:('-> string) ->
-    (int * 'QCheck.arbitrary) list -> 'QCheck.arbitrary
-  val frequencyl :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) -> (int * 'a) list -> 'QCheck.arbitrary
-  val frequencya :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) -> (int * 'a) array -> 'QCheck.arbitrary
-  val map :
-    ?rev:('-> 'a) ->
-    ('-> 'b) -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val map_same_type :
-    ('-> 'a) -> 'QCheck.arbitrary -> 'QCheck.arbitrary
-  val map_keep_input :
-    ?print:'QCheck.Print.t ->
-    ?small:('-> int) ->
-    ('-> 'b) -> 'QCheck.arbitrary -> ('a * 'b) QCheck.arbitrary
-end
\ No newline at end of file diff --git a/docs/0.5.3/type_QCheck_runner.html b/docs/0.5.3/type_QCheck_runner.html deleted file mode 100644 index 0c9d74c217f8f8371c5354adeafae42f91957919..0000000000000000000000000000000000000000 --- a/docs/0.5.3/type_QCheck_runner.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - -QCheck_runner - - -sig
-  val random_state : unit -> Random.State.t
-  val verbose : unit -> bool
-  val long_tests : unit -> bool
-  val set_seed : int -> unit
-  val set_verbose : bool -> unit
-  val set_long_tests : bool -> unit
-  val to_ounit_test :
-    ?verbose:bool ->
-    ?long:bool -> ?rand:Random.State.t -> QCheck.Test.t -> OUnit.test
-  val to_ounit_test_cell :
-    ?verbose:bool ->
-    ?long:bool -> ?rand:Random.State.t -> 'QCheck.Test.cell -> OUnit.test
-  val ( >::: ) : string -> QCheck.Test.t list -> OUnit.test
-  val to_ounit2_test : ?rand:Random.State.t -> QCheck.Test.t -> OUnit2.test
-  val to_ounit2_test_list :
-    ?rand:Random.State.t -> QCheck.Test.t list -> OUnit2.test list
-  val run : ?argv:string array -> OUnit.test -> int
-  val run_tap : OUnit.test -> OUnit.test_results
-  val run_tests :
-    ?verbose:bool ->
-    ?long:bool ->
-    ?out:Pervasives.out_channel ->
-    ?rand:Random.State.t -> QCheck.Test.t list -> int
-  val run_tests_main : ?argv:string array -> QCheck.Test.t list -> 'a
-end
\ No newline at end of file diff --git a/docs/0.5/QCheck.Gen.html b/docs/0.5/QCheck.Gen.html deleted file mode 100644 index f16a802eca240aa062fcc58d43146d46a1f5f6e7..0000000000000000000000000000000000000000 --- a/docs/0.5/QCheck.Gen.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - -QCheck.Gen - - - -

Module QCheck.Gen

- -
module Gen: sig .. end
-

Generate Random Values


-
-
- -
type 'a t = Random.State.t -> 'a 
-
-A random generator for values of type 'a
-
- - -
type 'a sized = int -> Random.State.t -> 'a 
-
-Random generator with a size bound
-
- - -
val return : 'a -> 'a t
-
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
-
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
-
val map : ('a -> 'b) -> 'a t -> 'b t
-
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
-
val map3 : ('a -> 'b -> 'c -> 'd) ->
'a t -> 'b t -> 'c t -> 'd t
-
val map_keep_input : ('a -> 'b) -> 'a t -> ('a * 'b) t
-
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
-
val oneof : 'a t list -> 'a t
-
val oneofl : 'a list -> 'a t
-
val oneofa : 'a array -> 'a t
-
val frequency : (int * 'a t) list -> 'a t
-
val frequencyl : (int * 'a) list -> 'a t
-
val frequencya : (int * 'a) array -> 'a t
-
val shuffle_a : 'a array -> unit t
-Shuffle the array in place
-
- -
val shuffle_l : 'a list -> 'a list t
-
val unit : unit t
-
val bool : bool t
-
val float : float t
-
val pfloat : float t
-positive float
-
- -
val nfloat : float t
-negative float
-
- -
val nat : int t
-small nat
-
- -
val neg_int : int t
-negative int
-
- -
val pint : int t
-positive uniform int
-
- -
val int : int t
-uniform int
-
- -
val small_int : int t
-Synonym to QCheck.Gen.nat
-
- -
val int_bound : int -> int t
-Uniform within 0... bound
-
- -
val int_range : int -> int -> int t
-Uniform within low,high
-
- -
val (--) : int -> int -> int t
-Synonym to QCheck.Gen.int_range
-
- -
val ui32 : int32 t
-
val ui64 : int64 t
-
val list : 'a t -> 'a list t
-
val list_size : int t -> 'a t -> 'a list t
-
val list_repeat : int -> 'a t -> 'a list t
-
val array : 'a t -> 'a array t
-
val array_size : int t -> 'a t -> 'a array t
-
val array_repeat : int -> 'a t -> 'a array t
-
val opt : 'a t -> 'a option t
-
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-
val char : char t
-
val printable : char t
-
val numeral : char t
-
val string_size : ?gen:char t -> int t -> string t
-
val string : ?gen:char t -> string t
-
val small_string : ?gen:char t -> string t
-
val join : 'a t t -> 'a t
-Since NEXT_RELEASE
-
- -
val sized : 'a sized -> 'a t
-
val sized_size : int t -> 'a sized -> 'a t
-Since NEXT_RELEASE
-
- -
val fix : ('a sized -> 'a sized) -> 'a sized
-Fixpoint; size decreases
-
-
-Example: -
  type tree = Leaf of int | Node of tree * tree
-
-  let leaf x = Leaf x
-  let node x y = Node (x,y)
-
-  let g = QCheck.Gen.(sized @@ fix
-    (fun self n -> match n with
-      | 0 -> map leaf nat
-      | n ->
-        frequency
-          [1, map leaf nat;
-           2, map2 node (self (n/2)) (self (n/2))]
-      ))
-
-  

- -
val generate : ?rand:Random.State.t -> n:int -> 'a t -> 'a list
-generate ~n g generates n instances of g
-
- -
val generate1 : ?rand:Random.State.t -> 'a t -> 'a
-generate1 g generates one instance of g
-
- \ No newline at end of file diff --git a/docs/0.5/QCheck.Iter.html b/docs/0.5/QCheck.Iter.html deleted file mode 100644 index 30a61e9b24ffdb43eaa6a51c121fab7c566f73a9..0000000000000000000000000000000000000000 --- a/docs/0.5/QCheck.Iter.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Iter - - - -

Module QCheck.Iter

- -
module Iter: sig .. end
-

Iterators

-

- - Compatible with the library "sequence". An iterator i is simply - a function that accepts another function f (of type 'a -> unit) - and calls f on a sequence of elements f x1; f x2; ...; f xn.
-

-
- -
type 'a t = ('a -> unit) -> unit 
- - -
val empty : 'a t
-
val return : 'a -> 'a t
-
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
-
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
-
val map : ('a -> 'b) -> 'a t -> 'b t
-
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
-
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
-
val append : 'a t -> 'a t -> 'a t
-
val (<+>) : 'a t -> 'a t -> 'a t
-Synonym to QCheck.Iter.append
-
- -
val of_list : 'a list -> 'a t
-
val of_array : 'a array -> 'a t
-
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val find : ('a -> bool) -> 'a t -> 'a option
\ No newline at end of file diff --git a/docs/0.5/QCheck.Print.html b/docs/0.5/QCheck.Print.html deleted file mode 100644 index 4ca93a95864f10b3c738f7bf6fd86816073c41a2..0000000000000000000000000000000000000000 --- a/docs/0.5/QCheck.Print.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Print - - - -

Module QCheck.Print

- -
module Print: sig .. end
-

Show Values


-
-
- -
type 'a t = 'a -> string 
- - -
val int : int t
-
val bool : bool t
-
val float : float t
-
val char : char t
-
val string : string t
-
val option : 'a t -> 'a option t
-
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
-
val quad : 'a t ->
'b t ->
'c t -> 'd t -> ('a * 'b * 'c * 'd) t
-
val list : 'a t -> 'a list t
-
val array : 'a t -> 'a array t
-
val comap : ('a -> 'b) -> 'b t -> 'a t
\ No newline at end of file diff --git a/docs/0.5/QCheck.Shrink.html b/docs/0.5/QCheck.Shrink.html deleted file mode 100644 index 0b536cde43b7e4673ff780eb500d13a6c5a7fb58..0000000000000000000000000000000000000000 --- a/docs/0.5/QCheck.Shrink.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Shrink - - - -

Module QCheck.Shrink

- -
module Shrink: sig .. end
-

Shrink Values

-

- - Shrinking is used to reduce the size of a counter-example. It tries - to make the counter-example smaller by decreasing it, or removing - elements, until the property to test holds again; then it returns the - smallest value that still made the test fail
-

-
- -
type 'a t = 'a -> 'a QCheck.Iter.t 
-
-Given a counter-example, return an iterator on smaller versions - of the counter-example
-
- - -
val nil : 'a t
-No shrink
-
- -
val int : int t
-
val option : 'a t -> 'a option t
-
val string : string t
-
val list : ?shrink:'a t -> 'a list t
-Try to shrink lists by removing elements one by one.
-
-
shrink : if provided, will be used to also try to reduce - the elements of the list themselves (e.g. in an int list - one can try to decrease the integers)
- -
val array : ?shrink:'a t -> 'a array t
-Shrink an array.
-
-
shrink : see QCheck.Shrink.list
- -
val pair : 'a t -> 'b t -> ('a * 'b) t
-
val triple : 'a t ->
'b t -> 'c t -> ('a * 'b * 'c) t
\ No newline at end of file diff --git a/docs/0.5/QCheck.Test.html b/docs/0.5/QCheck.Test.html deleted file mode 100644 index f84745a73723301ba7ebfc718327820e57172033..0000000000000000000000000000000000000000 --- a/docs/0.5/QCheck.Test.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.Test - - - -

Module QCheck.Test

- -
module Test: sig .. end

- -
type 'a cell 
-
-A single property test
-
- - -
val make_cell : ?count:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string -> 'a QCheck.arbitrary -> ('a -> bool) -> 'a cell
-make arb prop builds a test that checks property prop on instances - of the generator arb.
-
-
count : number of test cases to run, counting only - the test cases which satisfy preconditions.
-
max_gen : maximum number of times the generation function - is called in total to replace inputs that do not satisfy - preconditions (should be >= count)
-
max_fail : maximum number of failures before we stop generating - inputs. This is useful if shrinking takes too much time.
-
small : kept for compatibility reasons; if provided, replaces - the field arbitrary.small. - If there is no shrinking function but there is a small - function, only the smallest failures will be printed.
-
name : the name of the test
- -
val get_arbitrary : 'a cell -> 'a QCheck.arbitrary
-
val get_law : 'a cell -> 'a -> bool
-
val get_name : 'a cell -> string option
-
val set_name : 'a cell -> string -> unit
-
type t = 
- - - - -
-| -Test : 'a cell -> t(*
-Same as 'a cell, but masking the type parameter. This allows to - put tests on different types in the same list of tests.
-
-
*)
- - - -
val make : ?count:int ->
?max_gen:int ->
?max_fail:int ->
?small:('a -> int) ->
?name:string -> 'a QCheck.arbitrary -> ('a -> bool) -> t
-make arb prop builds a test that checks property prop on instances - of the generator arb. - See QCheck.Test.make_cell for a description of the parameters.
-
-
-
Running the test

- -
exception Test_fail of string * string list
-
-Exception raised when a test failed, with the list of counter-examples. - Test_fail (name, l) means test name failed on elements of l
-
- -
exception Test_error of string * string * exn * string
-
-Exception raised when a test raised an exception e, with - the sample that triggered the exception. - Test_error (name, i, e, st) - means name failed on i with exception e, and st is the - stacktrace (if enabled) or an empty 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 cell -> 'a QCheck.TestResult.t -> unit
-check_result cell res checks that res is Ok _, and returns unit. - Otherwise, it raises some exception
-Raises -
- -
type 'a callback = string -> 'a cell -> 'a QCheck.TestResult.t -> unit 
-
-Callback executed after each test has been run. - f name cell res means test cell, named name, gave res
-
- - -
val check_cell : ?call:'a callback ->
?rand:Random.State.t -> 'a cell -> 'a QCheck.TestResult.t
-check ~rand test generates up to count random - values of type 'a using arbitrary and the random state st. The - predicate law is called on them and if it returns false or raises an - exception then we have a counter example for the law.
-Returns the result of the test
-
-
call : function called on each test case, with the result
- -
val check_cell_exn : ?call:'a callback ->
?rand:Random.State.t -> 'a cell -> unit
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
-Raises -
- -
val check_exn : ?rand:Random.State.t -> t -> unit
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result.
-Raises -
- \ No newline at end of file diff --git a/docs/0.5/QCheck.TestResult.html b/docs/0.5/QCheck.TestResult.html deleted file mode 100644 index e8ff12987d70bb72a7542b558521c6295f03deef..0000000000000000000000000000000000000000 --- a/docs/0.5/QCheck.TestResult.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - - - -QCheck.TestResult - - - -

Module QCheck.TestResult

- -
module TestResult: sig .. end

- -
type 'a counter_ex = {
- - - - - - - - - -
-   -instance : 'a;(*
-The counter-example(s)
-
-
*)
-   -shrink_steps : int;(*
-How many shrinking steps for this counterex
-
-
*)
-} - - - -
type 'a failed_state = 'a counter_ex list 
- - -
type 'a state = 
- - - - - - - - - - - - - - -
-| -Success
-| -Failed of 'a failed_state(*
-Failed instances
-
-
*)
-| -Error of 'a counter_ex * exn(*
-Error, and instance that triggered it
-
-
*)
- - - -
type 'a t = {
- - - - - - - - - - - - - - - - - - - -
-   -mutable state : 'a state;
-   -mutable count : int;
-   -mutable count_gen : int;
-   -collect_tbl : (string, int) Hashtbl.t lazy_t;
-} - - - \ No newline at end of file diff --git a/docs/0.5/QCheck.html b/docs/0.5/QCheck.html deleted file mode 100644 index a97490c56644685845b86bb7c4204099cfa9fb72..0000000000000000000000000000000000000000 --- a/docs/0.5/QCheck.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - - - - - - - - - - - - -QCheck - - - -

Module QCheck

- -
module QCheck: sig .. end
-

Quickcheck inspired property-based testing


-
-
-
-The library takes inspiration from Haskell's QuickCheck library. The -rough idea is that the programer describes invariants that values of -a certain type need to satisfy ("properties"), as functions from this type -to bool. She also needs to desribe how to generate random values of the type, -so that the property is tried and checked on a number of random instances. -

- -This explains the organization of this module: -

-

- - -Examples: -

-

- -
let test =
-  QCheck.(Test.make ~count:1000
-   (list int) (fun l -> List.rev (List.rev l) = l));;
-
-QCheck.Test.run_exn test;;
-
-

-

- -
let test = QCheck.(
-  Test.make
-    ~count:10_000 ~max_fail:3
-    (list small_int)
-    (fun l -> l = List.sort compare l));;
-QCheck.Test.check_exn test;;
-
-

-

- -
type tree = Leaf of int | Node of tree * tree
-
-let leaf x = Leaf x
-let node x y = Node (x,y)
-
-let g = QCheck.Gen.(sized @@ fix
-  (fun self n -> match n with
-    | 0 -> map leaf nat
-    | n ->
-      frequency
-        [1, map leaf nat;
-         2, map2 node (self (n/2)) (self (n/2))]
-    ))
-
-Gen.generate ~n:20 g;;
-
-

- -More complex and powerful combinators can be found in Gabriel Scherer's -Generator module. Its documentation can be found - here.
- -

val (==>) : bool -> bool -> bool
-b1 ==> b2 is the logical implication b1 => b2 - ie not b1 || b2 (except that it is strict and will interact - better with QCheck.Test.check_exn and the likes, because they will know - the precondition was not satisfied.).
-
- -
module Gen: sig .. end
-Generate Random Values -
-
-

Pretty printing


- -
module Print: sig .. end
-Show Values -
- -
module Iter: sig .. end
-Iterators -
- -
module Shrink: sig .. end
-Shrink Values -
-
-

Arbitrary

-

- - A value of type 'a arbitrary glues together a random generator, - and optional functions for shrinking, printing, computing the size, - etc. It is the "normal" way of describing how to generate - values of a given type, to be then used in tests (see QCheck.Test)
- -

type 'a arbitrary = {
- - - - - - - - - - - - - - - - - - - - - - - - -
-   -gen : 'a Gen.t;
-   -print : ('a -> string) option;(*
-print values
-
-
*)
-   -small : ('a -> int) option;(*
-size of example
-
-
*)
-   -shrink : 'a Shrink.t option;(*
-shrink to smaller examples
-
-
*)
-   -collect : ('a -> string) option;(*
-map value to tag, and group by tag
-
-
*)
-} - -
-a value of type 'a arbitrary is an object with a method for generating random - values of type 'a, and additional methods to compute the size of values, - print them, and possibly shrink them into smaller counterexamples -

- - NOTE the collect field is unstable and might be removed, or - moved into QCheck.Test.
-

- - -
val make : ?print:'a Print.t ->
?small:('a -> int) ->
?shrink:'a Shrink.t ->
?collect:('a -> string) -> 'a Gen.t -> 'a arbitrary
-Builder for arbitrary. Default is to only have a generator, but other - arguments can be added
-
- -
val set_print : 'a Print.t -> 'a arbitrary -> 'a arbitrary
-
val set_small : ('a -> int) -> 'a arbitrary -> 'a arbitrary
-
val set_shrink : 'a Shrink.t -> 'a arbitrary -> 'a arbitrary
-
val set_collect : ('a -> string) -> 'a arbitrary -> 'a arbitrary
-
val choose : 'a arbitrary list -> 'a arbitrary
-Choose among the given list of generators. The list must not - be empty; if it is Invalid_argument is raised.
-
- -
val unit : unit arbitrary
-always generates (), obviously.
-
- -
val bool : bool arbitrary
-uniform boolean generator
-
- -
val float : float arbitrary

-generates regular floats (no nan and no infinities)
- -
val pos_float : float arbitrary
-positive float generator (no nan and no infinities)
-
- -
val neg_float : float arbitrary
-negative float generator (no nan and no infinities)
-
- -
val int : int arbitrary
-int generator. Uniformly distributed
-
- -
val int_bound : int -> int arbitrary
-int_bound n is uniform between 0 and n included
-
- -
val int_range : int -> int -> int arbitrary
-int_range a b is uniform between a and b included. b must be - larger than a.
-
- -
val (--) : int -> int -> int arbitrary
-Synonym to QCheck.int_range
-
- -
val int32 : int32 arbitrary
-int32 generator. Uniformly distributed
-
- -
val int64 : int64 arbitrary
-int generator. Uniformly distributed
-
- -
val pos_int : int arbitrary
-positive int generator. Uniformly distributed
-
- -
val small_int : int arbitrary
-positive int generator. The probability that a number is chosen - is roughly an exponentially decreasing function of the number.
-
- -
val small_int_corners : unit -> int arbitrary
-As small_int, but each newly created generator starts with - a list of corner cases before falling back on random generation.
-
- -
val neg_int : int arbitrary
-negative int generator. The distribution is similar to that of - small_int, not of pos_int.
-
- -
val char : char arbitrary
-Uniformly distributed on all the chars (not just ascii or - valid latin-1)
-
- -
val printable_char : char arbitrary

-uniformly distributed over a subset of chars
- -
val numeral_char : char arbitrary
-uniformy distributed over '0'..'9'
-
- -
val string_gen_of_size : int Gen.t -> char Gen.t -> string arbitrary
-
val string_gen : char Gen.t -> string arbitrary
-generates strings with a distribution of length of small_int
-
- -
val string : string arbitrary
-generates strings with a distribution of length of small_int - and distribution of characters of char
-
- -
val small_string : string arbitrary
-Same as QCheck.string but with a small length (that is, 0--10)
-
- -
val string_of_size : int Gen.t -> string arbitrary
-generates strings with distribution of characters if char
-
- -
val printable_string : string arbitrary
-generates strings with a distribution of length of small_int - and distribution of characters of printable_char
-
- -
val printable_string_of_size : int Gen.t -> string arbitrary
-generates strings with distribution of characters of printable_char
-
- -
val small_printable_string : string arbitrary
-
val numeral_string : string arbitrary
-generates strings with a distribution of length of small_int - and distribution of characters of numeral_char
-
- -
val numeral_string_of_size : int Gen.t -> string arbitrary
-generates strings with a distribution of characters of numeral_char
-
- -
val list : 'a arbitrary -> 'a list arbitrary
-generates lists with length generated by small_int
-
- -
val list_of_size : int Gen.t -> 'a arbitrary -> 'a list arbitrary
-generates lists with length from the given distribution
-
- -
val array : 'a arbitrary -> 'a array arbitrary
-generates arrays with length generated by small_int
-
- -
val array_of_size : int Gen.t -> 'a arbitrary -> 'a array arbitrary
-generates arrays with length from the given distribution
-
- -
val pair : 'a arbitrary -> 'b arbitrary -> ('a * 'b) arbitrary
-combines two generators into a generator of pairs
-
- -
val triple : 'a arbitrary ->
'b arbitrary -> 'c arbitrary -> ('a * 'b * 'c) arbitrary
-combines three generators into a generator of 3-uples
-
- -
val option : 'a arbitrary -> 'a option arbitrary
-choose between returning Some random value, or None
-
- -
val fun1 : 'a arbitrary -> 'b arbitrary -> ('a -> 'b) arbitrary
-generator of functions of arity 1. - The functions are always pure and total functions: -
-
- -
val fun2 : 'a arbitrary ->
'b arbitrary ->
'c arbitrary -> ('a -> 'b -> 'c) arbitrary
-generator of functions of arity 2. The remark about fun1 also apply - here.
-
- -
val oneofl : ?print:'a Print.t ->
?collect:('a -> string) -> 'a list -> 'a arbitrary
-Pick an element randomly in the list
-
- -
val oneofa : ?print:'a Print.t ->
?collect:('a -> string) -> 'a array -> 'a arbitrary
-Pick an element randomly in the array
-
- -
val oneof : 'a arbitrary list -> 'a arbitrary
-Pick a generator among the list, randomly
-
- -
val always : ?print:'a Print.t -> 'a -> 'a arbitrary
-Always return the same element
-
- -
val frequency : ?print:'a Print.t ->
?small:('a -> int) ->
?shrink:'a Shrink.t ->
?collect:('a -> string) ->
(int * 'a arbitrary) list -> 'a arbitrary
-Similar to QCheck.oneof but with frequencies
-
- -
val frequencyl : ?print:'a Print.t ->
?small:('a -> int) -> (int * 'a) list -> 'a arbitrary
-Same as QCheck.oneofl, but each element is paired with its frequency in - the probability distribution (the higher, the more likely)
-
- -
val frequencya : ?print:'a Print.t ->
?small:('a -> int) -> (int * 'a) array -> 'a arbitrary
-Same as QCheck.frequencyl, but with an array
-
- -
val map : ?rev:('b -> 'a) -> ('a -> 'b) -> 'a arbitrary -> 'b arbitrary
-map f a returns a new arbitrary instance that generates values using - a#gen and then transforms them through f.
-
-
rev : if provided, maps values back to type 'a so that the printer, - shrinker, etc. of a can be used. We assume f is monotonic in - this case (that is, smaller inputs are transformed into smaller outputs).
- -
val map_same_type : ('a -> 'a) -> 'a arbitrary -> 'a arbitrary
-Specialization of map when the transformation preserves the type, which - makes shrinker, printer, etc. still relevant
-
- -
val map_keep_input : ?print:'b Print.t ->
?small:('b -> int) ->
('a -> 'b) -> 'a arbitrary -> ('a * 'b) arbitrary
-map_keep_input f a generates random values from a, and maps them into - values of type 'b using the function f, but it also keeps the - original value. - For shrinking, it is assumed that f is monotonic and that smaller input - values will map into smaller values
-
-
print : optional printer for the f's output
-
-

Tests


- -
module TestResult: sig .. end
-
module Test: sig .. end
\ No newline at end of file diff --git a/docs/0.5/QCheck_runner.html b/docs/0.5/QCheck_runner.html deleted file mode 100644 index df5c028de9d070e4bd41c4452187234c21aeffee..0000000000000000000000000000000000000000 --- a/docs/0.5/QCheck_runner.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - -QCheck_runner - - - -

Module QCheck_runner

- -
module QCheck_runner: sig .. end
-

Runners for Tests


-
-
-
-

State


- -
val random_state : unit -> Random.State.t
-Access the current random state
-
- -
val verbose : unit -> bool
-Is the default mode verbose or quiet?
-
- -
val set_seed : int -> unit
-Change the QCheck_runner.random_state by creating a new one, initialized with - the given seed.
-
- -
val set_verbose : bool -> unit
-Change the value of verbose ()
-
-
-

Conversion of tests to OUnit Tests


- -
val to_ounit_test : ?verbose:bool -> ?rand:Random.State.t -> QCheck.Test.t -> OUnit.test
-to_ounit_test ~rand t wraps t into a OUnit test
-
-
verbose : used to print information on stdout (default: verbose())
-
rand : the random generator to use (default: random_state ())
- -
val to_ounit_test_cell : ?verbose:bool -> ?rand:Random.State.t -> 'a QCheck.Test.cell -> OUnit.test
-Same as QCheck_runner.to_ounit_test but with a polymorphic test cell
-
- -
val (>:::) : string -> QCheck.Test.t list -> OUnit.test
-Same as OUnit.>::: but with a list of QCheck tests
-
- -
val to_ounit2_test : ?rand:Random.State.t -> QCheck.Test.t -> OUnit2.test
-to_ounit2_test ?rand t wraps t into a OUnit2 test
-
-
rand : the random generator to use (default: a static seed for reproducibility), - can be overridden with "-seed" on the command-line
- -
val to_ounit2_test_list : ?rand:Random.State.t -> QCheck.Test.t list -> OUnit2.test list
-to_ounit2_test_list ?rand t like to_ounit2_test but for a list of tests
-
-
-

OUnit runners


- -
val run : ?argv:string array -> OUnit.test -> int
-run test runs the test, and returns an error code that is 0 - if all tests passed, 1 otherwise. - This is the default runner used by the comment-to-test generator.
-Raises -
-
argv : the command line arguments to parse parameters from (default Sys.argv)
- -
val run_tap : OUnit.test -> OUnit.test_results
-TAP-compatible test runner, in case we want to use a test harness. - It prints one line per test.
-
-
-

Run a Suite of Tests and Get Results


- -
val run_tests : ?verbose:bool ->
?out:Pervasives.out_channel ->
?rand:Random.State.t -> QCheck.Test.t list -> int
-Run a suite of tests, and print its results. This is an heritage from - the "qcheck" library.
-Returns an error code, 0 if all tests passed, 1 otherwise.
-
-
verbose : if true, prints more information about test cases
- -
val run_tests_main : ?argv:string array -> QCheck.Test.t list -> 'a
-Can be used as the main function of a test file. Exits with a non-0 code - if the tests fail. It refers to QCheck_runner.run_tests for actually running tests - after CLI options have been parsed. -

- - The available options are: -

-

-
-
- \ No newline at end of file diff --git a/docs/0.5/html.stamp b/docs/0.5/html.stamp deleted file mode 100644 index 25c57a39d6fd95881427d7b65ed8dc713c8f276a..0000000000000000000000000000000000000000 --- a/docs/0.5/html.stamp +++ /dev/null @@ -1 +0,0 @@ -64b8e519d41052b52750a5a17dbc8709 \ No newline at end of file diff --git a/docs/0.5/index.html b/docs/0.5/index.html deleted file mode 100644 index 10965bb1364d27f2aa809532e911a953c6d8dc69..0000000000000000000000000000000000000000 --- a/docs/0.5/index.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - -

- -

- - - -
QCheck
-Quickcheck inspired property-based testing -
-
QCheck_runner
-Runners for Tests -
-
- - \ No newline at end of file diff --git a/docs/0.5/index_attributes.html b/docs/0.5/index_attributes.html deleted file mode 100644 index e1f0a8508332f8bc0eb5c979d596a553f62e5954..0000000000000000000000000000000000000000 --- a/docs/0.5/index_attributes.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of class attributes - - - -

Index of class attributes

- -
- - \ No newline at end of file diff --git a/docs/0.5/index_class_types.html b/docs/0.5/index_class_types.html deleted file mode 100644 index a9205d15d3f25acb9d1ac9e61ff2ddd8facd3c93..0000000000000000000000000000000000000000 --- a/docs/0.5/index_class_types.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of class types - - - -

Index of class types

- -
- - \ No newline at end of file diff --git a/docs/0.5/index_classes.html b/docs/0.5/index_classes.html deleted file mode 100644 index dedec69ab28c30776557e9a13a9ad02df6f08278..0000000000000000000000000000000000000000 --- a/docs/0.5/index_classes.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of classes - - - -

Index of classes

- -
- - \ No newline at end of file diff --git a/docs/0.5/index_exceptions.html b/docs/0.5/index_exceptions.html deleted file mode 100644 index 0e3cf90c958d7d2e946fc2be09b39e0ffe2172a6..0000000000000000000000000000000000000000 --- a/docs/0.5/index_exceptions.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - -Index of exceptions - - - -

Index of exceptions

- - - - - - -

T
Test_error [QCheck.Test]
-Exception raised when a test raised an exception e, with - the sample that triggered the exception. -
-
Test_fail [QCheck.Test]
-Exception raised when a test failed, with the list of counter-examples. -
-
- - \ No newline at end of file diff --git a/docs/0.5/index_extensions.html b/docs/0.5/index_extensions.html deleted file mode 100644 index 5b7d02e7e16eb78daa592beaa56f56dcb55ababd..0000000000000000000000000000000000000000 --- a/docs/0.5/index_extensions.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of extensions - - - -

Index of extensions

- -
- - \ No newline at end of file diff --git a/docs/0.5/index_methods.html b/docs/0.5/index_methods.html deleted file mode 100644 index f03dc720c3d6534e84dcfe41d1c5c75677318889..0000000000000000000000000000000000000000 --- a/docs/0.5/index_methods.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of class methods - - - -

Index of class methods

- -
- - \ No newline at end of file diff --git a/docs/0.5/index_module_types.html b/docs/0.5/index_module_types.html deleted file mode 100644 index 2f0fec4eab1f8f34b016f85594d1803e5981a211..0000000000000000000000000000000000000000 --- a/docs/0.5/index_module_types.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - -Index of module types - - - -

Index of module types

- -
- - \ No newline at end of file diff --git a/docs/0.5/index_modules.html b/docs/0.5/index_modules.html deleted file mode 100644 index 73c9e8cb432ebd26e57a6aae8189389bf5306bd3..0000000000000000000000000000000000000000 --- a/docs/0.5/index_modules.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - -Index of modules - - - -

Index of modules

- - - - - - - - - - - - - - - - - - - - - - - -

G
Gen [QCheck]
-Generate Random Values -
-

I
Iter [QCheck]
-Iterators -
-

P
Print [QCheck]
-Show Values -
-

Q
QCheck
-Quickcheck inspired property-based testing -
-
QCheck_runner
-Runners for Tests -
-

S
Shrink [QCheck]
-Shrink Values -
-

T
Test [QCheck]
TestResult [QCheck]
- - \ No newline at end of file diff --git a/docs/0.5/index_types.html b/docs/0.5/index_types.html deleted file mode 100644 index 02eec9901c4f1ba246ba86bf3e0c90a53fd530cb..0000000000000000000000000000000000000000 --- a/docs/0.5/index_types.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - -Index of types - - - -

Index of types

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

A
arbitrary [QCheck]
-a value of type 'a arbitrary is an object with a method for generating random - values of type 'a, and additional methods to compute the size of values, - print them, and possibly shrink them into smaller counterexamples -
-

C
callback [QCheck.Test]
-Callback executed after each test has been run. -
-
cell [QCheck.Test]
-A single property test -
-
counter_ex [QCheck.TestResult]

F
failed_state [QCheck.TestResult]

S
sized [QCheck.Gen]
-Random generator with a size bound -
-
state [QCheck.TestResult]

T
t [QCheck.Test]
t [QCheck.TestResult]
t [QCheck.Shrink]
-Given a counter-example, return an iterator on smaller versions - of the counter-example -
-
t [QCheck.Iter]
t [QCheck.Print]
t [QCheck.Gen]
-A random generator for values of type 'a -
-
- - \ No newline at end of file diff --git a/docs/0.5/index_values.html b/docs/0.5/index_values.html deleted file mode 100644 index 3dc19008ffb05672cca0a3990dc57b2b8b6a6a11..0000000000000000000000000000000000000000 --- a/docs/0.5/index_values.html +++ /dev/null @@ -1,652 +0,0 @@ - - - - - - - - - - - -Index of values - - - -

Index of values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(--) [QCheck.Gen]
-Synonym to QCheck.Gen.int_range -
-
(--) [QCheck]
-Synonym to QCheck.int_range -
-
(<*>) [QCheck.Iter]
(<*>) [QCheck.Gen]
(<+>) [QCheck.Iter]
-Synonym to QCheck.Iter.append -
-
(==>) [QCheck]
-b1 ==> b2 is the logical implication b1 => b2 - ie not b1 || b2 (except that it is strict and will interact - better with QCheck.Test.check_exn and the likes, because they will know - the precondition was not satisfied.). -
-
(>:::) [QCheck_runner]
-Same as OUnit.>::: but with a list of QCheck tests -
-
(>>=) [QCheck.Iter]
(>>=) [QCheck.Gen]
(>|=) [QCheck.Iter]
(>|=) [QCheck.Gen]

A
always [QCheck]
-Always return the same element -
-
append [QCheck.Iter]
array [QCheck.Shrink]
-Shrink an array. -
-
array [QCheck.Print]
array [QCheck.Gen]
array [QCheck]
-generates arrays with length generated by small_int -
-
array_of_size [QCheck]
-generates arrays with length from the given distribution -
-
array_repeat [QCheck.Gen]
array_size [QCheck.Gen]

B
bool [QCheck.Print]
bool [QCheck.Gen]
bool [QCheck]
-uniform boolean generator -
-

C
char [QCheck.Print]
char [QCheck.Gen]
char [QCheck]
-Uniformly distributed on all the chars (not just ascii or - valid latin-1) -
-
check_cell [QCheck.Test]
-check ~rand test generates up to count random - values of type 'a using arbitrary and the random state st. -
-
check_cell_exn [QCheck.Test]
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result. -
-
check_exn [QCheck.Test]
-Same as QCheck.Test.check_cell but calls QCheck.Test.check_result on the result. -
-
check_result [QCheck.Test]
-check_result cell res checks that res is Ok _, and returns unit. -
-
choose [QCheck]
-Choose among the given list of generators. -
-
comap [QCheck.Print]

E
empty [QCheck.Iter]

F
find [QCheck.Iter]
fix [QCheck.Gen]
-Fixpoint; size decreases -
-
float [QCheck.Print]
float [QCheck.Gen]
float [QCheck]
frequency [QCheck.Gen]
frequency [QCheck]
-Similar to QCheck.oneof but with frequencies -
-
frequencya [QCheck.Gen]
frequencya [QCheck]
-Same as QCheck.frequencyl, but with an array -
-
frequencyl [QCheck.Gen]
frequencyl [QCheck]
-Same as QCheck.oneofl, but each element is paired with its frequency in - the probability distribution (the higher, the more likely) -
-
fun1 [QCheck]
-generator of functions of arity 1. -
-
fun2 [QCheck]
-generator of functions of arity 2. -
-

G
generate [QCheck.Gen]
-generate ~n g generates n instances of g -
-
generate1 [QCheck.Gen]
-generate1 g generates one instance of g -
-
get_arbitrary [QCheck.Test]
get_law [QCheck.Test]
get_name [QCheck.Test]

I
int [QCheck.Shrink]
int [QCheck.Print]
int [QCheck.Gen]
-uniform int -
-
int [QCheck]
-int generator. -
-
int32 [QCheck]
-int32 generator. -
-
int64 [QCheck]
-int generator. -
-
int_bound [QCheck.Gen]
-Uniform within 0... bound -
-
int_bound [QCheck]
-int_bound n is uniform between 0 and n included -
-
int_range [QCheck.Gen]
-Uniform within low,high -
-
int_range [QCheck]
-int_range a b is uniform between a and b included. -
-

J
join [QCheck.Gen]
-
-

L
list [QCheck.Shrink]
-Try to shrink lists by removing elements one by one. -
-
list [QCheck.Print]
list [QCheck.Gen]
list [QCheck]
-generates lists with length generated by small_int -
-
list_of_size [QCheck]
-generates lists with length from the given distribution -
-
list_repeat [QCheck.Gen]
list_size [QCheck.Gen]

M
make [QCheck.Test]
-make arb prop builds a test that checks property prop on instances - of the generator arb. -
-
make [QCheck]
-Builder for arbitrary. -
-
make_cell [QCheck.Test]
-make arb prop builds a test that checks property prop on instances - of the generator arb. -
-
map [QCheck.Iter]
map [QCheck.Gen]
map [QCheck]
-map f a returns a new arbitrary instance that generates values using - a#gen and then transforms them through f. -
-
map2 [QCheck.Iter]
map2 [QCheck.Gen]
map3 [QCheck.Gen]
map_keep_input [QCheck.Gen]
map_keep_input [QCheck]
-map_keep_input f a generates random values from a, and maps them into - values of type 'b using the function f, but it also keeps the - original value. -
-
map_same_type [QCheck]
-Specialization of map when the transformation preserves the type, which - makes shrinker, printer, etc. -
-

N
nat [QCheck.Gen]
-small nat -
-
neg_float [QCheck]
-negative float generator (no nan and no infinities) -
-
neg_int [QCheck.Gen]
-negative int -
-
neg_int [QCheck]
-negative int generator. -
-
nfloat [QCheck.Gen]
-negative float -
-
nil [QCheck.Shrink]
-No shrink -
-
numeral [QCheck.Gen]
numeral_char [QCheck]
-uniformy distributed over '0'..'9' -
-
numeral_string [QCheck]
-generates strings with a distribution of length of small_int - and distribution of characters of numeral_char -
-
numeral_string_of_size [QCheck]
-generates strings with a distribution of characters of numeral_char -
-

O
of_array [QCheck.Iter]
of_list [QCheck.Iter]
oneof [QCheck.Gen]
oneof [QCheck]
-Pick a generator among the list, randomly -
-
oneofa [QCheck.Gen]
oneofa [QCheck]
-Pick an element randomly in the array -
-
oneofl [QCheck.Gen]
oneofl [QCheck]
-Pick an element randomly in the list -
-
opt [QCheck.Gen]
option [QCheck.Shrink]
option [QCheck.Print]
option [QCheck]
-choose between returning Some random value, or None -
-

P
pair [QCheck.Shrink]
pair [QCheck.Iter]
pair [QCheck.Print]
pair [QCheck.Gen]
pair [QCheck]
-combines two generators into a generator of pairs -
-
pfloat [QCheck.Gen]
-positive float -
-
pint [QCheck.Gen]
-positive uniform int -
-
pos_float [QCheck]
-positive float generator (no nan and no infinities) -
-
pos_int [QCheck]
-positive int generator. -
-
print_c_ex [QCheck.Test]
print_error [QCheck.Test]
print_fail [QCheck.Test]
print_instance [QCheck.Test]
print_test_error [QCheck.Test]
print_test_fail [QCheck.Test]
printable [QCheck.Gen]
printable_char [QCheck]
printable_string [QCheck]
-generates strings with a distribution of length of small_int - and distribution of characters of printable_char -
-
printable_string_of_size [QCheck]
-generates strings with distribution of characters of printable_char -
-

Q
quad [QCheck.Print]
quad [QCheck.Gen]

R
random_state [QCheck_runner]
-Access the current random state -
-
return [QCheck.Iter]
return [QCheck.Gen]
run [QCheck_runner]
-run test runs the test, and returns an error code that is 0 - if all tests passed, 1 otherwise. -
-
run_tap [QCheck_runner]
-TAP-compatible test runner, in case we want to use a test harness. -
-
run_tests [QCheck_runner]
-Run a suite of tests, and print its results. -
-
run_tests_main [QCheck_runner]
-Can be used as the main function of a test file. -
-

S
set_collect [QCheck]
set_name [QCheck.Test]
set_print [QCheck]
set_seed [QCheck_runner]
-Change the QCheck_runner.random_state by creating a new one, initialized with - the given seed. -
-
set_shrink [QCheck]
set_small [QCheck]
set_verbose [QCheck_runner]
-Change the value of verbose () -
-
shuffle_a [QCheck.Gen]
-Shuffle the array in place -
-
shuffle_l [QCheck.Gen]
sized [QCheck.Gen]
sized_size [QCheck.Gen]
-
-
small_int [QCheck.Gen]
-Synonym to QCheck.Gen.nat -
-
small_int [QCheck]
-positive int generator. -
-
small_int_corners [QCheck