object Result
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Result
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def all(l: List[Result]): Result
- def any(l: List[Result]): Result
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assert(b: Boolean): Result
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- 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.
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
, 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
Examples: - def diffNamed[A, B](logName: String, a: A, b: B)(f: (A, B) => Boolean): Result
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def error(e: Exception): Result
- def failure: Result
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def success: Result
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- case object Success extends Result with Product with Serializable
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)