Can ScalaCheck/Specs warnings safely be ignored when using SBT with ScalaTest?
I have a simple FunSuite-based ScalaTest: package pdbartlett.hello_sbt import org.scalatest.FunSuite class SanityTest extends FunSuite { ...
I have a simple FunSuite-based ScalaTest: package pdbartlett.hello_sbt import org.scalatest.FunSuite class SanityTest extends FunSuite { ...
scala Welcome to Scala version 2.8.0.final (Java HotSpot(TM) Client VM, Java 1.6.0_20). Type in expressions to have them evaluated. Type :help for more information. scala> import org.scalacheck.Prop.forAll error: error while loading Prop, Scala signature Prop has wrong version expected: 5.0 found:...
In scalacheck's user guide there is "Generating Case Classes" paragraph. I modified example from it to use regular classes instead of case classes: import org.scalacheck._ import Gen._ import Arbitrary._ sealed abstract class Tree object Leaf extends Tree class Node(left:Tree, rigth:Tree, v:Int) extends Tree object Main { val genLe...
UserGuide of scalacheck project mentioned sized generators. The explanation code def matrix[T](g:Gen[T]):Gen[Seq[Seq[T]]] = Gen.sized {size => val side = scala.Math.sqrt(size).asInstanceOf[Int] //little change to prevent compile-time exception Gen.vectorOf(side, Gen.vectorOf(side, g)) } explained nothing for me. After some explorat...
I'm trying to use specs mathers inside scalacheck properties. For example, I have a matcher that works like this: x must matchMyMatcher(y) When I want to use this matcher inside scalacheck property, I do the following: import org.scalacheck._ import org.specs._ ... val prop = Prop.forAll(myGen){ (x,y) => new matchMyMatcher(x)(y)...