Skip to content

Commit a340d32

Browse files
committed
Fixed compiler error in JUnitRunnerSuite for scala 3 build.
1 parent fb7ba18 commit a340d32

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/test/scala/org/scalatestplus/junit/JUnitRunnerSuite.scala

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ package org.scalatestplus.junit {
8888
// Suite to be filtered out by the name filter
8989
//
9090
@RunWith(classOf[JUnitRunner])
91-
class FilteredOutSuite extends FunSuite with BeforeAndAfterAll {
91+
class FilteredOutSuite extends funsuite.AnyFunSuite with BeforeAndAfterAll {
9292
test("JUnit ran this OK!") {
9393
assert(1 === 1)
9494
}
@@ -98,7 +98,7 @@ package org.scalatestplus.junit {
9898
// Suite not to be filtered by the name filter
9999
//
100100
@RunWith(classOf[JUnitRunner])
101-
class FilteredInSuite extends FunSuite with BeforeAndAfterAll {
101+
class FilteredInSuite extends funsuite.AnyFunSuite with BeforeAndAfterAll {
102102
test("JUnit ran this OK!") {
103103
assert(1 === 1)
104104
}
@@ -167,16 +167,14 @@ package org.scalatestplus.junit {
167167
assert(result.getIgnoreCount === kerblooeySuite.ignoreCount)
168168
}
169169

170-
test("Test a suite can be filtered by name" +
171-
"as the runner implements filterable now")
172-
{
173-
val runNotifier =
174-
new RunNotifier {
175-
var ran: List[Description] = Nil
176-
override def fireTestFinished(description: Description): Unit = {
177-
ran = description :: ran
178-
}
170+
test("Test a suite can be filtered by name as the runner implements filterable now") {
171+
class RanRunNotifier extends RunNotifier {
172+
var ran: List[Description] = Nil
173+
override def fireTestFinished(description: Description): Unit = {
174+
ran = description :: ran
179175
}
176+
}
177+
val runNotifier = new RanRunNotifier()
180178

181179
val runners = (new JUnitRunner(classOf[FilteredOutSuite])) ::
182180
(new JUnitRunner(classOf[FilteredInSuite])) :: Nil

0 commit comments

Comments
 (0)