Hi, I saw that, but I think that, without modifying the function, I cannot cover the "(this is BufferedReader)" condition because neither I can force that branch from the argument "inputStream" nor I can mock inline functions.
Thanks, Giacomo On Sunday, April 26, 2020 at 9:40:16 PM UTC+2, drek...@gmail.com wrote: > > It's probably not quite the one-liner it looks like: > @kotlin.internal.InlineOnly > public inline fun InputStream.bufferedReader(charset: Charset = > Charsets.UTF_8): BufferedReader = reader(charset).buffered() > > > That's inlined so is (at bytecode level) part of _your_ method. Further, > called by that is the buffered() method: > @kotlin.internal.InlineOnly > public inline fun Reader.buffered(bufferSize: Int = DEFAULT_BUFFER_SIZE): > BufferedReader = > if (this is BufferedReader) this else BufferedReader(this, bufferSize) > > This is also part of _your_ method and certainly has a conditional in it. > Just my guess but that doesn't get compiled out as it's inlined. You'd have > to look at the bytecode > to verify anything like that though. > > -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/ef81fe97-5d8a-4e7b-93ef-e9b355a4a29e%40googlegroups.com.