a tiny bit of documentation

This commit is contained in:
Simon Cruanes 2013-09-28 12:49:09 +02:00
parent b4f3925a45
commit dd4bb3746e
2 changed files with 11 additions and 0 deletions

View file

@ -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), - `Bencode`, for the [B-encode format](http://en.wikipedia.org/wiki/Bencode),
- `Sexp`, for S-expressions. - `Sexp`, for S-expressions.
There is a QuickCheck-like library called `QCheck`.
## Use ## Use
You can either build and install the library (see `Build`), or just copy You can either build and install the library (see `Build`), or just copy

View file

@ -26,6 +26,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(** {6 Quickcheck inspired property-based testing} *) (** {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} *) (** {2 Description of how to generate arbitrary values for some type} *)
module Arbitrary : sig module Arbitrary : sig