RE: Re: Improving JaCoCo's branch coverage of a Groovy assert statement

2022-12-17 Thread Damir Murat
Tnx Jochen for the comment :-) I've created the issue in Groovy JIRA:  https://issues.apache.org/jira/browse/GROOVY-10878

Re: Improving JaCoCo's branch coverage of a Groovy assert statement

2022-12-11 Thread Jochen Theodorou
On 09.12.22 11:51, Damir Murat wrote: [...] simple assert statement like     assert firstName != null Groovy generates something like     ValueRecorder var1 = new ValueRecorder();     try {       String var1 = this.firstName;       var1.record(var1, 8);       

RE: Improving JaCoCo's branch coverage of a Groovy assert statement

2022-12-11 Thread Damir Murat
I forgot to explicitly mention the primary motivation for doing this. At the moment, there is no way to have full branch coverage for Groovy assert statements. In a larger project, this is very distractive when trying to find the pieces of actual logic that should be better covered with tests.

Improving JaCoCo's branch coverage of a Groovy assert statement

2022-12-09 Thread Damir Murat
JaCoCo has long-standing issues with covering calls of methods that throw exceptions. When such methods are called inside of, if/else branches for example, the result is partial coverage reported for those branches. However, there is a JaCoCo idiom