@@ -2,32 +2,21 @@ package dotty
2
2
package tools
3
3
package dotc
4
4
5
- import org .junit .{ AfterClass , Test }
6
- import vulpix ._
5
+ import org .junit .Test
6
+ import org . junit . Assert ._
7
7
8
- import scala . concurrent . duration . _
8
+ import vulpix . TestConfiguration . mkClassPath
9
9
10
- class MissingCoreLibTests extends ParallelTesting {
11
- import MissingCoreLibTests ._
12
- import TestConfiguration ._
13
-
14
- // Test suite configuration --------------------------------------------------
15
-
16
- def maxDuration = 30 .seconds
17
- def numberOfSlaves = 5
18
- def safeMode = Properties .testsSafeMode
19
- def isInteractive = SummaryReport .isInteractive
20
- def testFilter = Properties .testsFilter
10
+ class MissingCoreLibTests {
21
11
22
12
@ Test def missingDottyLib : Unit = {
23
13
val classPath = mkClassPath(Jars .dottyCompiler :: Jars .dottyInterfaces :: Jars .dottyExtras) // missing Jars.dottyLib
24
- val options = noCheckOptions ++ checkOptions ++ yCheckOptions
25
- compileFile(" ../tests/neg/nolib/Foo.scala" , TestFlags (classPath, options)).checkExpectedErrors()
14
+ val source = " ../tests/neg/nolib/Foo.scala"
15
+ val options = Array (" -classpath" , classPath, source)
16
+ val reporter = Main .process(options)
17
+ assertEquals(1 , reporter.errorCount)
18
+ val errorMessage = reporter.allErrors.head.message
19
+ assertTrue(errorMessage.contains(" Make sure the compiler core libraries are on the classpath" ))
26
20
}
27
21
28
22
}
29
-
30
- object MissingCoreLibTests {
31
- implicit val summaryReport : SummaryReporting = new SummaryReport
32
- @ AfterClass def cleanup (): Unit = summaryReport.echoSummary()
33
- }
0 commit comments