Re: Quickcheck
<graham <at> fatlazycat.com>
2012-11-13 21:52:17 GMT
Thanks, will try them both. With regards to the implication I assume
it's just regarded as one property test ?
To get two values greater than zero I have something like
prop_something x y = .......do blah with positive integers
==> x > 0 && y > 0
But my test fails as it appears to be injecting a negative number and
the test fails. But the implication does not cause the failed test to be
ignored.
Must be missing something ???
Thanks
On Mon, Nov 12, 2012, at 10:00 PM, Iustin Pop wrote:
> On Mon, Nov 12, 2012 at 10:14:30PM +0100, Simon Hengel wrote:
> > On Mon, Nov 12, 2012 at 07:21:06PM +0000, graham <at> fatlazycat.com wrote:
> > > Hi,
> > >
> > > Trying to find some good docs on QuickCheck, if anyone has one ?
> > >
> > > Been scanning what I can find, but a question.
> > >
> > > What would be the best way to generate two different/distinct integers ?
> >
> > I would use Quickcheck's implication operator here:
> >
> > quickCheck $ \x y -> x /= (y :: Int) ==> ...
(Continue reading)