assertNotEmpty

Asserts that the value is not empty.

void
assertNotEmpty
(
T
)
(
,
lazy string msg = null
,
string file = __FILE__
,
size_t line = __LINE__
)

Throws

AssertException otherwise

Examples

1 assertNotEmpty([1, 2, 3]);
2 
3 auto exception = expectThrows!AssertException(assertNotEmpty([]));
4 
5 assertEquals("Assertion failure", exception.msg);

Meta