aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/CompilationTests.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-03-14 16:38:33 +0100
committerFelix Mulder <felix.mulder@gmail.com>2017-03-29 10:33:23 +0200
commitcd345b43378a24a75a78d699546a1f8964efc88f (patch)
treeec931f406ec844dae844e668c79583ec4cedfb52 /compiler/test/dotty/tools/dotc/CompilationTests.scala
parentc52457c7554f5a0648190562e6750067f811844c (diff)
downloaddotty-cd345b43378a24a75a78d699546a1f8964efc88f.tar.gz
dotty-cd345b43378a24a75a78d699546a1f8964efc88f.tar.bz2
dotty-cd345b43378a24a75a78d699546a1f8964efc88f.zip
Add run testing capabilities
Diffstat (limited to 'compiler/test/dotty/tools/dotc/CompilationTests.scala')
-rw-r--r--compiler/test/dotty/tools/dotc/CompilationTests.scala34
1 files changed, 33 insertions, 1 deletions
diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala
index 22f7e6d91..c5c710ab1 100644
--- a/compiler/test/dotty/tools/dotc/CompilationTests.scala
+++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala
@@ -6,13 +6,36 @@ import org.junit.Test
import java.io.{ File => JFile }
class CompilationTests extends ParallelTesting {
- import CompilationTests.{ defaultOutputDir, defaultOptions }
+ import CompilationTests.{ defaultOutputDir, defaultOptions, picklingOptions }
+
+ // Positive tests ------------------------------------------------------------
@Test def compilePos =
compileFilesInDir("../tests/pos", defaultOptions).pos
+ // Negative tests ------------------------------------------------------------
+
@Test def compileNeg =
compileShallowFilesInDir("../tests/neg", defaultOptions).neg
+
+ // Run tests -----------------------------------------------------------------
+
+ @Test def runArraycopy =
+ compileFile("../tests/run/arraycopy.scala", defaultOptions).run
+
+ @Test def runAll =
+ compileFilesInDir("../tests/run", defaultOptions).run
+
+ // Pickling Tests ------------------------------------------------------------
+
+ @Test def testPickling =
+ compileFilesInDir("../tests/pickling", picklingOptions).pos
+
+ @Test def testPicklingAst =
+ compileFilesInDir("../compiler/src/dotty/tools/dotc/ast", picklingOptions).pos
+
+ @Test def testPicklingInf =
+ compileFile("../tests/pos/pickleinf.scala", picklingOptions).pos
}
object CompilationTests {
@@ -58,4 +81,13 @@ object CompilationTests {
private val yCheckOptions = Array("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef")
val defaultOptions = noCheckOptions ++ checkOptions ++ yCheckOptions ++ classPath
+ val allowDeepSubtypes = defaultOptions diff Array("-Yno-deep-subtypes")
+ val allowDoubleBindings = defaultOptions diff Array("-Yno-double-bindings")
+
+ val picklingOptions = defaultOptions ++ Array(
+ "-Xprint-types",
+ "-Ytest-pickler",
+ "-Ystop-after:pickler",
+ "-Yprintpos"
+ )
}