@@ -79,9 +79,9 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
79
79
assert(! compiler.reporter.hasWarnings)
80
80
81
81
/** should have the following statements instrumented:
82
- * the selector, clause 1
82
+ * the selector, clause/skip 1
83
83
*/
84
- compiler.assertNMeasuredStatements(2 )
84
+ compiler.assertNMeasuredStatements(3 )
85
85
}
86
86
test(" scoverage should instrument match guards" ) {
87
87
val compiler = ScoverageCompiler .default
@@ -98,7 +98,7 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
98
98
/** should have the following statements instrumented:
99
99
* the selector, guard 1, clause 1, guard 2, clause 2, clause 3
100
100
*/
101
- compiler.assertNMeasuredStatements(6 )
101
+ compiler.assertNMeasuredStatements(9 )
102
102
}
103
103
104
104
test(" scoverage should instrument non basic selector" ) {
@@ -114,7 +114,8 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
114
114
// the someValue method entry
115
115
// the selector call
116
116
// case block "yes" literal
117
- compiler.assertNMeasuredStatements(3 )
117
+ // skip case block
118
+ compiler.assertNMeasuredStatements(4 )
118
119
}
119
120
120
121
test(" scoverage should instrument conditional selectors in a match" ) {
@@ -134,7 +135,8 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
134
135
// elsep block,
135
136
// elsep literal "2",
136
137
// case block "yes" literal
137
- compiler.assertNMeasuredStatements(6 )
138
+ // skip case block "yes" literal
139
+ compiler.assertNMeasuredStatements(7 )
138
140
}
139
141
140
142
// https://github.com/scoverage/sbt-scoverage/issues/16
@@ -261,8 +263,9 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
261
263
assert(! compiler.reporter.hasErrors)
262
264
assert(! compiler.reporter.hasWarnings)
263
265
// should have one statement for each case body
266
+ // and one statement for each case skipped
264
267
// selector is a constant so would be ignored.
265
- compiler.assertNMeasuredStatements(3 )
268
+ compiler.assertNMeasuredStatements(6 )
266
269
}
267
270
268
271
test(" plugin should support yields" ) {
0 commit comments