I have a newbie question for ScalaCheck which I am playing around with for the first time.
Is it possible to create a Gen[Int]
which will progress linearly from say 0 to N.
Such that when I use forAll
in ScalaCheck it will increase the input Int
by 1.
I would like this example to test with an increasing value
"Increase" should "always increase" in {
forAll(validNumbers){ i:Int =>
increase(i) should be (i + 1)
}
}
Maybe this destroys ScalaChecks purpose and I should just test this way in ScalaTest.