* QuickCheck for OCaml?
@ 2005-06-10 0:42 Christopher Campbell
2005-06-10 9:18 ` [Caml-list] " Fermin Reig
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christopher Campbell @ 2005-06-10 0:42 UTC (permalink / raw)
To: caml-list
Hi,
Are there any QuickCheck like tools for OCaml? Searched on google, but
nothing came up. There are unit testing libraries like OUnit, but I
haven't came across anything like QuickCheck yet.
Regards,
Chris Campbell
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] QuickCheck for OCaml?
2005-06-10 0:42 QuickCheck for OCaml? Christopher Campbell
@ 2005-06-10 9:18 ` Fermin Reig
2005-06-10 11:49 ` padiolea
2005-06-11 14:36 ` Christian Lindig
2 siblings, 0 replies; 4+ messages in thread
From: Fermin Reig @ 2005-06-10 9:18 UTC (permalink / raw)
To: caml-list; +Cc: Christopher Campbell
On Fri, 2005-06-10 at 01:42, Christopher Campbell wrote:
> Are there any QuickCheck like tools for OCaml? Searched on google, but
> nothing came up. There are unit testing libraries like OUnit, but I
> haven't came across anything like QuickCheck yet.
There's QuickCheck for SML:
http://contrapunctus.net/dist/qcheck/
And even for Erlang
http://www.cs.chalmers.se/~rjmh/ErlangQC/
These would be a good starting point for a port to OCaml.
Fermin
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] QuickCheck for OCaml?
2005-06-10 0:42 QuickCheck for OCaml? Christopher Campbell
2005-06-10 9:18 ` [Caml-list] " Fermin Reig
@ 2005-06-10 11:49 ` padiolea
2005-06-11 14:36 ` Christian Lindig
2 siblings, 0 replies; 4+ messages in thread
From: padiolea @ 2005-06-10 11:49 UTC (permalink / raw)
To: Christopher Campbell; +Cc: caml-list
> Hi,
>
> Are there any QuickCheck like tools for OCaml? Searched on google, but
> nothing came up. There are unit testing libraries like OUnit, but I
> haven't came across anything like QuickCheck yet.
I use this:
lfs.irisa.fr/~pad/hacks/quickcheck.ml
All you have to do is include this library and then put in your code
rules such as
let _ = assert
((Quickcheck.laws "rev" (fun xs -> reverse (reverse xs) = xs)
(Quickcheck.lg Quickcheck.ig)) = None)
the lg and ig functions are generators (list and integer generators).
By the way it also include a unit framework, but
it is just
let testunitframework b = assert b :)
that you use by writing for instance
let _ = testunitframework (List.map (fun x -> x +1) [1;2;3;4] = [2;3;4;5])
>
>
> Regards,
> Chris Campbell
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] QuickCheck for OCaml?
2005-06-10 0:42 QuickCheck for OCaml? Christopher Campbell
2005-06-10 9:18 ` [Caml-list] " Fermin Reig
2005-06-10 11:49 ` padiolea
@ 2005-06-11 14:36 ` Christian Lindig
2 siblings, 0 replies; 4+ messages in thread
From: Christian Lindig @ 2005-06-11 14:36 UTC (permalink / raw)
To: Christopher Campbell; +Cc: caml-list
Am 10.06.2005 um 02:42 schrieb Christopher Campbell:
> Are there any QuickCheck like tools for OCaml?
There is some code derived from QuickCheck in my Quest tool which you
could use as a starting point. Quest generates C code for testing C
compilers and uses QuickCheck-like combinators to control the
statistical distribution of the code generated.
http://www.st.cs.uni-sb.de/~lindig/src/quest/index.html
-- Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-06-11 14:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-10 0:42 QuickCheck for OCaml? Christopher Campbell
2005-06-10 9:18 ` [Caml-list] " Fermin Reig
2005-06-10 11:49 ` padiolea
2005-06-11 14:36 ` Christian Lindig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox