bricks.laws

LawChecks

trait LawChecks extends Discipline

Trait that facilitates law checks

LawChecks adds some helper methods to Discipline's extension of FunSuiteLike.

Self Type
LawChecks with FunSuiteLike
See also

Original issue in Algebra, Original implementation in Algebra

Linear Supertypes
Discipline, Checkers, Configuration, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LawChecks
  2. Discipline
  3. Checkers
  4. Configuration
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class LawChecker[L <: Laws](name: String, laws: L) extends Product with Serializable

    Check the laws using name as the base name for the tests.

  2. case class MaxDiscardedFactor extends PropertyCheckConfigParam with Product with Serializable

    Definition Classes
    Configuration
  3. case class MinSize extends PropertyCheckConfigParam with Product with Serializable

    Definition Classes
    Configuration
  4. case class MinSuccessful extends PropertyCheckConfigParam with Product with Serializable

    Definition Classes
    Configuration
  5. sealed abstract class PropertyCheckConfigParam extends AnyRef

    Definition Classes
    Configuration
  6. case class PropertyCheckConfiguration extends PropertyCheckConfigurable with Product with Serializable

    Definition Classes
    Configuration
  7. case class SizeRange extends PropertyCheckConfigParam with Product with Serializable

    Definition Classes
    Configuration
  8. case class Workers extends PropertyCheckConfigParam with Product with Serializable

    Definition Classes
    Configuration
  9. case class MaxDiscarded extends PropertyCheckConfigParam with Product with Serializable

    Definition Classes
    Configuration
    Annotations
    @deprecated
    Deprecated
  10. case class MaxSize extends PropertyCheckConfigParam with Product with Serializable

    Definition Classes
    Configuration
    Annotations
    @deprecated
    Deprecated

    use SizeRange instead

  11. case class PropertyCheckConfig extends PropertyCheckConfigurable with Product with Serializable

    Definition Classes
    Configuration
    Annotations
    @deprecated
    Deprecated

    Use PropertyCheckConfiguration instead

  12. trait PropertyCheckConfigurable extends AnyRef

    Definition Classes
    Configuration
    Annotations
    @deprecated
    Deprecated

    Use PropertyCheckConfiguration directly instead.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. implicit def PropertyCheckConfig2PropertyCheckConfiguration(p: (LawChecks.this)#PropertyCheckConfig): (LawChecks.this)#PropertyCheckConfiguration

    Definition Classes
    Configuration
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def check(p: Prop, configParams: (LawChecks.this)#PropertyCheckConfigParam*)(implicit config: (LawChecks.this)#PropertyCheckConfigurable): Unit

    Definition Classes
    Checkers
  9. def check(p: Prop, prms: Parameters): Unit

    Definition Classes
    Checkers
  10. def check[A1, A2, A3, A4, A5, A6, P](f: (A1, A2, A3, A4, A5, A6) ⇒ P, configParams: (LawChecks.this)#PropertyCheckConfigParam*)(implicit config: (LawChecks.this)#PropertyCheckConfigurable, p: (P) ⇒ Prop, a1: Arbitrary[A1], s1: Shrink[A1], pp1: (A1) ⇒ Pretty, a2: Arbitrary[A2], s2: Shrink[A2], pp2: (A2) ⇒ Pretty, a3: Arbitrary[A3], s3: Shrink[A3], pp3: (A3) ⇒ Pretty, a4: Arbitrary[A4], s4: Shrink[A4], pp4: (A4) ⇒ Pretty, a5: Arbitrary[A5], s5: Shrink[A5], pp5: (A5) ⇒ Pretty, a6: Arbitrary[A6], s6: Shrink[A6], pp6: (A6) ⇒ Pretty): Unit

    Definition Classes
    Checkers
  11. def check[A1, A2, A3, A4, A5, P](f: (A1, A2, A3, A4, A5) ⇒ P, configParams: (LawChecks.this)#PropertyCheckConfigParam*)(implicit config: (LawChecks.this)#PropertyCheckConfigurable, p: (P) ⇒ Prop, a1: Arbitrary[A1], s1: Shrink[A1], pp1: (A1) ⇒ Pretty, a2: Arbitrary[A2], s2: Shrink[A2], pp2: (A2) ⇒ Pretty, a3: Arbitrary[A3], s3: Shrink[A3], pp3: (A3) ⇒ Pretty, a4: Arbitrary[A4], s4: Shrink[A4], pp4: (A4) ⇒ Pretty, a5: Arbitrary[A5], s5: Shrink[A5], pp5: (A5) ⇒ Pretty): Unit

    Definition Classes
    Checkers
  12. def check[A1, A2, A3, A4, P](f: (A1, A2, A3, A4) ⇒ P, configParams: (LawChecks.this)#PropertyCheckConfigParam*)(implicit config: (LawChecks.this)#PropertyCheckConfigurable, p: (P) ⇒ Prop, a1: Arbitrary[A1], s1: Shrink[A1], pp1: (A1) ⇒ Pretty, a2: Arbitrary[A2], s2: Shrink[A2], pp2: (A2) ⇒ Pretty, a3: Arbitrary[A3], s3: Shrink[A3], pp3: (A3) ⇒ Pretty, a4: Arbitrary[A4], s4: Shrink[A4], pp4: (A4) ⇒ Pretty): Unit

    Definition Classes
    Checkers
  13. def check[A1, A2, A3, P](f: (A1, A2, A3) ⇒ P, configParams: (LawChecks.this)#PropertyCheckConfigParam*)(implicit config: (LawChecks.this)#PropertyCheckConfigurable, p: (P) ⇒ Prop, a1: Arbitrary[A1], s1: Shrink[A1], pp1: (A1) ⇒ Pretty, a2: Arbitrary[A2], s2: Shrink[A2], pp2: (A2) ⇒ Pretty, a3: Arbitrary[A3], s3: Shrink[A3], pp3: (A3) ⇒ Pretty): Unit

    Definition Classes
    Checkers
  14. def check[A1, A2, P](f: (A1, A2) ⇒ P, configParams: (LawChecks.this)#PropertyCheckConfigParam*)(implicit config: (LawChecks.this)#PropertyCheckConfigurable, p: (P) ⇒ Prop, a1: Arbitrary[A1], s1: Shrink[A1], pp1: (A1) ⇒ Pretty, a2: Arbitrary[A2], s2: Shrink[A2], pp2: (A2) ⇒ Pretty): Unit

    Definition Classes
    Checkers
  15. def check[A1, P](f: (A1) ⇒ P, configParams: (LawChecks.this)#PropertyCheckConfigParam*)(implicit config: (LawChecks.this)#PropertyCheckConfigurable, p: (P) ⇒ Prop, a1: Arbitrary[A1], s1: Shrink[A1], pp1: (A1) ⇒ Pretty): Unit

    Definition Classes
    Checkers
  16. def checkAll(name: String, ruleSet: RuleSet): Unit

    Definition Classes
    Discipline
  17. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. implicit val generatorDrivenConfig: (LawChecks.this)#PropertyCheckConfiguration

    Definition Classes
    Configuration
  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def laws[L[_] <: Laws, A](implicit laws: L[A], tag: TypeTagM[A]): (LawChecks.this)#LawChecker[L[A]]

    Check the laws for some type A, using the full name of A as the base name for the tests.

    Check the laws for some type A, using the full name of A as the base name for the tests.

    implicit def orderLaws[A: Eq: Arbitrary] = OrderLaws[A]
    implicit def groupLaws[A: Eq: Arbitrary] = GroupLaws[A]
    
    laws[OrderLaws, String].check(_.order)
    laws[GroupLaws, String].check(_.monoid)
    L

    the type of laws

    A

    the type to run the laws on

    laws

    the laws to use

    tag

    the tag associated with type to test

    returns

    the LawChecker to check the law

  26. def maxDiscardedFactor(value: PosZDouble): (LawChecks.this)#MaxDiscardedFactor

    Definition Classes
    Configuration
  27. def minSize(value: PosZInt): (LawChecks.this)#MinSize

    Definition Classes
    Configuration
  28. def minSuccessful(value: PosInt): (LawChecks.this)#MinSuccessful

    Definition Classes
    Configuration
  29. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  32. def sizeRange(value: PosZInt): (LawChecks.this)#SizeRange

    Definition Classes
    Configuration
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. def workers(value: PosInt): (LawChecks.this)#Workers

    Definition Classes
    Configuration

Deprecated Value Members

  1. def maxDiscarded(value: Int): (LawChecks.this)#MaxDiscarded

    Definition Classes
    Configuration
    Annotations
    @deprecated
    Deprecated

    use maxDiscardedFactor instead

  2. def maxSize(value: Int): (LawChecks.this)#MaxSize

    Definition Classes
    Configuration
    Annotations
    @deprecated
    Deprecated

    use SizeRange instead

Inherited from Discipline

Inherited from Checkers

Inherited from Configuration

Inherited from AnyRef

Inherited from Any

Ungrouped