dshould.ShouldType

Members

Aliases

FluentException
alias FluentException = FluentExceptionImpl!UnitTestException

Indicates a fluent assert has failed, as well as what was tested, why it was tested, and what the outcome was. When unit_threaded is provided, FluentException is a unit_threaded test exception.

Functions

because
T because(lazy T value, string reason)

When a fluent exception is thrown during the evaluation of the left-hand side of this word, then the reason for the test is set to the reason parameter.

empty_
void empty_(Should should, Fence _ = Fence(), string file = __FILE__, size_t line = __LINE__)

Ensures that the given range is empty. Specified here due to https://issues.dlang.org/show_bug.cgi?id=18839

should
auto should(lazy T got)

.should begins every fluent assertion in dshould. It takes no parameters on its own. Note that leaving a .should phrase unfinished will error at runtime.

Structs

ShouldType
struct ShouldType(G, string[] phrase = [])

ShouldType is the base type passed between UFCS words in fluent assertions. It stores the left-hand side expression of the phrase, called "got" in errors, as well as the words making up the assertion phrase as template arguments.

Meta