“cookbook” for converting from QuickCheck1 to QuickCheck2?

爷,独闯天下 提交于 2019-12-12 10:33:08

问题


Is there a cookbook available for converting from QuickCheck1 to QuickCheck2?

As some examples, defaultConfig (replaced by Args) and trivial were removed and CoArbitrary introduced.

I did read the what's new in QuickCheck 2 (with single answer ...).


回答1:


It appears that the author(s) of QuickCheck2 have not provided Release Notes which are typically used to answer questions like yours. Assuming (uh oh, we know what that means!) that the author(s) updated the API doc, you can compare it to the version you have, and the differences will give you your cookbook. As a last resort, you could compare the source code, but that would probably show more differences than you care about.




回答2:


I don't know of any such document -- which is a shame!

There was however at least one partial changelist posted to a mailinglist: http://osdir.com/ml/lang.haskell.general/2006-11/msg00060.html

The list given there includes:

  • Shrinks failing test cases.
  • Supports testing monadic code.
  • Handles exceptions gracefully.
  • coarbitrary has moved to a separate class, to make it easier to write simple instances of Arbitrary.
  • Type-level modifiers for changing test data generation (e.g. NonNegative).
  • Magic function table printing.
  • User-defined actions when properties fail.


来源:https://stackoverflow.com/questions/10712373/cookbook-for-converting-from-quickcheck1-to-quickcheck2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!