WheneverAsserting

Supertrait for WheneverAsserting typeclasses, which are used to implement and determine the result type of Whenever's whenever method.

Currently, an Whenever expression will have result type Assertion, if the function passed has result type Assertion, else it will have result type Unit.

Companion:
object
class Object
trait Matchable
class Any

Type members

Types

type Result

The result type of the whenever method.

The result type of the whenever method.

Value members

Abstract methods

def whenever(condition: Boolean)(fun: => T): Result

Implementation method for Whenever's whenever syntax.

Implementation method for Whenever's whenever syntax.

Value parameters:
condition

the boolean condition that determines whether whenever will evaluate the fun function (condition is true) or throws DiscardedEvaluationException (condition is false)

fun

the function to evaluate if the specified condition is true