www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Strange -cov bug

reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
Recently I discovered a strange bug in dmd -cov, that I finally got some
time today to reduce to a smallish test case. However, I can't seem to
get rid of the dependency on std.stdio; anybody has any idea how to
reduce this code further?

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

This is a very strange bug where decreasing code coverage actually
increases the reported coverage percentage. :-P


T

-- 
LINUX = Lousy Interface for Nefarious Unix Xenophobes.
Jul 06 2017
parent =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 07/06/2017 10:58 AM, H. S. Teoh via Digitalmars-d wrote:
 Recently I discovered a strange bug in dmd -cov, that I finally got some
 time today to reduce to a smallish test case. However, I can't seem to
 get rid of the dependency on std.stdio; anybody has any idea how to
 reduce this code further?

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

 This is a very strange bug where decreasing code coverage actually
 increases the reported coverage percentage. :-P


 T
Sorry, not helping but rambling below... Yep, not surprising that conditional expression has such issues. The last time I checked Python code for coverage, they were missing uncovered branch of the conditional expression. [And saying this without testing.] Additionally, what about lazily evaluated sub-expressions like function arguments? So, per-line coverage is not sufficient anyway. Ali
Jul 06 2017