From a7a0543d4e98319e70acc44510071ce2576077b8 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 18 Mar 2016 11:33:14 +0100 Subject: Add docs to TestREPL --- test/test/TestREPL.scala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test/TestREPL.scala b/test/test/TestREPL.scala index 30dad2b64..d01038c43 100644 --- a/test/test/TestREPL.scala +++ b/test/test/TestREPL.scala @@ -5,6 +5,14 @@ import dotty.tools.dotc.core.Contexts.Context import collection.mutable import java.io.StringWriter +/** A subclass of REPL used for testing. + * It takes a transcript of a REPL session in `script`. The transcript + * starts with the first input prompt `scala> ` and ends with `scala> :quit` and a newline. + * Invoking `process()` on the `TestREPL` runs all input lines and + * collects then interleaved with REPL output in a string writer `out`. + * Invoking `check()` checks that the collected output matches the original + * `script`. + */ class TestREPL(script: String) extends REPL { private val out = new StringWriter() -- cgit v1.2.3