[Issue 16711] unittest writefln

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jan 14 01:05:47 PST 2017


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

Rainer Schuetze <r.sagitario at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2
                 CC|                            |r.sagitario at gmx.de
          Component|visuald                     |phobos
           Hardware|x86                         |All
                 OS|Windows                     |All
           Severity|enhancement                 |normal

--- Comment #1 from Rainer Schuetze <r.sagitario at gmx.de> ---
By importing std.stdio and using writefln, you are also instantiating template
struct FormatSpec(Char) from std.format. This contains a unittest that checks
that an exception is thrown. Every time code generation for this struct kicks
in, the unittest will also be generated.

The unittest does not contain anything depending on the template parameters, so
it should not be inside the struct declaration, but outside of it. Thus I'm
reassigning this to component phobos.

--


More information about the Digitalmars-d-bugs mailing list