January 23, 2020 [Issue 20526] New: Compiling a program without unit tests with "-unittest" prints "1 unittests passed" | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20526 Issue ID: 20526 Summary: Compiling a program without unit tests with "-unittest" prints "1 unittests passed" Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: druntime Assignee: nobody@puremagic.com Reporter: petar.p.kirov@gmail.com $ cat test.d void main() { import std.algorithm.sorting : sort; int[] arr1 = [5, 2, 8]; auto s = arr1.sort; } $ dmd -unittest test.d && ./test 1 unittests passed The root cause is most likely a unit test nested inside a template, which gets instantiated from std.algorithm.sorting.sort. -- |
Copyright © 1999-2021 by the D Language Foundation