Code coverage issue ( or could just be me )
Leaning scala and trying out the plugin - looks great !!!
In some sample code am executing some specs2 tests. All seems fine apart from the one line shown above not having coverage.
The tests I have are
"Calling Time.forMinutes" should {
"should return valid time" in {
Time.fromMinutes(61) mustEqual Time(1,1)
}
}
"Calling Time.forMinutes" should {
"should return valid time" in {
Time.fromMinutes(-1) must throwA[IllegalArgumentException]
}
}
Is there something I'm missing that is stopping coverage getting to 100% or a bug ?
This is in intellij 11.69 and scala plugin 0.5.225
Thanks
请先登录再写评论。
It seems like a bug (and it seems like a Scala plugin bug). Please reprort it to our issue tracker: http://youtrack.jetbrains.net/issues/SCL
This red marker means that there are some line in byte-code, which refers to method declaration line, but wasn't hit (or coverage engine missed it). So if it's some synthetic line then I should filter it in our coverage support.
Best regards,
Alexander Podkhalyuzin.
Actually might be something todo with the requires, trying to narrow it down.
I also see some issues which I would could be due to the build.
I get code coverage report then if I do a rebuild and rerun coverage I can get different results.
I have coverage set to 'replace active suites with the new one'
Thanks