aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/vulpix/VulpixTests.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-04-05 16:12:43 +0200
committerFelix Mulder <felix.mulder@gmail.com>2017-04-12 11:31:13 +0200
commit923533ea86b53b90e343e4fc0f88956996a2ed5b (patch)
tree4060f34d1d811c820cc7d33a5b23331ac7b36d6b /compiler/test/dotty/tools/vulpix/VulpixTests.scala
parent7dcfbd71b1c05b4bc5e8c7e1da94fd99600e740f (diff)
downloaddotty-923533ea86b53b90e343e4fc0f88956996a2ed5b.tar.gz
dotty-923533ea86b53b90e343e4fc0f88956996a2ed5b.tar.bz2
dotty-923533ea86b53b90e343e4fc0f88956996a2ed5b.zip
Move vulpix to `dotty.tools.vulpix`
Diffstat (limited to 'compiler/test/dotty/tools/vulpix/VulpixTests.scala')
-rw-r--r--compiler/test/dotty/tools/vulpix/VulpixTests.scala61
1 files changed, 61 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..bebcc7601
--- /dev/null
+++ b/compiler/test/dotty/tools/vulpix/VulpixTests.scala
@@ -0,0 +1,61 @@
+package dotty.tools
+package vulpix
+
+import org.junit.Assert._
+import org.junit.Test
+
+import scala.concurrent.duration._
+import scala.util.control.NonFatal
+
+class VulpixTests extends ParallelTesting {
+ import dotc.CompilationTests._
+
+ 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()
+}