On 2011-02-25 19:18:40 +0100, Jesse Phillips said:
There has been talk of a std.unittest that would help with this, but for now:
unittest { try { callMeWrong(wrong); assert(0); catch(AssertError e) { } } }
Ah. I used something like... auto thrown = 0; try foo() catch (AssertError) thrown++; ... assert(thrown == k); I guess I could wrap it up a bit, or something. -- Magnus Lie Hetland http://hetland.org