aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/vulpix/VulpixTests.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-04-12 12:21:30 +0200
committerGitHub <noreply@github.com>2017-04-12 12:21:30 +0200
commitd541452940007bbc094e8a7f6785b6f8e9e7da22 (patch)
treefa5d9fd6b11fe9284ccff9c841a95598dc8e43d2 /compiler/test/dotty/tools/vulpix/VulpixTests.scala
parent741ee1645a13c94fbb7edfd064b4ec092a69b1bf (diff)
parentf6d519ab713cac49c6228f142cc4ccfc8880ef10 (diff)
downloaddotty-d541452940007bbc094e8a7f6785b6f8e9e7da22.tar.gz
dotty-d541452940007bbc094e8a7f6785b6f8e9e7da22.tar.bz2
dotty-d541452940007bbc094e8a7f6785b6f8e9e7da22.zip
Merge pull request #2194 from dotty-staging/topic/hydra-part-2
Killing partest part 2 - Enter the Vulpix
Diffstat (limited to 'compiler/test/dotty/tools/vulpix/VulpixTests.scala')
-rw-r--r--compiler/test/dotty/tools/vulpix/VulpixTests.scala76
1 files changed, 76 insertions, 0 deletions
diff --git a/compiler/test/dotty/tools/vulpix/VulpixTests.scala b/compiler/test/dotty/tools/vulpix/VulpixTests.scala
new file mode 100644
index 000000000..f875e7c13
--- /dev/null
+++ b/compiler/test/dotty/tools/vulpix/VulpixTests.scala
@@ -0,0 +1,76 @@
+package dotty.tools
+package vulpix
+
+import org.junit.Assert._
+import org.junit.Test
+
+import scala.concurrent.duration._
+import scala.util.control.NonFatal
+
+/** Meta tests for the Vulpix test suite */
+class VulpixTests extends ParallelTesting {
+ import TestConfiguration._
+
+ implicit val _: SummaryReporting = new NoSummaryReport
+
+ def maxDuration = 3.seconds
+ def numberOfSlaves = 5
+ def safeMode = sys.env.get("SAFEMODE").isDefined
+ def isInteractive = !sys.env.contains("DRONE")
+ def testFilter = None
+
+ @Test def missingFile: Unit =
+ try {
+ compileFile("../tests/partest-test/i-dont-exist.scala", defaultOptions).expectFailure.checkExpectedErrors()
+ fail("didn't fail properly")
+ }
+ catch {
+ case _: IllegalArgumentException => // pass!
+ case NonFatal(_) => fail("wrong exception thrown")
+ }
+
+ @Test def pos1Error: Unit =
+ compileFile("../tests/partest-test/posFail1Error.scala", defaultOptions).expectFailure.checkCompile()
+
+ @Test def negMissingAnnot: Unit =
+ compileFile("../tests/partest-test/negMissingAnnot.scala", defaultOptions).expectFailure.checkExpectedErrors()
+
+ @Test def negAnnotWrongLine: Unit =
+ compileFile("../tests/partest-test/negAnnotWrongLine.scala", defaultOptions).expectFailure.checkExpectedErrors()
+
+ @Test def negTooManyAnnots: Unit =
+ compileFile("../tests/partest-test/negTooManyAnnots.scala", defaultOptions).expectFailure.checkExpectedErrors()
+
+ @Test def negNoPositionAnnot: Unit =
+ compileFile("../tests/partest-test/negNoPositionAnnots.scala", defaultOptions).expectFailure.checkExpectedErrors()
+
+ @Test def runCompileFail: Unit =
+ compileFile("../tests/partest-test/posFail1Error.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def runWrongOutput1: Unit =
+ compileFile("../tests/partest-test/runWrongOutput1.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def runWrongOutput2: Unit =
+ compileFile("../tests/partest-test/runWrongOutput2.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def runDiffOutput1: Unit =
+ compileFile("../tests/partest-test/runDiffOutput1.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def runStackOverflow: Unit =
+ compileFile("../tests/partest-test/stackOverflow.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def runOutRedirects: Unit =
+ compileFile("../tests/partest-test/i2147.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def infiteNonRec: Unit =
+ compileFile("../tests/partest-test/infinite.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def infiteTailRec: Unit =
+ compileFile("../tests/partest-test/infiniteTail.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def infiniteAlloc: Unit =
+ compileFile("../tests/partest-test/infiniteAlloc.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def deadlock: Unit =
+ compileFile("../tests/partest-test/deadlock.scala", defaultOptions).expectFailure.checkRuns()
+}