You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In QuickCheck the programmer writes assertions about logical properties that a function should fulfill. Then QuickCheck attempts to generate test cases that falsify these assertions.<
The test cases are generated randomly, up to a certain length and complexity,
that can be specified.
In this enhancement request I suggest to consider using a QuickCheck-like tool
(like DashCheck) to test Phobos, and to better remove Phobos bugs. The
functions that specify the logical proprieties of the Phobos code should be
bundled inside the standard D distributions, like the unittests.
One side effect of shipping the D compiler with a QuickCheck-like tool (used
for Phobos, and later for the front-end written in D) is to encourage D
programmers to use such standard tool in their programs. I think this could
improve the quality of all D code, beyond Phobos.
Note: such testing functions are similar to the post-conditions. So in theory a
well implemented QuickCheck-like tool for D should use the post-conditions to
generate the test cases.
Comments
The text was updated successfully, but these errors were encountered:
braddr reported this on 2014-07-02T00:22:17Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=13014
CC List
Description
(Originally posted by bearophile_hugs@eml.cc)
QuickCheck is a testing tool widely used in Haskell:
http://www.haskell.org/haskellwiki/Introduction_to_QuickCheck1
http://en.wikipedia.org/wiki/QuickCheck
The test cases are generated randomly, up to a certain length and complexity,
that can be specified.
In Haskell there is also a similar tool, SmallCheck, that "allows to verify
properties for all test cases up to some depth", so its test cases are not
random, it's deterministic:
http://ro-che.info/articles/2013-02-19-smallcheck.html
https://github.com/feuerbach/smallcheck
There are QuickCheck-like tools for most languages, including D and C++:
https://github.com/mcandre/dashcheck
http://software.legiasoft.com/quickcheck/
In this enhancement request I suggest to consider using a QuickCheck-like tool
(like DashCheck) to test Phobos, and to better remove Phobos bugs. The
functions that specify the logical proprieties of the Phobos code should be
bundled inside the standard D distributions, like the unittests.
One side effect of shipping the D compiler with a QuickCheck-like tool (used
for Phobos, and later for the front-end written in D) is to encourage D
programmers to use such standard tool in their programs. I think this could
improve the quality of all D code, beyond Phobos.
Note: such testing functions are similar to the post-conditions. So in theory a
well implemented QuickCheck-like tool for D should use the post-conditions to
generate the test cases.
Comments
The text was updated successfully, but these errors were encountered: