diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-04-03 17:04:46 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-04-12 11:21:56 +0200 |
commit | d65e4eadaf5c9fbed379680de591bb3ef42c6b3d (patch) | |
tree | 32d8e235c3940b986ad3ed41909033ff8441cfde /compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala | |
parent | 741ee1645a13c94fbb7edfd064b4ec092a69b1bf (diff) | |
download | dotty-d65e4eadaf5c9fbed379680de591bb3ef42c6b3d.tar.gz dotty-d65e4eadaf5c9fbed379680de591bb3ef42c6b3d.tar.bz2 dotty-d65e4eadaf5c9fbed379680de591bb3ef42c6b3d.zip |
Rename test suite to "vulpix"
Diffstat (limited to 'compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala')
-rw-r--r-- | compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala b/compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala new file mode 100644 index 000000000..dea5aa777 --- /dev/null +++ b/compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala @@ -0,0 +1,59 @@ +package dotty +package tools +package dotc +package vulpix + +import org.junit.Assert._ +import org.junit.Test + +import scala.util.control.NonFatal + +class VulpixTests extends ParallelTesting { + import CompilationTests._ + + 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() +} |