我正在努力让这个基本的测试框架示例与 QuickCheck2 一起使用。由于示例使用 QuickCheck 1,我收到上面页面中提到的以下错误。我假设通常首选使用 QuickCheck2,但是如何将它与测试框架一起使用?
错误:
No instance for (QuickCheck-1.2.0.0:Test.QuickCheck.Testable
(Gen Prop))
提前致谢。
如果我导入 Test.Framework.Providers.QuickCheck2,我会收到以下错误:
del-me.hs:41:17:
No instance for (QuickCheck-2.5.1.1:Test.QuickCheck.Property.Testable
(Gen Prop))
arising from a use of `testProperty'
Possible fix:
add an instance declaration for
(QuickCheck-2.5.1.1:Test.QuickCheck.Property.Testable (Gen Prop))
In the expression: testProperty "sort2" prop_sort2
In the second argument of `testGroup', namely
`[testProperty "sort1" prop_sort1, testProperty "sort2" prop_sort2,
testProperty "sort3" prop_sort3]'
In the expression:
testGroup
"Sorting Group 1"
[testProperty "sort1" prop_sort1, testProperty "sort2" prop_sort2,
testProperty "sort3" prop_sort3]