D
D
Daniil Kolesnichenko2015-11-11 22:20:09
Haskell
Daniil Kolesnichenko, 2015-11-11 22:20:09

Why does cabal test consider all tests passed?

I decided that even my small personal project is better to be done in a human way, including writing tests for it. Here is the Blabla.cabal snippet :

test-suite blabla-test
    main-is:            Test.hs
    hs-source-dirs:     tests, src
    build-depends:      base >=4 && < 5, parsec >= 3, HUnit >= 1
    type:               exitcode-stdio-1.0
    default-language:   Haskell2010

Here is tests/Test.hs :
import Test.HUnit
import Text.ParserCombinators.Parsec hiding (spaces)

-- src/Module1.hs, src/Module2.hs, ...
import Module1
import Module2

...

test1 = ...

test2 = ...

...

tests = TestList [test1, test2, ...]

main = runTestTT tests

I run cabal configure && cabal build && cabal test
Writes like blabla-test: PASSED
I go to the log file, there are lines:
### Failure in: 1
test1 description ...
expected: 1
 but got: 2

Why is the error only in the logs? Every time something to climb into them to check if the test is passed? Google did not help, did not find a single similar question on Stackoverflow
PS The test definitely should not pass, I wrote it wrong on purpose

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Shetani, 2015-11-11
@KolesnichenkoDS

Here is a similar problem running-cabal-test-passes-although-there-are-test-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question