File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/main/scala/org/scalatestplus/junit Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -139,12 +139,12 @@ final class JUnitRunner(suiteClass: java.lang.Class[_ <: Suite]) extends org.jun
139
139
140
140
@ throws(classOf [NoTestsRemainException ])
141
141
override def filter (filter : TestFilter ): Unit = {
142
- getDescription.getChildren.asScala
143
- .filter(child => ! filter.shouldRun(child))
144
- .foreach(child => excludedTests.add(child.getMethodName) )
145
- if (getDescription.getChildren.isEmpty) {
146
- throw new NoTestsRemainException ()
147
- }
142
+ val children = getDescription.getChildren.asScala
143
+ excludedTests ++= children
144
+ .filterNot(filter.shouldRun )
145
+ .map(_.getMethodName)
146
+
147
+ if (children.isEmpty) throw new NoTestsRemainException
148
148
}
149
149
150
150
}
You can’t perform that action at this time.
0 commit comments