Open
Description
Describe the bug
See minimal reproducer here: https://github.com/josephlbarnett/testscoverageissue
run with mvn verify
-> test passes
run with mvn scoverage:report
-> test fails with:
[ERROR] com.example.WrapperTest.testEquals -- Time elapsed: 0.142 s <<< FAILURE!
java.lang.NullPointerException
at com.example.Wrapper.equals(Wrapper.scala:13)
at com.example.Wrapper.equals(Wrapper.scala:21)
at com.example.WrapperTest.testEquals(WrapperTest.scala:11)
[snip]
If I add an obj == null ||
to line 13 of Wrapper.scala it works, but would not expect running under coverage to change behavior like this?
(also reproduced this under sbt in addition to maven)
Expected behavior
Test pass or fail should not be affected by being run under scoverage
What build tool are you using?
Maven
Version of scoverage
2.0.6 version of the maven plugin, which looks like it uses 2.2.1 of scalac-scoverage-plugin
Metadata
Metadata
Assignees
Labels
No labels