[GHC] #476: HUnit treats failures as errors
GHC
trac at galois.com
Fri Mar 16 20:04:53 EDT 2007
#476: HUnit treats failures as errors
-------------------------------+--------------------------------------------
Reporter: stefanheimann | Owner: nobody
Type: bug | Status: assigned
Priority: normal | Milestone: Not GHC
Component: libraries (other) | Version: 6.4.1
Severity: normal | Resolution: None
Keywords: hunit | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
-------------------------------+--------------------------------------------
Changes (by AlecBerryman):
* keywords: => hunit
Comment:
It is still broken on Debian's haskell-hunit 1.1-3.
Sample ghci session:
{{{
*Main> :m +Test.HUnit
*Main Test.HUnit> let f = TestCase (assertBool "foo" True)
Loading package HUnit-1.1 ... linking ... done.
*Main Test.HUnit> runTestTT f
Cases: 1 Tried: 1 Errors: 0 Failures: 0
Counts {cases = 1, tried = 1, errors = 0, failures = 0}
*Main Test.HUnit> let g = TestCase (assertBool "foo" False)
*Main Test.HUnit> runTestTT g
### Error:
user error (HUnit:foo)
Cases: 1 Tried: 1 Errors: 1 Failures: 0
Counts {cases = 1, tried = 1, errors = 1, failures = 0}
}}}
Test 'f' should succeed, and it does. Test 'g' should fail, but instead
returns an error.
I have not tested the patch.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/476>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list