Skip to content

Commit

Permalink
Fixed compiler error in JUnitRunnerSuite for scala 3 build.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeseng committed Jun 19, 2024
1 parent fb7ba18 commit a340d32
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/test/scala/org/scalatestplus/junit/JUnitRunnerSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ package org.scalatestplus.junit {
// Suite to be filtered out by the name filter
//
@RunWith(classOf[JUnitRunner])
class FilteredOutSuite extends FunSuite with BeforeAndAfterAll {
class FilteredOutSuite extends funsuite.AnyFunSuite with BeforeAndAfterAll {
test("JUnit ran this OK!") {
assert(1 === 1)
}
Expand All @@ -98,7 +98,7 @@ package org.scalatestplus.junit {
// Suite not to be filtered by the name filter
//
@RunWith(classOf[JUnitRunner])
class FilteredInSuite extends FunSuite with BeforeAndAfterAll {
class FilteredInSuite extends funsuite.AnyFunSuite with BeforeAndAfterAll {
test("JUnit ran this OK!") {
assert(1 === 1)
}
Expand Down Expand Up @@ -167,16 +167,14 @@ package org.scalatestplus.junit {
assert(result.getIgnoreCount === kerblooeySuite.ignoreCount)
}

test("Test a suite can be filtered by name" +
"as the runner implements filterable now")
{
val runNotifier =
new RunNotifier {
var ran: List[Description] = Nil
override def fireTestFinished(description: Description): Unit = {
ran = description :: ran
}
test("Test a suite can be filtered by name as the runner implements filterable now") {
class RanRunNotifier extends RunNotifier {
var ran: List[Description] = Nil
override def fireTestFinished(description: Description): Unit = {
ran = description :: ran
}
}
val runNotifier = new RanRunNotifier()

val runners = (new JUnitRunner(classOf[FilteredOutSuite])) ::
(new JUnitRunner(classOf[FilteredInSuite])) :: Nil
Expand Down

0 comments on commit a340d32

Please sign in to comment.