mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
a tiny bit of documentation
This commit is contained in:
parent
b4f3925a45
commit
dd4bb3746e
2 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue