summaryrefslogtreecommitdiff
path: root/test/files/presentation/find-trees/src
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2011-01-27 10:03:48 +0000
committerIulian Dragos <jaguarul@gmail.com>2011-01-27 10:03:48 +0000
commitdb25b914f56884d5d36b1e16191b0ce870e57faf (patch)
tree7b86b1756cf8b27628ebc289242074b097d26438 /test/files/presentation/find-trees/src
parent942d844aebc63dd417c77911acf565bf1e2c027d (diff)
downloadscala-db25b914f56884d5d36b1e16191b0ce870e57faf.tar.gz
scala-db25b914f56884d5d36b1e16191b0ce870e57faf.tar.bz2
scala-db25b914f56884d5d36b1e16191b0ce870e57faf.zip
Re-enabled one presentation compiler test.
Diffstat (limited to 'test/files/presentation/find-trees/src')
-rw-r--r--test/files/presentation/find-trees/src/InteractiveTest.scala36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/files/presentation/find-trees/src/InteractiveTest.scala b/test/files/presentation/find-trees/src/InteractiveTest.scala
new file mode 100644
index 0000000000..a1a3f96ee0
--- /dev/null
+++ b/test/files/presentation/find-trees/src/InteractiveTest.scala
@@ -0,0 +1,36 @@
+package scala.tools.nsc.interactive
+package tests
+
+import scala.tools.nsc.Settings
+import scala.tools.nsc.reporters.StoreReporter
+import scala.tools.nsc.util.{BatchSourceFile, SourceFile, Position}
+import scala.tools.nsc.io._
+
+/** A base class for writing interactive compiler tests.
+ *
+ * @author Iulian Dragos
+ *
+ */
+abstract class InteractiveTest {
+
+ val settings = new Settings
+ val reporter= new StoreReporter
+
+ settings.YpresentationDebug.value = true
+ lazy val compiler: CompilerControl = new Global(settings, reporter)
+
+ def sources(filename: String*): Seq[SourceFile] =
+ filename map source
+
+ def source(filename: String) = new BatchSourceFile(AbstractFile.getFile(filename))
+
+ def pos(filename: String, line: Int, col: Int): Position =
+ source(filename).position(line, col)
+
+ def runTest: Unit
+
+ def main(args: Array[String]) {
+ runTest
+ }
+}
+