From dd4bb3746e4df7aaf4a7325b187c9bad60d66277 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sat, 28 Sep 2013 12:49:09 +0200 Subject: [PATCH] a tiny bit of documentation --- README.md | 2 ++ qCheck.mli | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 7b44c808..910c30ce 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ in combination with Lwt/Async). Currently, the modules are: - `Bencode`, for the [B-encode format](http://en.wikipedia.org/wiki/Bencode), - `Sexp`, for S-expressions. +There is a QuickCheck-like library called `QCheck`. + ## Use You can either build and install the library (see `Build`), or just copy diff --git a/qCheck.mli b/qCheck.mli index ba7de508..5fef9711 100644 --- a/qCheck.mli +++ b/qCheck.mli @@ -26,6 +26,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (** {6 Quickcheck inspired property-based testing} *) +(** Examples: + + - Not all lists are sorted: + [QCheck.run ~n:10 ~pp:QCheck.PP.(list int) QCheck.Arbitrary.(list small_int) (fun l -> l = List.sort compare l);;] + + - List.rev is involutive: + [QCheck.run ~n:1000 QCheck.Arbitrary.(list alpha) (fun l -> List.rev (List.rev l) = l)] +*) + (** {2 Description of how to generate arbitrary values for some type} *) module Arbitrary : sig