On Fri, Sep 03, 2021 at 11:39:44PM +0000, Per Nordlöw via Digitalmars-d-learn wrote: > When is a phobos unittest supposed to be qualified with version > `(StdUnittest)`? Ideally, always? I don't see that their current use > is consistenly following a rule. If so, is the purpose of its presence > to reduce the burden of the compiler when the application using phobos > is compiled with -unittest? (edited). [...]
This is related to the bogonity of the current behaviour of -unittest, which compiles *all* unittests of *all* imported modules, even when you're compiling user code that has no interest in Phobos unittests. StdUnittest is a hack introduced to suppress Phobos unittests in user programs. Theoretically it's supposed to apply to all unittests, but obviously whoever did it failed to cover every case. It's still up in the air whether or not this should even be fixed. Ideally, we should be fixing the behaviour of -unittest instead of living with this hack. T -- I'm still trying to find a pun for "punishment"...
