Last active
August 29, 2015 14:11
-
-
Save noelmarkham/021040558016f517199f to your computer and use it in GitHub Desktop.
Scalacheck generated functions return the same output for any input
This file contains hidden or 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
scala> import org.scalacheck._ | |
import org.scalacheck._ | |
scala> val generatedFunc = Gen.resultOf[String => Int, String => Int](identity).sample.get | |
generatedFunc: String => Int = <function1> | |
scala> generatedFunc("hello") == generatedFunc("goodbye") | |
res0: Boolean = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment