org.scalatest.StopOnFailureReporter.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalatest_2.9.0 Show documentation
Show all versions of scalatest_2.9.0 Show documentation
ScalaTest is a free, open-source testing toolkit for Scala and Java
programmers.
package org.scalatest
import events.Event
import org.scalatest.events.TestFailed
import java.io.PrintStream
import DispatchReporter.propagateDispose
private[scalatest] class StopOnFailureReporter(dispatch: Reporter, stopper: Stopper, val out: PrintStream) extends CatchReporter {
def doApply(event: Event) {
event match {
case testFailed: TestFailed => stopper.requestStop()
case _ =>
}
dispatch(event)
}
def doDispose() {
propagateDispose(dispatch)
}
}