ShouldType.check

Checks a boolean condition for truth, throwing an exception when it fails. The components making up the exception string are passed lazily. The message has the form: "Test failed: expected {expected}[ because reason], but got {butGot}" For instance: "Test failed: expected got.empty() because there should be nothing in there, but got [5]." In that case, expected is "got.empty()" and butGot is "[5]".

struct ShouldType(G, string[] phrase = [])
pure @safe
void
check
(,
lazy string expected
,
lazy string butGot
,
string file
,
size_t line
)

Meta