On May 5, 2010, at 4:19 AM, Denis <[email protected]> wrote:
What's wrong with automatically wrapping unittests with try/catch
block?
I believe that's what everyone except Walter wants :) if I understand
correctly, a non-throwing assert is more efficient than a throwing
assert. Nobody cares about performance when an assert fails, but this
creates performance differences when asserts pass.
Anyway, I believe top-level unittest assert behavior shouldn't differ
from other asserts.
Me too. Anything with the same function name/signature should behave
the same. Maybe the simplest solution is to have one function that
throws and one that aborts?
I hate how, with the current design, someone can't write their own
helper functions that use assert. e.g.
unittest{
foreach(x; 0..10)
validate_foo(bar(x), x);
}
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals