assertAll

Asserts that all assertions pass.

  1. void assertAll(T[] assertions)
    void
    assertAll
    (
    T
    )
    if (
    isCallable!T
    )
  2. void assertAll(void delegate()[] assertions)
  3. void assertAll(void function()[] assertions)

Throws

AssertAllException otherwise

Examples

assertAll(
		assertTrue(true),
		assertFalse(false),
);

auto exception = expectThrows!AssertException(assertAll(
		assertTrue(false),
		assertFalse(true),
));

assertTrue(exception.msg.canFind("2 assertion failures"), exception.msg);
assertAll!(void delegate() @safe)(
		assertTrue(true),
		assertFalse(false),
);
assertAll!(void delegate() pure)(
		assertTrue(true),
		assertFalse(false),
);

Meta