You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried overriding these functions in the created class but that added the coverage to functions with string parameters, like remove(String, String), and getOrDefault(String, String) but not the functions with Object parameters
I also tried annotating the overridden functions with @Generated, which removed the function with String parameters, but not the functions with Object parameters
I also tried to exclude the LinkedHashMap, HashMap and Map classes from jacocoTestReport by adding **/java/util/*.* and **/java/util/Map.java to the exclude filter in the gradle.
I also tried to filter out the files in gradle using .filter({file -> !file.name.contains('HashMap')}) but still no luck
Expected behaviour
I'd like to have only the functions from that class, and exclude any functions from the superclass, the overridden functions with String parameters could be kept, as it is possible to cover them, and the user may override them, but the funcitons with Object parameters should be excluded
Actual behaviour
Getting functions from super class, that are not in (and cannot be reachable in) the sub class in jacocoTestReport, causing left out branches and instructions
Is there any way to exclude the unreachable Object parameter functions?
Build #AI-193.6911.18.40.6514223, built on May 20, 2020
Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.6
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Tool integration: Gradle
The text was updated successfully, but these errors were encountered:
Steps to reproduce
includes
file filter./gradlew jacocoTestReport -x lint
("-x lint" I was using because lint was taking too much time)Map
class, likeremove(Object, Object)
, andgetOrDefault(Object, Object)
remove(String, String)
, andgetOrDefault(String, String)
but not the functions withObject
parameters@Generated
, which removed the function withString
parameters, but not the functions withObject
parameters**/java/util/*.*
and**/java/util/Map.java
to the exclude filter in the gradle..filter({file -> !file.name.contains('HashMap')})
but still no luckExpected behaviour
I'd like to have only the functions from that class, and exclude any functions from the superclass, the overridden functions with
String
parameters could be kept, as it is possible to cover them, and the user may override them, but the funcitons withObject
parameters should be excludedActual behaviour
Getting functions from super class, that are not in (and cannot be reachable in) the sub class in jacocoTestReport, causing left out branches and instructions
Is there any way to exclude the unreachable
Object
parameter functions?Android Studio:
The text was updated successfully, but these errors were encountered: