does anyone else also experienced this? I am using jacoco 0.7.1 and my project has a lot of lambdas and Runnables. And even if I am sure those were executed during the test the report does not show any of the lines in them as executed. This is true for the whole project, non of the lines of the lambdas or Runnables were reported as covered. (It is true for the jenkins or for the jacoco reports)
like:
[COVERED ] trigger.callLater(() -> {
[NO COVER] any statement here;
[NO COVER] any statement here;
[NO COVER] any statement here;
);
[COVERED ] trigger.callLater(new Runnable() {
[NO COVER] public void run() {
[NO COVER] any statement here;
[NO COVER] }
);
Is it expected or an issue? Or something went wrong with my project (compiler, jacoco version, etc)
Thanks for any hints
Cheers
Tamas
void doit(Param p){
p.reset();
p.call(() -> {
log.debug("logit");
});
}
will be reported as 100% on 3 lines (p.reset(), p.cal..., last '}')
thanks for your response. Yes you can ignore the jenkins report, probably some of it comes from the original jacoco issue, but not related here.
Here is the sample project to reproduce it:
https://github.com/kalidasya/jacoco-issue
just run mvn clean verify and check the: target/site/jacoco/org.jacoco.issue.lambda/Caller.java.html report. the Runnable part is covered but the lambda isnt. Also note it has 100% coverage, but the line number is not correct (see: target/site/jacoco/org.jacoco.issue.lambda/index.source.html).
But maybe I misunderstand something related to lambdas, but I expect the same coverage as in the Runnable case.
Thanks for helping
Cheers
Tamas
--
You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/ieas6zOKYTY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.