Nowak, what's the command to install a D package?
On Wed, 19 Oct 2011 08:18:02 +0200, Andrew Pennebaker <andrew.pennebaker@gmail.com> wrote:Yes it can.
Novak: Very cool. Can qcheck automatically figure out a way to generate the
arbitrary data types needed as input for the property/testee? Or did I read
that wrong?
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Tue, Oct 18, 2011 at 11:14 PM, Martin Nowak <dawg@dawgfoto.de> wrote:
The D version will be called dashcheck<https://github.com/**
mcandre/dashcheck <https://github.com/mcandre/dashcheck>>
http://www.digitalmars.com/d/**archives/digitalmars/D/**
QuickCheck is one of the good things of Haskell.
I have raised the topic few times:
QuickCheck-like_in_Phobos_**131256.html<http://www.digitalmars.com/d/archives/digitalmars/D/QuickCheck-like_in_Phobos_131256.html>
http://www.digitalmars.com/d/**archives/digitalmars/D/Re_**
Unit_Testing_for_D_._72154.**html<http://www.digitalmars.com/d/archives/digitalmars/D/Re_Unit_Testing_for_D_._72154.html>http://www.digitalmars.com/**webnews/newsgroups.php?art_**
I remember someone has already written one or two D versions of
QuickCheck-like (probably D1), but it didn't get a lot of interest in the D
newsgroups. One of them:
group=digitalmars.D&article_**id=73949<http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=73949>
Bye,
bearophile
https://github.com/dawgfoto/**qcheck <https://github.com/dawgfoto/qcheck>
I wrote a pretty complete port of Haskell's Quickcheck some month ago.
The main function quickcheck takes the testee as first template parameter
and a bunch of policies. It will use getArbitraryTuple to construct the
parameters
of the testee. It should be able to construct a random instance of any type
out of the box,
but you can also pass generators with the policies and they will be used
instead.
There is also a Policy RandomizeMembers which will set aggregate members to
random values
after construction.
The testee might return a boolean result or an enum QCheckResult which has
a third entry
QCheckResult.Reject.
martin