-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
declined: duplicate ❌This issue or pull request already existsThis issue or pull request already exists
Description
I apologize if the terminology is incorrect. I wasn't getting full coverage on our fully-defined and exercised switch-expressions after upgrading to jacoco-8.11.0.
I extended the original example here: #1472
- JaCoCo version: 0.8.11.202310140853
- Operating system: Linux
- Tool integration: none/javac
java version "21.0.1" 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)
- Complete executable reproducer:
enum Example {
A, B;
static void example(Example e) {
switch (e) {
case A -> {
int i = 4;
}
case B -> {
int i = 4;
}
}
}
public static void main(String[] args) {
example(A);
example(B);
}
}- Steps: (what exactly are you doing with the above reproducer?)
javac Example.java -d classes
java -javaagent:jacocoagent.jar -cp classes Example
java -jar jacococli.jar report jacoco.exec --classfiles classes --sourcefiles . --html report
Expected behaviour
Full branch coverage
Actual behaviour
Thanks.
Metadata
Metadata
Assignees
Labels
declined: duplicate ❌This issue or pull request already existsThis issue or pull request already exists
