Opened 7 years ago

Closed 4 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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Daniel Burrows <dburrows@…> in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=355215
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 7 years ago by igloo

  • Milestone set to Not GHC

comment:2 Changed 7 years ago by guest

  • Cc shelarcy@… added

QuickCheck? 2 has quickCheck' function. And that type is

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

http://darcs.haskell.org/QuickCheck/Test/QuickCheck/Test.hs

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.
http://article.gmane.org/gmane.comp.lang.haskell.general/14511

comment:3 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:4 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:5 Changed 4 years ago by igloo

  • Resolution set to invalid
  • Status changed from new to closed
  • Type of failure set to None/Unknown

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

Note: See TracTickets for help on using tickets.