Core concept

import org.scalacheck.Prop.forAll
val prop = forAll { (n: Int) => n + n == 2 * n }
Advertisement

How it works

Property design harder than example tests. Test shrinking helps debug.

Advertisement

Trade-offs + gotchas

Pure functions. Data structure invariants.