Version() for unittest OR debug?

Juanjo Alvarez via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 10 06:36:00 PDT 2014


Hi,

Probably I pretty simple question, how could I mark some code to 
be compiled when in debug OR unittest mode? (or both, ||)

At first I tough I could do:

version(unittest, debug) {}

but this doesn't work.

Then I tried to define a new version:

version(DebugOrUnittest)
{
   version = debug;
   version = unittest;
}

But this also doesn't work.



More information about the Digitalmars-d-learn mailing list