On Monday, 5 February 2018 at 19:32:37 UTC, Timothee Cour wrote:
just filed https://issues.dlang.org/show_bug.cgi?id=18377:
If I may add something semi-relevant to the current discussion,
have a look here:
https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
It is non-trivial to add llvm
On 2/11/2018 3:01 PM, Timothee Cour wrote:
It's about `line coverage` vs `branch coverage` (see exact definition
in linked article),
Ok, I see now, thanks for your patience and the clarification.
that difference is very large in practice.
Only if one cares about the percentage metric. Prag
> -cov coverage percentage is the line coverage, not the sequence point
> coverage [...]
> makes it fuzzy in proportion to how many lines contain multiple sequence
> points
Based on your comment I'm pretty sure you're still not getting my
point, so apologies if I was unclear and let me try to ex
On 2/11/2018 1:55 PM, Timothee Cour wrote:
I think you're missing my main point: it's explained here
https://www.ncover.com/support/docs/extras/code-coverage/understanding-branch-coverage
but the gist is that line based coverage is over-counting:
```
if(A)
// 100 lines of code
else
// 1 lin
I think you're missing my main point: it's explained here
https://www.ncover.com/support/docs/extras/code-coverage/understanding-branch-coverage
but the gist is that line based coverage is over-counting:
```
if(A)
// 100 lines of code
else
// 1 line of code
```
gives a line coverage of ~ 99% vs
On 2/5/2018 11:32 AM, Timothee Cour wrote:
just filed https://issues.dlang.org/show_bug.cgi?id=18377:
`dmd -cov -run main.d` shows 100% coverage; this is misleading since a
branch is not taken:
```
void main(){
int a;
if(false) a+=10;
}
```
Consider how -cov works today:
2| x = 3; y
On Monday, 5 February 2018 at 19:32:37 UTC, Timothee Cour wrote:
just filed https://issues.dlang.org/show_bug.cgi?id=18377:
@wilzbach
It probably makes sense to have a look at how other languages
are dealing with this. Seems to be a common problem
some links:
*
https://www.ncover.com/suppor