dshould.ShouldType

Undocumented in source.

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.

FluentException
alias FluentException = FluentExceptionImpl!Exception
Undocumented in source.

Functions

because
T because(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 _, string file, size_t line)

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

should
auto should(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.

Imports

isInstanceOf (from std.traits)
public import std.traits : isInstanceOf;
Undocumented in source.

Structs

Fence
struct Fence
Undocumented in source.
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