assertNotEmpty

Asserts that the value is not empty.

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

Throws

AssertException otherwise

Examples

assertNotEmpty([1, 2, 3]);

auto exception = expectThrows!AssertException(assertNotEmpty([]));

assertEquals("Assertion failure", exception.msg);

Meta