NamedTest

Utility class useful in scenarios where actual testing code is reused in different contexts and file+line information is not enough to uniquely identify failed case.

NamedTest is also exception class on its own - when test condition fails it throws itself.

Constructors

this
this(istring name)

Constructor

Members

Functions

message
cstring message()

message that also uses this.name if present

test
void test(T ok, cstring msg, istring file, int line)

Same as enforceImpl!(TestException) but uses this.name for error message formatting.

test
void test(T1 a, T2 b, istring file, int line)

Same as enforceImpl!(op, TestException) but uses this.name for error message formatting.

Meta