This is just a quick announcement that the development version of QuickCheck 2 is now available in a public darcs repository. Some highlights: - Shrinks failing test cases. - Supports testing monadic code. - Handles exceptions gracefully. - coarbitrary has moved to a separate class, to make it easier to write simple instances of Arbitrary. - Type-level modifiers for changing test data generation (e.g. NonNegative). - Magic function table printing. - User-defined actions when properties fail. You can get it with: darcs get http://www.cs.chalmers.se/~bringert/darcs/QuickCheck/ This is a development version, and the API is not necessarily stable yet. It uses the same module names as QuickCheck 1, Test.QuickCheck.*, but it breaks backwards compatibility in many cases. Use explicit package versioning if you need to use it alongside QuickCheck 1. You can build the code and API documentation with Cabal, see README for instructions. Happy hacking! Koen & Björn
在 Nov 24, 2006 9:29 PM 時,Björn Bringert 寫到:
This is just a quick announcement that the development version of QuickCheck 2 is now available in a public darcs repository.
Some highlights: - Shrinks failing test cases. - Supports testing monadic code.
Wonderful. Many thanks for QC2! :-) By the way, since Positive is a type synonym, the StrictlyMonotonicFunction instance should perhaps be: instance Arbitrary StrictlyMonotonicFunction where arbitrary = StrictlyMonotonic `fmap` arbMonotonicFunction (\ (NonZero (NonNegative x)) -> x) instead of: instance Arbitrary StrictlyMonotonicFunction where arbitrary = StrictlyMonotonic `fmap` arbMonotonicFunction (\ (Positive x) -> x) Thanks, Audrey
On 24 nov 2006, at 22.04, Audrey Tang wrote:
在 Nov 24, 2006 9:29 PM 時,Björn Bringert 寫到:
This is just a quick announcement that the development version of QuickCheck 2 is now available in a public darcs repository.
Some highlights: - Shrinks failing test cases. - Supports testing monadic code.
Wonderful. Many thanks for QC2! :-)
Thank Koen.
By the way, since Positive is a type synonym, the StrictlyMonotonicFunction instance should perhaps be:
instance Arbitrary StrictlyMonotonicFunction where arbitrary = StrictlyMonotonic `fmap` arbMonotonicFunction (\ (NonZero (NonNegative x)) -> x)
instead of:
instance Arbitrary StrictlyMonotonicFunction where arbitrary = StrictlyMonotonic `fmap` arbMonotonicFunction (\ (Positive x) -> x)
Oops, thanks. How did I manage to push the change to Positive without building? Now let's move any discussion about my silly mistakes off this list. /Björn
participants (3)
-
Audrey Tang -
Bjorn Bringert -
Björn Bringert