I wonder why Arbitrary is needed because automated property testing requires property definition, like
val prop = forAll(v: T => check that property holds for v)
and value v generator. The user guide says that you can create custom generators for custom types (a generator for trees is exemplified). Yet, it does not explain why do you need arbitraries on top of that.
Secondly, it is curious how does arbitrary[Int]
convert argument type into generator. I feel that these are related questions.
Aucun commentaire:
Enregistrer un commentaire