In my tests, I am making quite wide use of Specs2 + ScalaCheck, and there are some patterns to consider. I still haven't figured out if my functions should use arbitrary [T] or Gen [T], since they are very similar:
sealed abstract class Arbitrary[T] {
val arbitrary: Gen[T]
}
Will the function signature look like this:
maxSizedIntervalArbitrary[A,B](implicit ordering:Ordering[A], genStart:Arbitrary[A], genEnd:Arbitrary[B]):Arbitrary[TreeMap[A,B]]
or should I work at the level of abstraction Gen?
source
share