assertNotThrown

Undocumented in source. Be warned that the author may not have intended to support it.
assertNotThrown
(
E
T
)
(
lazy T t
,
int line = __LINE__
,
string file = __FILE__
)

Examples

import core.exception : AssertError;
//import std.exception : assertThrown, assertNotThrown;
bool foo() {
	throw new Exception("e");
}

bool bar() {
	return true;
}

assertThrown!(AssertError)(assertThrown!(AssertError)(bar()));
assertThrown!(AssertError)(assertNotThrown!(Exception)(foo()));

Meta