@@ -2,44 +2,42 @@ package dotty
2
2
package tools
3
3
package dotc
4
4
5
- import scala .concurrent .duration ._
6
- import dotty .tools .vulpix ._
7
- import org .junit .{ Test , AfterClass }
5
+ import dotty .tools .vulpix .*
8
6
import reporting .TestReporter
9
- import java .io .{File => JFile }
10
7
8
+ import scala .concurrent .duration .*
11
9
import scala .language .unsafeNulls
12
10
11
+ import java .io .{File => JFile }
12
+ import org .junit .{AfterClass , Test }
13
+
13
14
class BestEffortOptionsTests {
14
- import ParallelTesting ._
15
- import vulpix .TestConfiguration ._
16
- import BestEffortOptionsTests ._
17
- import CompilationTest .aggregateTests
15
+ import ParallelTesting .*
16
+ import vulpix .TestConfiguration .*
17
+ import BestEffortOptionsTests .*
18
18
19
19
// Since TASTy and beTASTy files are read in a lazy manner (only when referenced by the source .scala file)
20
20
// we test by using the "-from-tasty" option. This guarantees that the tasty files will be read
21
21
// (and that the Best Effort TASTy reader will be tested), but we unfortunately skip the useful
22
22
// interactions a tree derived from beTASTy could have with other frontend phases.
23
- @ Test def negTestFromBestEffortTasty : Unit = {
23
+ @ Test def negTestFromBestEffortTasty : Unit =
24
24
// Can be reproduced with
25
25
// > sbt
26
- // > scalac -- Ybest-effort -Xsemanticdb <source>
27
- // > scalac -- from-tasty -Ywith-best-effort-tasty META_INF/best-effort/<betasty>
26
+ // > scalac -Ybest-effort -Xsemanticdb <source>
27
+ // > scalac -from-tasty -Ywith-best-effort-tasty META_INF/best-effort/<betasty>
28
28
29
- implicit val testGroup : TestGroup = TestGroup (" negTestFromBestEffortTasty" )
29
+ given TestGroup = TestGroup (" negTestFromBestEffortTasty" )
30
30
compileBestEffortTastyInDir(s " tests ${JFile .separator}neg " , bestEffortBaselineOptions,
31
31
picklingFilter = FileFilter .exclude(TestSources .negBestEffortPicklingExcludelisted),
32
32
unpicklingFilter = FileFilter .exclude(TestSources .negBestEffortUnpicklingExcludelisted)
33
33
).checkNoCrash()
34
- }
35
34
36
35
// Tests an actual use case of this compilation mode, where symbol definitions of the downstream
37
36
// projects depend on the best effort tasty files generated with the Best Effort dir option
38
- @ Test def bestEffortIntergrationTest : Unit = {
39
- implicit val testGroup : TestGroup = TestGroup (" bestEffortIntegrationTests" )
37
+ @ Test def bestEffortIntegrationTest : Unit =
38
+ given TestGroup = TestGroup (" bestEffortIntegrationTests" )
40
39
compileBestEffortIntegration(s " tests ${JFile .separator}best-effort " , bestEffortBaselineOptions)
41
40
.noCrashWithCompilingDependencies()
42
- }
43
41
}
44
42
45
43
object BestEffortOptionsTests extends ParallelTesting {
0 commit comments