samedi 21 novembre 2015

Hunit doens't run tests and hangs infinitely

I had a simple test

module CreditCardValidatorTest where
import CreditCardValidator
import Test.HUnit

testToDigit :: Test
testToDigit = TestCase(assertEqual "blalba" [1,2,5] (toDigits 123))

main :: IO Counts
main = runTestTT testToDigit

But when I run this test with runghc or loading this file to ghci and then executing runTestTT testToDigit manually all it prints out is

Cases: 1  Tried: 0  Errors: 0  Failures: 0

And then it hangs infinitely and I'm can't even close it with ctrl-c.

What am I doing wrong?

Aucun commentaire:

Enregistrer un commentaire