Object/Trait

hedgehog.core

Result

Related Docs: trait Result | package core

Permalink

object Result

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Result
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Failure(log: List[Log]) extends Result with Product with Serializable

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Success extends Result with Product with Serializable

    Permalink
  5. def all(l: List[Result]): Result

    Permalink
  6. def any(l: List[Result]): Result

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def assert(b: Boolean): Result

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def diff[A, B](a: A, b: B)(f: (A, B) ⇒ Boolean): Result

    Permalink

    Compare two arguments with the comparison function and return Result.success if the function return true.

    Compare two arguments with the comparison function and return Result.success if the function return true. Otherwise, it returns Result.failure with the Log containing the argument values.

    Examples:
    1. val a1 = "abc"
      val a2 = "xyz"
      Result.diff(a1, a2)(_ == _)
      // Result.failure
      > === Failed ===
      > --- lhs ---
      > abc
      > --- rhs ---
      > xyz
      Result.diff(123, 123)(_ != _).log("It must be different.")
      // Result.failure
      > === Failed ===
      > --- lhs ---
      > 123
      > --- rhs ---
      > 123
      > It must be different.
      val x = 'z'
      val y = 100
      Result.diff(x, y)((x, y) => y < 87 && x <= 'r')
      // Result.failure
      > === Failed ===
      > --- lhs ---
      > z
      > --- rhs ---
      > 100
    2. ,
    3. val a1 = "abc"
      val a2 = "abc"
      Result.diff(a1, a2)(_ == _)
      // Result.success
      Result.diff(123, 456)(_ != _).log("It must be different.")
      // Result.success
      val x = 'q'
      val y = 80
      Result.diff(x, y)((x, y) => y < 87 && x <= 'r')
      // Result.success
    See also

    https://github.com/hedgehogqa/haskell-hedgehog/blob/921e4af72a181f01d90816fd7055b823bf885b3b/hedgehog/src/Hedgehog/Internal/Property.hs#L707

  11. def diffNamed[A, B](logName: String, a: A, b: B)(f: (A, B) ⇒ Boolean): Result

    Permalink
  12. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. def error(e: Exception): Result

    Permalink
  15. def failure: Result

    Permalink
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def success: Result

    Permalink
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped