Skip to content

Commit fa3b360

Browse files
committed
Reorganize tests
1 parent c2757d9 commit fa3b360

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+18
-52
lines changed

compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,18 @@ class BootstrappedOnlyCompilationTests {
199199
compileFilesInDir("tests/plugins/neg").checkExpectedErrors()
200200
compileDir("tests/plugins/custom/analyzer", withCompilerOptions.and("-Yretain-trees")).checkCompile()
201201
}
202+
203+
// tests for experimental featuress ------------------------------------------
204+
205+
@Test def experimental: Unit =
206+
implicit val testGroup: TestGroup = TestGroup("experimental")
207+
compileFilesInDir("tests/neg-custom-args/no-experimental", defaultOptions.and("-Yno-experimental")).checkExpectedErrors()
208+
if config.Properties.experimental then
209+
compileFilesInDir("tests/run-custom-args/experimental", defaultOptions.without("-Yno-experimental")).checkRuns()
210+
compileFilesInDir("tests/neg-custom-args/experimental", defaultOptions.without("-Yno-experimental")).checkExpectedErrors()
211+
compileFilesInDir("tests/pos-custom-args/experimental", defaultOptions.without("-Yno-experimental")).checkCompile()
212+
compileFilesInDir("tests/run-staging-experimental", withStagingOptions.without("-Yno-experimental")).checkRuns()
213+
202214
}
203215

204216
object BootstrappedOnlyCompilationTests extends ParallelTesting {

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ class CompilationTests {
130130
compileFilesInDir("tests/neg-custom-args/allow-double-bindings", allowDoubleBindings),
131131
compileFilesInDir("tests/neg-custom-args/allow-deep-subtypes", allowDeepSubtypes),
132132
compileFilesInDir("tests/neg-custom-args/explicit-nulls", defaultOptions.and("-Yexplicit-nulls")),
133-
compileFilesInDir("tests/neg-custom-args/no-experimental", defaultOptions.and("-Yno-experimental")),
134133
compileDir("tests/neg-custom-args/impl-conv", defaultOptions.and("-Xfatal-warnings", "-feature")),
135134
compileFile("tests/neg-custom-args/implicit-conversions.scala", defaultOptions.and("-Xfatal-warnings", "-feature")),
136135
compileFile("tests/neg-custom-args/implicit-conversions-old.scala", defaultOptions.and("-Xfatal-warnings", "-feature")),
@@ -190,7 +189,7 @@ class CompilationTests {
190189
compileFile("tests/run-custom-args/fors.scala", defaultOptions.and("-source", "future")),
191190
compileFile("tests/run-custom-args/no-useless-forwarders.scala", defaultOptions and "-Xmixin-force-forwarders:false"),
192191
compileFile("tests/run-custom-args/defaults-serizaliable-no-forwarders.scala", defaultOptions and "-Xmixin-force-forwarders:false"),
193-
compileFilesInDir("tests/run-custom-args/erased", defaultOptions.and("-language:experimental.erasedDefinitions")),
192+
compileFilesInDir("tests/run-custom-args/erased", defaultOptions.and("-language:experimental.erasedDefinitions").without("-Yno-experimental")),
194193
compileFilesInDir("tests/run-deep-subtype", allowDeepSubtypes),
195194
compileFilesInDir("tests/run", defaultOptions.and("-Ysafe-init"))
196195
).checkRuns()
@@ -249,7 +248,6 @@ class CompilationTests {
249248
val lib =
250249
compileList("lib", librarySources,
251250
defaultOptions.and("-Ycheck-reentrant",
252-
"-language:experimental.erasedDefinitions", // support declaration of scala.compiletime.erasedValue
253251
// "-source", "future", // TODO: re-enable once we allow : @unchecked in pattern definitions. Right now, lots of narrowing pattern definitions fail.
254252
))(libGroup)
255253

compiler/test/dotty/tools/vulpix/TestConfiguration.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ object TestConfiguration {
99
val noCheckOptions = Array(
1010
"-pagewidth", "120",
1111
"-color:never",
12+
"-Yno-experimental",
1213
"-Xtarget", defaultTarget
1314
)
1415

project/Build.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ object Build {
246246

247247
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
248248

249+
scalacOptions += "-Yno-experimental",
250+
249251
// If someone puts a source file at the root (e.g., for manual testing),
250252
// don't pick it up as part of any project.
251253
sourcesInBase := false,
@@ -445,6 +447,8 @@ object Build {
445447
// Add git-hash used to package the distribution to the manifest to know it in runtime and report it in REPL
446448
packageOptions += ManifestAttributes(("Git-Hash", VersionUtil.gitHash)),
447449

450+
scalacOptions += "-Yno-experimental",
451+
448452
javaOptions ++= {
449453
val managedSrcDir = {
450454
// Populate the directory

tests/neg-with-compiler/GenericNumLits/EvenFromDigitsImpl_1.scala

Lines changed: 0 additions & 19 deletions
This file was deleted.

tests/neg-with-compiler/GenericNumLits/Even_1.scala

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/neg-with-compiler/GenericNumLits/Test_2.scala

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)