@@ -29,13 +29,17 @@ class CompilationTests extends ParallelTesting {
29
29
30
30
@ Test def compilePos : Unit = {
31
31
compileList(" compileStdLib" , StdLibSources .whitelisted, scala2Mode.and(" -migration" , " -Yno-inline" )) +
32
- compileFilesInDir(" ../tests/pos" , defaultOptions)
33
- }.checkCompile()
34
-
35
- @ Test def compilePosScala2 : Unit =
36
- compileFilesInDir(" ../tests/pos-scala2" , scala2Mode).checkCompile()
37
-
38
- @ Test def compilePosMixedFlags : Unit = {
32
+ compileDir(" ../compiler/src/dotty/tools/dotc/ast" , defaultOptions) +
33
+ compileDir(" ../compiler/src/dotty/tools/dotc/config" , defaultOptions) +
34
+ compileDir(" ../compiler/src/dotty/tools/dotc/core" , allowDeepSubtypes) +
35
+ compileDir(" ../compiler/src/dotty/tools/dotc/transform" , allowDeepSubtypes) +
36
+ compileDir(" ../compiler/src/dotty/tools/dotc/parsing" , defaultOptions) +
37
+ compileDir(" ../compiler/src/dotty/tools/dotc/printing" , defaultOptions) +
38
+ compileDir(" ../compiler/src/dotty/tools/dotc/reporting" , defaultOptions) +
39
+ compileDir(" ../compiler/src/dotty/tools/dotc/typer" , defaultOptions) +
40
+ compileDir(" ../compiler/src/dotty/tools/dotc/util" , defaultOptions) +
41
+ compileDir(" ../compiler/src/dotty/tools/io" , defaultOptions) +
42
+ compileDir(" ../compiler/src/dotty/tools/dotc/core" , noCheckOptions ++ classPath) +
39
43
compileFile(" ../tests/pos/nullarify.scala" , defaultOptions.and(" -Ycheck:nullarify" )) +
40
44
compileFile(" ../tests/pos-scala2/rewrites.scala" , scala2Mode.and(" -rewrite" )).copyToTarget() +
41
45
compileFile(" ../tests/pos-special/t8146a.scala" , allowDeepSubtypes) +
@@ -65,23 +69,10 @@ class CompilationTests extends ParallelTesting {
65
69
" ../scala-scala/src/library/scala/collection/mutable/SetLike.scala"
66
70
),
67
71
scala2Mode
68
- )
69
- }.checkCompile()
70
-
71
- @ Test def compileCoreNoCheck : Unit =
72
- compileDir(" ../compiler/src/dotty/tools/dotc/core" , noCheckOptions ++ classPath).checkCompile()
73
-
74
- @ Test def compileDotcInternals : Unit = {
75
- compileDir(" ../compiler/src/dotty/tools/dotc/ast" , defaultOptions) +
76
- compileDir(" ../compiler/src/dotty/tools/dotc/config" , defaultOptions) +
77
- compileDir(" ../compiler/src/dotty/tools/dotc/core" , allowDeepSubtypes) +
78
- compileDir(" ../compiler/src/dotty/tools/dotc/transform" , allowDeepSubtypes) +
79
- compileDir(" ../compiler/src/dotty/tools/dotc/parsing" , defaultOptions) +
80
- compileDir(" ../compiler/src/dotty/tools/dotc/printing" , defaultOptions) +
81
- compileDir(" ../compiler/src/dotty/tools/dotc/reporting" , defaultOptions) +
82
- compileDir(" ../compiler/src/dotty/tools/dotc/typer" , defaultOptions) +
83
- compileDir(" ../compiler/src/dotty/tools/dotc/util" , defaultOptions) +
84
- compileDir(" ../compiler/src/dotty/tools/io" , defaultOptions)
72
+ ) +
73
+ compileFilesInDir(" ../tests/new" , defaultOptions) +
74
+ compileFilesInDir(" ../tests/pos-scala2" , scala2Mode)
75
+ compileFilesInDir(" ../tests/pos" , defaultOptions)
85
76
}.checkCompile()
86
77
87
78
@ Test def posTwice : Unit = {
@@ -140,17 +131,10 @@ class CompilationTests extends ParallelTesting {
140
131
)
141
132
}.times(2 ).checkCompile()
142
133
143
- // New tests -----------------------------------------------------------------
144
-
145
- @ Test def compileNew : Unit =
146
- compileFilesInDir(" ../tests/new" , defaultOptions).checkCompile()
147
-
148
134
// Negative tests ------------------------------------------------------------
149
135
150
- @ Test def compileNeg : Unit =
151
- compileShallowFilesInDir(" ../tests/neg" , defaultOptions).checkExpectedErrors()
152
-
153
- @ Test def compileNegCustomFlags : Unit = {
136
+ @ Test def compileNeg : Unit = {
137
+ compileShallowFilesInDir(" ../tests/neg" , defaultOptions) +
154
138
compileFile(" ../tests/neg/customArgs/typers.scala" , allowDoubleBindings) +
155
139
compileFile(" ../tests/neg/customArgs/overrideClass.scala" , scala2Mode) +
156
140
compileFile(" ../tests/neg/customArgs/autoTuplingTest.scala" , defaultOptions.and(" -language:noAutoTupling" )) +
@@ -180,7 +164,9 @@ class CompilationTests extends ParallelTesting {
180
164
// Pickling tests are very memory intensive and as such need to be run with a
181
165
// lower level of concurrency as to not kill their running VMs
182
166
183
- @ Test def testPickling1 : Unit = {
167
+ @ Test def testPickling : Unit = {
168
+ compileDir(" ../compiler/src/dotty/tools" , picklingOptions) +
169
+ compileDir(" ../compiler/src/dotty/tools/dotc" , picklingOptions) +
184
170
compileFilesInDir(" ../tests/new" , picklingOptions) +
185
171
compileFilesInDir(" ../tests/pickling" , picklingOptions) +
186
172
compileDir(" ../library/src/dotty/runtime" , picklingOptions) +
@@ -196,23 +182,12 @@ class CompilationTests extends ParallelTesting {
196
182
compileDir(" ../compiler/src/dotty/tools/dotc/typer" , picklingOptions) +
197
183
compileDir(" ../compiler/src/dotty/tools/dotc/util" , picklingOptions) +
198
184
compileDir(" ../compiler/src/dotty/tools/io" , picklingOptions) +
199
- compileFile(" ../tests/pos/pickleinf.scala" , picklingOptions)
200
- }.limitThreads(4 ).checkCompile()
201
-
202
- @ Test def testPickling2 : Unit = {
185
+ compileFile(" ../tests/pos/pickleinf.scala" , picklingOptions) +
203
186
compileDir(" ../compiler/src/dotty/tools/dotc/core/classfile" , picklingOptions) +
204
187
compileDir(" ../compiler/src/dotty/tools/dotc/core/tasty" , picklingOptions) +
205
188
compileDir(" ../compiler/src/dotty/tools/dotc/core/unpickleScala2" , picklingOptions)
206
189
}.limitThreads(4 ).checkCompile()
207
190
208
- @ Test def testPickling3 : Unit = {
209
- compileDir(" ../compiler/src/dotty/tools" , picklingOptions)
210
- }.limitThreads(4 ).checkCompile()
211
-
212
- @ Test def testPickling4 : Unit = {
213
- compileDir(" ../compiler/src/dotty/tools/dotc" , picklingOptions)
214
- }.limitThreads(4 ).checkCompile()
215
-
216
191
/** The purpose of this test is two-fold, being able to compile dotty
217
192
* bootstrapped, and making sure that TASTY can link against a compiled
218
193
* version of Dotty
0 commit comments