[Issue 12269] Unittest within template struct scope is not executed
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 27 18:12:33 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12269
--- Comment #3 from growlercab at gmail.com 2014-02-27 18:12:29 PST ---
Thanks for the clarification. As I understand it this is the situation:
Within a template unittests will be silently ignored by the compiler unless
another unittest, outside the template scope, instantiates that template.
Is it really a good idea? To treat unittests like regular functions w.r.t
templates regarding how/when they're compiled.
IMO all unittests should be lifted to module scope by the compiler, excepting
static-if and version() blocks. This way there would be no unittests that are
missed because a template was not instantiated.
This all came about because someone elsewhere in the code removed an one line
that instantiated S. We were blissfully unaware that most of out S unittests
were not actually being compiled, let alone executed. A simple mistake but it
happens.
Thanks,
ed
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list