Distribution.TestSuite.QuickCheck的进度输出

时间:2015-02-20 09:24:12

标签: haskell testing quickcheck

我正在使用Distribution.TestSuite.QuickCheck通过cabal test运行QuickCheck测试。我的测试模块导出一个单一的定义:

module MOS6502.Tests.Main (tests) where

import Distribution.TestSuite.QuickCheck as QC

import MOS6502.Tests
import MOS6502.Tests.Framework

tests :: IO [QC.Test]
tests = return [ testProperty (testLabel test) (runTest test) | test <- allTests ]

每当我测试失败时,我都会获得我期望的输出,例如

Running 1 test suites...
Test suite tests: RUNNING...
Test case BEQ: Fail "(after 91 tests): Branch correctly taken"
Test case BNE: Pass
Test case BVS: Fail "(after 75 tests): Branch correctly taken"
Test case JMP abs: Fail "(after 1 test): PC"
Test case JMP ind: Fail "(after 1 test): PC"
Test case STA zp: Pass
Test case STA zp,X: Pass
Test case STA abs: Pass
Test case STA abs,X: Pass
Test case STA abs,Y: Pass
Test case STA (zp,X): Pass
Test case STA (zp),Y: Pass
Test suite tests: FAIL
Test suite logged to: dist/test/mos6502-kansas-lava-0.0.0.0-tests.log
0 of 1 test suites (8 of 12 test cases) passed.

然而,当测试运行时,我没有输出(当所有测试都通过时,我也只得到最小的输出)。

有没有办法让cabal test打印出这些Test case Foo消息,让我了解进度?

1 个答案:

答案 0 :(得分:0)

尝试

cabal test --show-details=always

(有关详细信息,请参阅Cabal User Guide