@@ -79,9 +79,9 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
7979 assert(! compiler.reporter.hasWarnings)
8080
8181 /** should have the following statements instrumented:
82- * the selector, clause 1
82+ * the selector, clause/skip 1
8383 */
84- compiler.assertNMeasuredStatements(2 )
84+ compiler.assertNMeasuredStatements(3 )
8585 }
8686 test(" scoverage should instrument match guards" ) {
8787 val compiler = ScoverageCompiler .default
@@ -98,7 +98,7 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
9898 /** should have the following statements instrumented:
9999 * the selector, guard 1, clause 1, guard 2, clause 2, clause 3
100100 */
101- compiler.assertNMeasuredStatements(6 )
101+ compiler.assertNMeasuredStatements(9 )
102102 }
103103
104104 test(" scoverage should instrument non basic selector" ) {
@@ -114,7 +114,8 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
114114 // the someValue method entry
115115 // the selector call
116116 // case block "yes" literal
117- compiler.assertNMeasuredStatements(3 )
117+ // skip case block
118+ compiler.assertNMeasuredStatements(4 )
118119 }
119120
120121 test(" scoverage should instrument conditional selectors in a match" ) {
@@ -134,7 +135,8 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
134135 // elsep block,
135136 // elsep literal "2",
136137 // case block "yes" literal
137- compiler.assertNMeasuredStatements(6 )
138+ // skip case block "yes" literal
139+ compiler.assertNMeasuredStatements(7 )
138140 }
139141
140142 // https://github.com/scoverage/sbt-scoverage/issues/16
@@ -261,8 +263,9 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
261263 assert(! compiler.reporter.hasErrors)
262264 assert(! compiler.reporter.hasWarnings)
263265 // should have one statement for each case body
266+ // and one statement for each case skipped
264267 // selector is a constant so would be ignored.
265- compiler.assertNMeasuredStatements(3 )
268+ compiler.assertNMeasuredStatements(6 )
266269 }
267270
268271 test(" plugin should support yields" ) {
0 commit comments