Opened 10 years ago

Closed 7 years ago

#1594 closed feature request (invalid)

Better QuickCheck/HUnit integration

Reported by: igloo Owned by:
Priority: normal Milestone: Not GHC
Component: libraries (other) Version: 6.6.1
Keywords: Cc: shelarcy@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Daniel Burrows <dburrows@…> in requests:

Quickcheck and HUnit are both great tools for testing software, but it seems to be rather difficult to make them work together. In particular, since the signature of all the quickCheck interface functions is some variant on

Testable a => a -> IO ()

the only way to find out whether a test succeeded or failed is to read the terminal output. It would be ideal if QuickCheck could generate HUnit assertion failures when a test failed (maybe by expanding the Config structure with "failure hooks"), but even just changing its signature to either

Testable a => a -> IO Bool

returning True for success, or (slightly more ambitiously)

Testable a => a -> IO (Maybe String)

returning Nothing for success and an error message otherwise would be enough to get basic integration working.

Change History (5)

comment:1 Changed 10 years ago by igloo

Milestone: Not GHC

comment:2 Changed 10 years ago by guest

Cc: shelarcy@… added

QuickCheck 2 has quickCheck' function. And that type is

quickCheck' :: Testable prop => 
            -> IO Bool

I think better solution is that replacing QuickCheck by version 2.0.

But I don't know about QuickCheck 2's current status. It seems repositoy doesn't change since annoucing of QuickCheck 2.0 development version.

comment:3 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 7 years ago by igloo

Resolution: invalid
Status: newclosed
Type of failure: None/Unknown

Since GHC no longer comes with either library, I'm closing this ticket.

Note: See TracTickets for help on using tickets.