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. Protected

Type Members

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def all(l: List[Result]): Result
  5. def any(l: List[Result]): Result
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def assert(b: Boolean): Result
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  9. def diff[A, B](a: A, b: B)(f: (A, B) => Boolean): Result

    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 = "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
    2. ,
    3. 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
    See also

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

  10. def diffNamed[A, B](logName: String, a: A, b: B)(f: (A, B) => Boolean): Result
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def error(e: Exception): Result
  14. def failure: Result
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  21. def success: Result
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. case object Success extends Result with Product with Serializable

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped