ModuleInfo, factories, and unittesting
Atila Neves via Digitalmars-d
digitalmars-d at puremagic.com
Mon Dec 19 09:25:36 PST 2016
On Monday, 19 December 2016 at 17:11:38 UTC, Adam D. Ruppe wrote:
> On Monday, 19 December 2016 at 17:04:43 UTC, Atila Neves wrote:
>> Nope, no magic. Just ModuleInfo.opApply in object.d.
>
> Well, it is kinda magical because combining all the ModuleInfo
> takes some tricks from the linker. This method works with
> separate compilation, whereas the compile time tricks don't...
> and that's important to remember in any rewriting situations.
I'd forgotten about separate compilation. The issue there is the
algorithm for naming unittest blocks gives different results
depending on how the code is compiled, so __traits(getUnitTests)
unfortunately currently only works with "compile all the
things!". I'd forgotten I wanted to change the compiler code
responsible for the naming.
Atila
More information about the Digitalmars-d
mailing list