www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22730] New: master: "dmd -i" doesn't include unit tests from


          Issue ID: 22730
           Summary: master: "dmd -i" doesn't include unit tests from
                    imported modules
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: duser airmail.cc

// main.d
import mod;
void main() { assert(0, "main() called"); }

// mod.d
unittest { assert(1); }

% dmd -i -unittest -run main.d
core.exception.AssertError main.d(2): main() called

with dmd 2.098.1, the output is "1 modules passed unittests"

according to bisect, this was caused by:

Feb 03 2022