Recently I saw a <post> for Kotlin 1.5.0 and I dec...
# stdlib
m
Recently I saw a post for Kotlin 1.5.0 and I decided to use
assertIs
method in whole instance checks in my tests, and I replaced many of
assertTrue { it is SomeClass }
with
assertIs<SomeClass>(it)
Now, I am checking my coverage and it decreased, all the
assertIs
methods seems partially covered Is it expected? are they really partially covered ?
k
Depending on your code coverage checker, it may be treated like a branch, where you have 2 things to cover: the case where the parameter is the asserted type, and the case where it isn't.
m
Yes and isn’t it something to be covered where the implementation of
assertIs
is ? This is a method from kotlin standard library
f
This is a result of inlining, JaCoCo doesn't know that this code wasn't written by you.