11package dotty .tools
22package dotc
33
4+ import reporting .StoreReporter
45import vulpix .TestConfiguration
56
6- import org .junit .Test
7- import org .junit .Assert ._
7+ import dotty .tools .vulpix .TestConfiguration .mkClasspath
88
99import java .nio .file ._
1010
11- import dotty .tools .vulpix .TestConfiguration .mkClasspath
11+ import org .junit .Test
12+ import org .junit .Assert ._
1213
1314class SettingsTests {
1415
15- @ Test def missingOutputDir : Unit = {
16+ @ Test def missingOutputDir : Unit =
1617 val options = Array (" -d" , " not_here" )
17- val reporter = Main .process(options)
18+ val reporter = Main .process(options, reporter = StoreReporter () )
1819 assertEquals(1 , reporter.errorCount)
1920 assertEquals(" 'not_here' does not exist or is not a directory or .jar file" , reporter.allErrors.head.message)
20- }
2121
2222 @ Test def jarOutput : Unit = {
2323 val source = " tests/pos/Foo.scala"
@@ -29,13 +29,12 @@ class SettingsTests {
2929 assertTrue(Files .exists(out))
3030 }
3131
32- @ Test def t8124 : Unit = {
33- val source = Paths .get(" tests/pos/Foo.scala" ).normalize
32+ @ Test def t8124 : Unit =
33+ val source = Paths .get(" tests/pos/Foo.scala" ).normalize
3434 val outputDir = Paths .get(" out/testSettings" ).normalize
35- if (Files .notExists(outputDir)) Files .createDirectory(outputDir)
36- val options = Array (" -encoding" , " -d" , outputDir.toString, source.toString)
37- val reporter = Main .process(options)
35+ if Files .notExists(outputDir)
36+ Files .createDirectory(outputDir)
37+ val options = Array (" -encoding" , " -d" , outputDir.toString, source.toString)
38+ val reporter = Main .process(options, reporter = StoreReporter ())
3839 assertEquals(1 , reporter.errorCount)
39- }
40-
4140}
0 commit comments