Assert
eff AssertSourceAn effect used to perform assertions during program execution.
Operations
Definitions
Asserts that the given foldable ma is empty.
Asserts that the given values expected and actual are equal.
def assertEqWithMsg(expected: { expected = a }, actual: a, msg: String): Unit \ Assert with Eq[a]§ SourceAsserts that the given values expected and actual are equal with the given message msg.
Asserts that the given condition cond is false with the given message msg.
def assertMemberOf(x: a, ma: m[a]): Unit \ Assert + Aef[m] with Foldable[m], Eq[a], ToString[a], ToString[m[a]]§ SourceAsserts that the given element x is a member of the given foldable ma.
def assertNeq(unexpected: { unexpected = a }, actual: a): Unit \ Assert with Eq[a], ToString[a]§ SourceAsserts that the given values unexpected and actual are not equal.
def assertNeqWithMsg(unexpected: { unexpected = a }, actual: a, msg: String): Unit \ Assert with Eq[a]§ SourceAsserts that the given values unexpected and actual are not equal with the given message msg.
Asserts that the given foldable ma is non-empty.
Asserts that the given condition cond is true with the given message msg.
Handles the Assert effect of the given function f by throwing exceptions on assertion failures.
In other words, re-interprets the Assert effect using the IO effect.
Handles the Assert effect by logging assertion failures using the Logger effect.
Assertions continue execution after logging the assertion failure.
Handles the Assert effect by ignoring all assertions (no-op).
Handles the Assert effect by prompting the user whether to continue execution.
When an assertion fails, prints the assertion failure and asks the user if they want to continue. If the user chooses not to continue, the program throws an exception.
Handles the Assert effect by printing assertion failures to stderr.
Assertions continue execution after printing the assertion failure.
Handles the Assert effect by printing assertion failures to stdout.
Assertions continue execution after printing the assertion failure.
@DefaultHandler Runs the Assert effect of the given function f by throwing exceptions on assertion failures.
In other words, re-interprets the Assert effect using the IO effect.
Runs the Assert effect of the given function f by logging assertion failures using the Logger effect.
Assertions continue execution after logging the assertion failure.
Runs the Assert effect of the given function f by ignoring all assertions (no-op).
Runs the Assert effect of the given function f by prompting the user whether to continue execution.
When an assertion fails, prints the assertion failure and asks the user if they want to continue. If the user chooses not to continue, the program throws an exception.
Runs the Assert effect of the given function f by printing assertion failures to stderr.
Assertions continue execution after printing the assertion failure.
Runs the Assert effect of the given function f by printing assertion failures to stdout.
Assertions continue execution after printing the assertion failure.