@@ -3,30 +3,24 @@ package vulpix
33
44import java .io .{File => JFile }
55import org .junit .Assert ._
6- import org .junit .Test
6+ import org .junit .{ Test , AfterClass }
77
88import scala .concurrent .duration ._
99import scala .util .control .NonFatal
1010
1111/** Unit tests for the Vulpix test suite */
12- class VulpixUnitTests extends ParallelTesting {
12+ class VulpixUnitTests {
13+ import VulpixUnitTests ._
1314 import TestConfiguration ._
1415
1516 implicit val _: SummaryReporting = new NoSummaryReport
1617
1718 implicit def testGroup : TestGroup = TestGroup (" VulpixTests" )
1819
19- def maxDuration = 3 .seconds
20- def numberOfSlaves = 5
21- def safeMode = sys.env.get(" SAFEMODE" ).isDefined
22- def isInteractive = ! sys.env.contains(" DRONE" )
23- def testFilter = None
24- def updateCheckFiles : Boolean = false
25-
2620 // To fail with something else than an AssertionError
2721 def fail (): Unit = throw new Exception (" didn't fail properly" )
2822
29- @ Test def missingFile : Unit = if ( ! scala.util. Properties .isWin)
23+ @ Test def missingFile : Unit =
3024 try {
3125 compileFile(" tests/vulpix-tests/unit/i-dont-exist.scala" , defaultOptions).expectFailure.checkExpectedErrors()
3226 fail()
@@ -64,7 +58,7 @@ class VulpixUnitTests extends ParallelTesting {
6458 @ Test def runDiffOutput1 : Unit =
6559 compileFile(" tests/vulpix-tests/unit/runDiffOutput1.scala" , defaultOptions).expectFailure.checkRuns()
6660
67- @ Test def runStackOverflow : Unit = if ( ! scala.util. Properties .isWin)
61+ @ Test def runStackOverflow : Unit =
6862 compileFile(" tests/vulpix-tests/unit/stackOverflow.scala" , defaultOptions).expectFailure.checkRuns()
6963
7064 @ Test def runOutRedirects : Unit =
@@ -82,15 +76,15 @@ class VulpixUnitTests extends ParallelTesting {
8276 @ Test def deadlock : Unit =
8377 compileFile(" tests/vulpix-tests/unit/deadlock.scala" , defaultOptions).expectFailure.checkRuns()
8478
85- @ Test def badJava : Unit = if ( ! scala.util. Properties .isWin)
79+ @ Test def badJava : Unit =
8680 try {
8781 compileFile(" tests/vulpix-tests/unit/BadJava.java" , defaultOptions).suppressAllOutput.checkCompile()
8882 fail()
8983 } catch {
9084 case ae : AssertionError => assertTrue(ae.getMessage.contains(" java compilation failed" ))
9185 }
9286
93- @ Test def runTimeout : Unit = if ( ! scala.util. Properties .isWin) {
87+ @ Test def runTimeout : Unit = {
9488 val fileName = s " tests/vulpix-tests/unit/timeout.scala "
9589 try {
9690 compileFile(fileName, defaultOptions).checkRuns()
@@ -103,3 +97,16 @@ class VulpixUnitTests extends ParallelTesting {
10397 }
10498 }
10599}
100+
101+
102+ object VulpixUnitTests extends ParallelTesting {
103+ def maxDuration = 3 .seconds
104+ def numberOfSlaves = 5
105+ def safeMode = sys.env.get(" SAFEMODE" ).isDefined
106+ def isInteractive = ! sys.env.contains(" DRONE" )
107+ def testFilter = None
108+ def updateCheckFiles : Boolean = false
109+
110+ @ AfterClass
111+ def tearDown () = this .cleanup()
112+ }
0 commit comments