diff --git a/jvm/src/test/scala/org/scalacheck/GenSpecification.scala b/jvm/src/test/scala/org/scalacheck/GenSpecification.scala index 3605d8f76..e01dd283f 100644 --- a/jvm/src/test/scala/org/scalacheck/GenSpecification.scala +++ b/jvm/src/test/scala/org/scalacheck/GenSpecification.scala @@ -54,10 +54,15 @@ object GenSpecification extends Properties("Gen") { forAll(g) { n => true } } - property("frequency 3") = forAll(choose(0,100000)) { n => + property("frequency 3") = forAll(choose(1,100000)) { n => forAll(frequency(List.fill(n)((1,const(0))): _*)) { _ == 0 } } + property("frequency 4") = + Prop.throws(classOf[IllegalArgumentException]) { + frequency() + } + property("lzy") = forAll((g: Gen[Int]) => lzy(g) == g) property("wrap") = forAll((g: Gen[Int]) => delay(g) == g)