summaryrefslogtreecommitdiff
path: root/test/disabled/presentation/find-trees/src/InteractiveTest.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2011-01-26 12:07:11 +0000
committerIulian Dragos <jaguarul@gmail.com>2011-01-26 12:07:11 +0000
commitda6b846e70f2718c13d633961fea870f7448f707 (patch)
tree1e7058552614d1468d546e5a51338db4c8384bd7 /test/disabled/presentation/find-trees/src/InteractiveTest.scala
parentebafcc4e7cb4734736d6a063d49226f944d74637 (diff)
downloadscala-da6b846e70f2718c13d633961fea870f7448f707.tar.gz
scala-da6b846e70f2718c13d633961fea870f7448f707.tar.bz2
scala-da6b846e70f2718c13d633961fea870f7448f707.zip
Disabled presentation compiler tests.
Diffstat (limited to 'test/disabled/presentation/find-trees/src/InteractiveTest.scala')
-rw-r--r--test/disabled/presentation/find-trees/src/InteractiveTest.scala36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/disabled/presentation/find-trees/src/InteractiveTest.scala b/test/disabled/presentation/find-trees/src/InteractiveTest.scala
new file mode 100644
index 0000000000..a1a3f96ee0
--- /dev/null
+++ b/test/disabled/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
+ }
+}
+