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
--------
Comment #1 by moonlightsentinel — 2020-06-09T00:22:39Z
@quickfur created dlang/druntime pull request #3129 "Fix issue 20910: fix misleading unittest runner messages." mentioning this issue:
- Issue 20910: fix misleading unittest runner messages.
The number returned by runModuleUnitTests is not the number of tests,
but the number of modules tested.
https://github.com/dlang/druntime/pull/3129
Comment #3 by dlang-bot — 2020-06-16T12:11:32Z
dlang/druntime pull request #3129 "Fix issue 20910: fix misleading unittest runner messages." was merged into master:
- 209ce9b0c18ba27519f900ca31947ee3bf1e0f15 by H. S. Teoh:
Fix issue 20910: fix misleading unittest runner messages.
The number returned by runModuleUnitTests is not the number of tests,
but the number of modules tested.
https://github.com/dlang/druntime/pull/3129