我正在使用 Hspec 和 Quickcheck http://hspec.github.io/运行测试
提供的执行随机测试用例的示例是
it "returns the first element of an *arbitrary* list" $
property $ \x xs -> head (x:xs) == (x :: Int)
与相关的输出:
returns the first element of an *arbitrary* list
如何查看为测试生成的实际运行时值?因此,在上面的示例中,示例所需的输出将包括为 x 和 xs 传递的值,例如:
returns the first element of an *arbitrary* list
\x xy head (x:xs) == (x :: Int) with x = 'a' and xs = "bc" holds