diff options
author | Paul Phillips <paulp@improving.org> | 2011-02-28 21:23:59 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-02-28 21:23:59 +0000 |
commit | fdaa0a7a0178eab124d65f96e872c07c4400c94a (patch) | |
tree | 2d2e8c1214e7fb253954ac1e73e616d06d9de7e6 /test/files/jvm/interpreter.scala | |
parent | 34719ee9cb51650550cfcf849178cf5da5a93dd5 (diff) | |
download | scala-fdaa0a7a0178eab124d65f96e872c07c4400c94a.tar.gz scala-fdaa0a7a0178eab124d65f96e872c07c4400c94a.tar.bz2 scala-fdaa0a7a0178eab124d65f96e872c07c4400c94a.zip |
Break 9 tests, fix 9 tests, realize you broke t...
Break 9 tests, fix 9 tests, realize you broke the test you checked in
between +9 and -9. Fix that and generalize the repl tests a little. I
think we're all the way there. No review.
Diffstat (limited to 'test/files/jvm/interpreter.scala')
-rw-r--r-- | test/files/jvm/interpreter.scala | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/test/files/jvm/interpreter.scala b/test/files/jvm/interpreter.scala index 70ad900305..752a129950 100644 --- a/test/files/jvm/interpreter.scala +++ b/test/files/jvm/interpreter.scala @@ -1,11 +1,8 @@ import scala.tools.nsc._ -import java.io.{BufferedReader, StringReader, PrintWriter, - Writer, OutputStreamWriter} +import scala.tools.partest.ReplTest -import interpreter.ILoop - -object Test { - val testCodeString = <code> +object Test extends ReplTest { + def code = <code> // basics 3+4 def gcd(x: Int, y: Int): Int = {{ @@ -146,11 +143,7 @@ def f(e: Exp) = e match {{ // non-exhaustive warning here </code>.text - def main(args: Array[String]) { - // This drops the first line of output because the repl - // prints a version number. - (ILoop run testCodeString).lines drop 1 foreach println - + def appendix() = { val settings = new Settings settings.classpath.value = sys.props("java.class.path") val interp = new Interpreter(settings) @@ -160,4 +153,6 @@ def f(e: Exp) = e match {{ // non-exhaustive warning here interp.interpret("\"after reset\"") interp.interpret("plusOne(5) // should be undefined now") } + + appendix() } |