Skip to content

Commit 8caa390

Browse files
committed
Remove Suite.
1 parent 9f75148 commit 8caa390

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

modules/core/shared/src/main/scala/weaver/Runner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Runner[F[_]: Async](
1919
// Signaling option, because we need to detect completion
2020
private type Channel[A] = Queue[F, Option[A]]
2121

22-
def run(suites: fs2.Stream[F, Suite[F]]): F[Outcome] =
22+
def run(suites: fs2.Stream[F, EffectSuite[F]]): F[Outcome] =
2323
for {
2424
buffer <- Ref[F].of(Chain.empty[SpecEvent])
2525
channel <- Queue.unbounded[F, Option[SpecEvent]]

modules/core/shared/src/main/scala/weaver/suites.scala

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,28 @@ import org.junit.runner.RunWith
1414
@EnableReflectiveInstantiation
1515
trait BaseSuiteClass {}
1616

17-
trait Suite[F[_]] extends BaseSuiteClass {
18-
def name: String
19-
def spec(args: List[String]): Stream[F, TestOutcome]
20-
}
21-
2217
// A version of EffectSuite that has a type member instead of a type parameter.
2318
protected[weaver] trait EffectSuiteAux {
2419
type EffectType[A]
2520
implicit protected def effect: Async[EffectType]
2621
}
2722

28-
trait EffectSuite[F[_]] extends Suite[F] with EffectSuiteAux
23+
trait EffectSuite[F[_]] extends EffectSuiteAux
2924
with SourceLocation.Here { self =>
3025

3126
final type EffectType[A] = F[A]
3227
implicit protected def effectCompat: EffectCompat[F]
3328
implicit final protected def effect: Async[F] = effectCompat.effect
3429

35-
override def name: String = self.getClass.getName.replace("$", "")
30+
def name: String = self.getClass.getName.replace("$", "")
3631

3732
protected def adaptRunError: PartialFunction[Throwable, Throwable] =
3833
PartialFunction.empty
3934

4035
final def run(args: List[String])(report: TestOutcome => F[Unit]): F[Unit] =
4136
spec(args).evalMap(report).compile.drain.adaptErr(adaptRunError)
37+
38+
def spec(args: List[String]): Stream[F, TestOutcome]
4239
}
4340

4441
@RunWith(classOf[weaver.junit.WeaverRunner])

modules/docs/shared/src/main/scala/main/scala/weaver/Output.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object Output {
1717
if (s.endsWith("\n")) s.substring(0, s.length - 2) else s
1818
}
1919

20-
def runSuites(s: Suite[IO]*): String = {
20+
def runSuites(s: EffectSuite[IO]*): String = {
2121
import cats.effect.unsafe.implicits.global
2222
val header = "<div class='terminal'><pre>"
2323
val footer = "</pre></div>"

0 commit comments

Comments
 (0)