Skip to content

Commit

Permalink
Delete dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge authored and tgodzik committed Sep 15, 2023
1 parent f5729fa commit f755d89
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions munit/shared/src/main/scala/munit/MUnitRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -361,40 +361,6 @@ class MUnitRunner(val cls: Class[_ <: Suite], newInstance: () => Suite)
}
}

private[munit] class ForeachUnsafeResult(
val sync: Try[Unit],
val async: List[Future[Any]]
)
private def foreachUnsafe(
thunks: Iterable[() => Any]
): ForeachUnsafeResult = {
var errors = mutable.ListBuffer.empty[Throwable]
val async = mutable.ListBuffer.empty[Future[Any]]
thunks.foreach { thunk =>
try {
thunk() match {
case f: Future[_] =>
async += f
case _ =>
}
} catch {
case ex if NonFatal(ex) =>
errors += ex
}
}
errors.toList match {
case head :: tail =>
tail.foreach { e =>
if (e ne head) {
head.addSuppressed(e)
}
}
new ForeachUnsafeResult(scala.util.Failure(head), Nil)
case _ =>
new ForeachUnsafeResult(scala.util.Success(()), Nil)
}
}

private def runHiddenTest(
notifier: RunNotifier,
name: String,
Expand Down

0 comments on commit f755d89

Please sign in to comment.