Skip to content

Instantly share code, notes, and snippets.

@mikla
Created September 28, 2019 14:22
Show Gist options
  • Select an option

  • Save mikla/94072e46020feb4adfd17f5112b4d0b3 to your computer and use it in GitHub Desktop.

Select an option

Save mikla/94072e46020feb4adfd17f5112b4d0b3 to your computer and use it in GitHub Desktop.
checAll for
mport org.scalacheck.Properties
import org.scalatest.FunSuiteLike
import org.scalatest.prop.Checkers
trait Discipline extends Checkers { self: FunSuiteLike =>
def checkAll(name: String, ruleSet: Laws#RuleSet): Unit = {
for ((id, prop) ← ruleSet.all.properties)
test(name + "." + id) {
check(prop)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment