[Issue 458] New: set version=D_Unittest if -unittest was issued

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 25 03:45:02 PDT 2006


           Summary: set version=D_Unittest if -unittest was issued
           Product: D
           Version: 0.172
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thomas-dloop at kuehne.cn

The below patch sets version=D_Unittest if -unittest is used.
version(D_Unittest){ ... } should clean up import dependencies
for non-unittest builds.

=== dmd/mars.c
--- dmd/mars.c  (revision 2012)
+++ dmd/mars.c  (local)
@@ -535,6 +535,8 @@
     if (global.params.cov)

+    if (global.params.useUnitTests)
+       VersionCondition::addPredefinedGlobalIdent("D_Unittest");

     //printf("%d source files\n",files.dim);


More information about the Digitalmars-d-bugs mailing list