www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 458] New: set version=D_Unittest if -unittest was issued

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=458

           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 digitalmars.com
        ReportedBy: thomas-dloop 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)
        VersionCondition::addPredefinedGlobalIdent("D_Coverage");

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

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


-- 
Oct 25 2006
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=458


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from bugzilla digitalmars.com  2008-03-07 00:19 -------
Added version(unittest) to DMD 2.012


-- 
Mar 06 2008