scalaprops.scalazlaws.semigroup.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalaprops-scalazlaws_2.12.0-M4 Show documentation
Show all versions of scalaprops-scalazlaws_2.12.0-M4 Show documentation
property based testing library for Scala
The newest version!
package scalaprops
package scalazlaws
import scalaprops.Property.forAll
import scalaprops.Properties.properties
import scalaz._
object semigroup {
def associative[A: Equal: Gen](implicit A: Semigroup[A]): Property =
forAll(A.semigroupLaw.associative _)
def laws[A: Semigroup: Equal: Gen]: Properties[ScalazLaw] =
properties(ScalazLaw.semigroup) (
ScalazLaw.semigroupAssociative -> associative[A]
)
def all[A: Semigroup: Equal: Gen]: Properties[ScalazLaw] =
laws[A]
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy