Created
June 30, 2015 11:54
-
-
Save gigiigig/c78d0b9d21334fbad509 to your computer and use it in GitHub Desktop.
Automatic generate random case classes with shapless-scalacheck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shapeless._, contrib.scalacheck._ | |
import org.scalacheck._ | |
import org.scalacheck.Properties | |
import org.scalacheck.Prop.forAll | |
object console extends Properties("ciao") { | |
case class Foo(i: Int, s: String) | |
property("some property about Foo") = { | |
forAll { foo: Foo => | |
println(s"foo: ${foo}") | |
1 == 1 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment