aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/scala/org/perl8/test/harness/SummarizedTests.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/org/perl8/test/harness/SummarizedTests.scala')
-rw-r--r--src/main/scala/org/perl8/test/harness/SummarizedTests.scala12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/scala/org/perl8/test/harness/SummarizedTests.scala b/src/main/scala/org/perl8/test/harness/SummarizedTests.scala
index 3688011..207cc18 100644
--- a/src/main/scala/org/perl8/test/harness/SummarizedTests.scala
+++ b/src/main/scala/org/perl8/test/harness/SummarizedTests.scala
@@ -9,8 +9,18 @@ import scala.concurrent.Future
import org.perl8.test.tap.{Parser,TAPEvent,TAPResult,TodoDirective}
import org.perl8.test.Test
+/** This is a trait for classes that run tests and summarize the results. It
+ * provides a single `runOneTest` method, which runs a test class and
+ * produces a stream of [[org.perl8.test.tap.TAPEvent TAP events]] which can
+ * be used to produce whatever summarized output you need.
+ */
trait SummarizedTests {
- def runOneTest (test: Test, cb: TAPEvent => Unit): TAPResult = {
+ /** Runs a single [[org.perl8.test.Test test]] instance, calling `cb` with
+ * each [[org.perl8.test.tap.TAPEvent TAP event]] as it is produced.
+ *
+ * @return The overall result of the test instance.
+ */
+ protected def runOneTest (test: Test, cb: TAPEvent => Unit): TAPResult = {
val out = new PipedOutputStream
val in = new PipedInputStream(out)