[Issue 20910] New: Unittest runner reports wrong unittest count
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 8 21:42:34 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20910
Issue ID: 20910
Summary: Unittest runner reports wrong unittest count
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: hsteoh at quickfur.ath.cx
Code:
-------
import std.stdio;
unittest { writeln("x"); }
unittest { writeln("y"); }
unittest { writeln("z"); }
-------
Compiler invocation:
-------
dmd -unittest -main -run test.d
-------
Output:
-------
x
y
z
1 unittests passed
-------
Clearly, all 3 unittests ran; yet the default test runner reports only 1
unittest. This is misleading, and gives the wrong impression that some
unittests were not run.
Expected output:
--------
x
y
z
3 unittests passed
--------
--
More information about the Digitalmars-d-bugs
mailing list