https://issues.dlang.org/show_bug.cgi?id=13291
Andrei Alexandrescu <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #9 from Andrei Alexandrescu <[email protected]> --- I just realized this can be realized with relative ease as follows: void fun(T)(T arg) { version(unittest) { ... testing ... } ... stuff ... } To avoid running unittests every time: void fun(T)(T arg) { version(unittest) for (static bool tested; !tested; tested = true) { ... testing stuff ... } ... stuff ... } --
