Closed AndrejMitrovic closed 3 years ago
I was just informed by Mathias that -checkaction=context
already shows the errors when using assert
.
So we could close this, unless someone really wants to work on it.
Since -checkaction=context
now works relatively well, I'm going to close this as WONTFIX.
Currently we cannot use the
test
routine within@safe
/@nogc
unittests:Additionally we cannot use
nothrow
becausetest!()
throws an Exception rather than an Error.I do not know of any code which specifically catches exceptions thrown by
test!()
. I don't see why it couldn't be changed to throw an Error instead.@safe
can be added more easily, there's only a few uses of unsafe features (some exception constructor doesn't have@safe
on it, for example).And finally
@nogc
could potentially be supported too. If we changetest
to throw anError
then it should be safe to actually allocate any of the formatted error messages in a static buffer.