version(assert) and Phobos release unittest build
Gary Willoughby
dev at nomad.so
Thu Nov 28 09:21:01 PST 2013
On Thursday, 28 November 2013 at 16:40:57 UTC, Dicebot wrote:
> I have quickly tested it and looks like asserts are not removed
> from unittest blocks in release builds, only from normal code.
> Which does not seem to be documented on dlang.org but was
> probably introduced exactly to prevent existing tests from
> breaking in release mode. I have just learned something new :)
I found this out too during the development of DUnit:
https://github.com/nomad-software/dunit#notes
The asserts remain then the runtime just catches anything
Throwable during unit test execution:
https://github.com/D-Programming-Language/druntime/blob/master/src/core/runtime.d#L389-L419
More information about the Digitalmars-d-learn
mailing list