"食谱"从QuickCheck1转换到QuickCheck2? [英] "cookbook" for converting from QuickCheck1 to QuickCheck2?

查看:101
本文介绍了"食谱"从QuickCheck1转换到QuickCheck2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可用于从QuickCheck1转换为QuickCheck2的食谱? defaultConfig a 替换为 Args )和微不足道的已被删除, CoArbrary 介绍。

我确实阅读了 QuickCheck 2中的新功能(单个答案.. 。)

解决方案

我不知道任何这样的文件 - 这是一种耻辱! p>

然而,至少有一个部分更改列表发布到邮件列表中: http://osdir.com/ml/lang.haskell.gener al / 2006-11 / msg00060.html



这里给出的列表包括:


  • 缩小失败的测试用例。

  • 支持测试一元代码。

  • 优雅地处理异常。
  • coarbitrary已经转移到一个单独的类中,以便编写简单的Arbitrary实例。
  • 用于更改测试数据生成的类型级修饰符(例如
  • 幻灯片功能表打印

  • 用户定义的属性失败操作


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 ...).

解决方案

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.

这篇关于"食谱"从QuickCheck1转换到QuickCheck2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆