Last active
April 3, 2016 04:59
-
-
Save dmyersturnbull/0ed3ee958c2d95edffc8273de90385b6 to your computer and use it in GitHub Desktop.
A tiny example of using ScalaCheck and ScalaTest together.
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 org.scalacheck.Gen | |
import org.scalatest.{PropSpec, Matchers} | |
import org.scalatest.prop.PropertyChecks | |
class MinimalScalaCheckExample extends PropSpec with PropertyChecks with Matchers { | |
property("A string's length should be constant") { | |
forAll { (s: String) => | |
s.length should equal(s.length) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment