On 8/7/14, 9:51 AM, Sean Kelly wrote:
On Thursday, 7 August 2014 at 07:57:14 UTC, Johannes Pfau wrote:

Attempting to continue operating is irresponsible if the program is
doing or can do anything important.

Again: unittests?

unittests shouldn't use assert.  Or alternately, we can have
onAssertError (the assertion failure callback) do something different if
unit testing is taking place than when the program is actually running.

Considering that TDPL, Ali's Book[1] and dlang.org[2] all use assert when introducing unittest, I think the latter solution is probably the right one.

[1] http://ddili.org/ders/d.en/unit_testing.html
[2] http://dlang.org/unittest.html

Reply via email to