[Issue 20528] New: Stray unit test in phobos is run by user code compiled with -unittest

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 23 13:52:33 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20528

          Issue ID: 20528
           Summary: Stray unit test in phobos is run by user code compiled
                    with -unittest
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: schveiguy at yahoo.com

Using writefln causes a unittest to be pulled in from Phobos into user code.

example:

-------
import std.stdio;

void main()
{
   writefln("hello");
}
--------


dmd -run -unittest app.d
1 unittests passed

Phobos should not be inserting unittests into user's code.

See related issue 20500

--


More information about the Digitalmars-d-bugs mailing list