Bug ID 199
Summary unittests not linked unless module is imported
Product GDC
Version 4.9.x
Hardware x86_64
OS Linux
Status NEW
Severity normal
Priority Normal
Component gdc
Assignee ibuclaw@gdcproject.org
Reporter alex@sunopti.com

I have a build system that makes a static library with a bunch of code, and
then links it into several executables.

If I add a new module with unittest{ } section and compile it into the static
library, the unittests are not run by any of the executables unless the module
is referenced somewhere.

All compiled with -funittest switch.

I suspect this is behaviour gdc has inherited from the linker.

gdc should probably force all modules with unittests to be linked in.

This should be a supported development path: write code, test it, integrate it.
Because the code is compiled etc, it can take some time to figure out that the
tests are not being run, and it is not obvious why.


You are receiving this mail because: