ExpectNot

Provides negated versions of the usual expectations in Expect.

Constructors

this
this(const(TReceived) received, string filePath, size_t line)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

toApproximatelyEqual
void toApproximatelyEqual(TExpected expected, F maxRelDiff, F maxAbsDiff)

Checks that received.isClose(expected, maxRelDiff, maxAbsDiff) and throws a FailingExpectationException if it is.

toBe
void toBe(TExpected expected)

Checks that received !is expected and throws a FailingExpectationException otherwise.

toBeOfType
void toBeOfType()

Checks if received is a TExpected or a sub-type of it. If it is, a FailingExpectationException is thrown.

toEqual
void toEqual(TExpected expected)

Checks that received != expected and throws a FailingExpectationException otherwise.

toSatisfy
void toSatisfy(bool delegate(const(TReceived)) predicate)

Checks that predicate(received) returns false and throws a FailingExpectationException otherwise.

toSatisfyAll
void toSatisfyAll(bool delegate(const(TReceived))[] predicates)

Checks that predicate(received) returns false for at least one of the given predicates and throws a FailingExpectationException otherwise.

toSatisfyAny
void toSatisfyAny(bool delegate(const(TReceived))[] predicates)

Checks that predicate(received) returns false for all predicates and throws a FailingExpectationException otherwise.

toThrow
void toThrow()

Calls received and catches any exceptions thrown by it. There are three possible outcomes:

Meta