You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining multiple classify conditions to collect statistics on a property, the currently available classify methods on Prop require nesting each classify call resulting in deeply nested code. A method that accepts a flat list of classify conditions would make it more pleasant to use. Something like (using Stream so we don't evaluate all conditions prematurely):
@scala.annotation.tailrec
def classify(conditions: Stream[(Boolean, Any, Any)])(prop: Prop): Prop = conditions match {
case Stream.Empty => prop
case h #:: Stream.Empty =>
if (h._1) collect(h._2)(prop) else collect(h._3)(prop)
case h #:: t =>
classify(t)(Prop.classify(h._1, h._2, h._3)(prop))
}
The text was updated successfully, but these errors were encountered:
@non In your talk about scalacheck you mention in one of the slides that we should pay attention to the distribution and range of generators. It would be useful to have tools to look at test case distribution on par with Haskell's QuickCheck tools such as cover and similar. checkCoverage looks useful as a better stopping criteria than choosing an arbitrary minSuccessfulTests.
When defining multiple classify conditions to collect statistics on a property, the currently available
classify
methods onProp
require nesting eachclassify
call resulting in deeply nested code. A method that accepts a flat list of classify conditions would make it more pleasant to use. Something like (using Stream so we don't evaluate all conditions prematurely):The text was updated successfully, but these errors were encountered: