aboutsummaryrefslogtreecommitdiff
path: root/test/test/CompilerTest.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-21 19:36:28 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-21 19:36:28 +0100
commit115e13b323e9ca845302a2c0ee0367e03cb8379b (patch)
tree65641e22bd8e9fe790f1ec85eea078c9dae8a99f /test/test/CompilerTest.scala
parentbdb19a8ef9cf7caf108d9326108dc51a6b76cc15 (diff)
downloaddotty-115e13b323e9ca845302a2c0ee0367e03cb8379b.tar.gz
dotty-115e13b323e9ca845302a2c0ee0367e03cb8379b.tar.bz2
dotty-115e13b323e9ca845302a2c0ee0367e03cb8379b.zip
Starting to test compiling the compiler.
Diffstat (limited to 'test/test/CompilerTest.scala')
-rw-r--r--test/test/CompilerTest.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test/CompilerTest.scala b/test/test/CompilerTest.scala
index 00c288546..106020106 100644
--- a/test/test/CompilerTest.scala
+++ b/test/test/CompilerTest.scala
@@ -20,4 +20,23 @@ class CompilerTest extends DottyTest {
def compileFile(prefix: String, fileName: String, args: List[String] = Nil, xerrors: Int = 0): Unit =
compileArgs((s"$prefix$fileName.scala" :: args).toArray, xerrors)
+ def compileDir(path: String, args: List[String] = Nil, xerrors: Int = 0): Unit = {
+ val dir = Directory(path)
+ val fileNames = dir.files.toArray.map(_.toString).filter(_ endsWith ".scala")
+ compileArgs(fileNames ++ args, xerrors)
+ }
+
+}
+object CompilerText extends App {
+
+// val dotcDir = "/Users/odersky/workspace/dotty/src/dotty/"
+
+// new CompilerTest().compileFile(dotcDir + "tools/dotc/", "CompilationUnit")
+// new CompilerTest().compileFile(dotcDir + "tools/dotc/", "Compiler")
+// new CompilerTest().compileFile(dotcDir + "tools/dotc/", "Driver")
+// new CompilerTest().compileFile(dotcDir + "tools/dotc/", "Main")
+// new CompilerTest().compileFile(dotcDir + "tools/dotc/", "Run")
+
+// new CompilerTest().compileDir(dotcDir + "tools/dotc")
+ // new CompilerTest().compileFile(dotcDir + "tools/dotc/", "Run")
} \ No newline at end of file