dshould

Undocumented in source.

Modules

ShouldType
module dshould.ShouldType
Undocumented in source.
basic
module dshould.basic
Undocumented in source.
contain
module dshould.contain
Undocumented in source.
empty
module dshould.empty
Undocumented in source.
stringcmp
module dshould.stringcmp
Undocumented in source.
thrown
module dshould.thrown
Undocumented in source.

Public Imports

dshould.basic
public import dshould.basic;
Undocumented in source.
dshould.contain
public import dshould.contain;
Undocumented in source.
dshould.empty
public import dshould.empty;
Undocumented in source.
dshould.stringcmp
public import dshould.stringcmp;
Undocumented in source.
dshould.thrown
public import dshould.thrown;
Undocumented in source.

Members

Aliases

throwAn
alias throwAn = throwA

The word .throwA (or .throwAn) expects its left-hand side expression to throw an exception. Instead of the cumbersome .where.msg.should.equal("msg"), the msg of the Exception to expect can be passed directly.

Functions

because (from dshould.ShouldType)
T because(T value, string reason) via public import dshould.ShouldType : because, should;

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.

equal
void equal(Should should, T value, Fence _, string file, size_t line)

The word .equal tests its parameter for equality with the left-hand side. If the parameters are strings, a colored diff is used.

equal
auto equal(Should should)
Undocumented in source. Be warned that the author may not have intended to support it.
should (from dshould.ShouldType)
auto should(T got) via public import dshould.ShouldType : because, should;

.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.

Templates

throwA
template throwA(T : Throwable)

The word .throwA (or .throwAn) expects its left-hand side expression to throw an exception. Instead of the cumbersome .where.msg.should.equal("msg"), the msg of the Exception to expect can be passed directly.

Meta