aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOndrej Lhotak <olhotak@uwaterloo.ca>2014-10-08 16:55:49 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-11-22 20:10:21 +0100
commit2c5959b3a52b468e123a1f75d47cf053ce1e272a (patch)
treeaf5b1a244e1603ba31d5e60db81830bf6edc71d4 /test
parent07c4c96aff715a4ec856ccec405f92448a8610e0 (diff)
downloaddotty-2c5959b3a52b468e123a1f75d47cf053ce1e272a.tar.gz
dotty-2c5959b3a52b468e123a1f75d47cf053ce1e272a.tar.bz2
dotty-2c5959b3a52b468e123a1f75d47cf053ce1e272a.zip
support running java-interop tests
Diffstat (limited to 'test')
-rw-r--r--test/dotc/tests.scala7
-rw-r--r--test/test/CompilerTest.scala6
2 files changed, 10 insertions, 3 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index 8553ecb29..3f1801a50 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -137,5 +137,12 @@ class tests extends CompilerTest {
"-Xprompt",
"#runs", "2"))
+ val javaDir = "./tests/disabled/java-interop/"
+ @Test def java_all = compileFiles(javaDir+"pos/")
+
+ @Test def java_2409 = compileDir(javaDir+"failing/t2409")
+ @Test def java_1751 = compileDir(javaDir+"failing/t1751")
+ @Test def java_294 = compileDir(javaDir+"failing/t294")
+
//@Test def dotc_compilercommand = compileFile(dotcDir + "tools/dotc/config/", "CompilerCommand")
}
diff --git a/test/test/CompilerTest.scala b/test/test/CompilerTest.scala
index c9c7c602b..ccee7467f 100644
--- a/test/test/CompilerTest.scala
+++ b/test/test/CompilerTest.scala
@@ -28,13 +28,13 @@ class CompilerTest extends DottyTest {
case "-deep" :: args1 => (dir.deepFiles, args1)
case _ => (dir.files, args)
}
- val fileNames = files.toArray.map(_.toString).filter(_ endsWith ".scala")
+ val fileNames = files.toArray.map(_.toString).filter(name => (name endsWith ".scala") || (name endsWith ".java"))
compileArgs(fileNames ++ normArgs, xerrors)
}
def compileFiles(path: String, args: List[String] = Nil)(implicit defaultOptions: List[String]): Unit = {
val dir = Directory(path)
- val fileNames = dir.files.toArray.map(_.toString).filter(_ endsWith ".scala")
+ val fileNames = dir.files.toArray.map(_.toString).filter(name => (name endsWith ".scala") || (name endsWith ".java"))
for (name <- fileNames) {
println(s"testing $name")
compileArgs((name :: args).toArray, 0)
@@ -57,4 +57,4 @@ object CompilerTest extends App {
// new CompilerTest().compileDir(dotcDir + "tools/dotc")
// new CompilerTest().compileFile(dotcDir + "tools/dotc/", "Run")
-} \ No newline at end of file
+}