Skip to content

Commit f70c6a3

Browse files
committed
Split blacklist
1 parent 0cbee8f commit f70c6a3

10 files changed

+50
-41
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## See #18882
2+
t9312.scala
3+
unapplySeq-implicit-arg.scala
4+
unapplySeq-implicit-arg2.scala
5+
unapplySeq-implicit-arg3.scala
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
i8752.scala
2+
f-interpolator-neg.scala # Additional: A pure expression does nothing in statement position
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
t7746.scala # order of exhaustivity suggestions differs
2+
t4408.scala # order of exhaustivity suggestions differs
3+
patmat-ortype.scala # order of exhaustivity suggestions differs
4+
i13003.scala # order of exhaustivity suggestions differs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## See #18882
2+
patmat.scala
3+
patmat-interpolator.scala
4+
unapplySeq-implicit-arg-pos.scala
5+
global-cycle11.scala
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Checkfile differences for equivalent type
2+
tasty-extractors-1
3+
tasty-extractors-2
4+
tasty-extractors-types

compiler/test/dotc/scala2-library-tasty.blacklist

-30
This file was deleted.

compiler/test/dotty/tools/TestSources.scala

+24-5
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,51 @@ object TestSources {
1717
def posTestRecheckExcludesFile: String = "compiler/test/dotc/pos-test-recheck.excludes"
1818
def posLazyValsAllowlistFile: String = "compiler/test/dotc/pos-lazy-vals-tests.allowlist"
1919
def posLintingAllowlistFile: String = "compiler/test/dotc/pos-linting.allowlist"
20+
def posInitGlobalScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist"
2021

2122
def posFromTastyBlacklisted: List[String] = loadList(posFromTastyBlacklistFile)
2223
def posTestPicklingBlacklisted: List[String] = loadList(posTestPicklingBlacklistFile)
2324
def posTestRecheckExcluded: List[String] = loadList(posTestRecheckExcludesFile)
2425
def posLazyValsAllowlist: List[String] = loadList(posLazyValsAllowlistFile)
2526
def posLintingAllowlist: List[String] = loadList(posLintingAllowlistFile)
27+
def posInitGlobalScala2LibraryTastyBlacklisted: List[String] =
28+
if Properties.usingScalaLibraryTasty then loadList(posInitGlobalScala2LibraryTastyBlacklistFile)
29+
else Nil
2630

2731
// run tests lists
2832

2933
def runFromTastyBlacklistFile: String = "compiler/test/dotc/run-from-tasty.blacklist"
3034
def runTestPicklingBlacklistFile: String = "compiler/test/dotc/run-test-pickling.blacklist"
3135
def runTestRecheckExcludesFile: String = "compiler/test/dotc/run-test-recheck.excludes"
3236
def runLazyValsAllowlistFile: String = "compiler/test/dotc/run-lazy-vals-tests.allowlist"
33-
37+
def runMacrosScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/run-macros-scala2-library-tasty.blacklist"
3438

3539
def runFromTastyBlacklisted: List[String] = loadList(runFromTastyBlacklistFile)
3640
def runTestPicklingBlacklisted: List[String] = loadList(runTestPicklingBlacklistFile)
3741
def runTestRecheckExcluded: List[String] = loadList(runTestRecheckExcludesFile)
3842
def runLazyValsAllowlist: List[String] = loadList(runLazyValsAllowlistFile)
43+
def runMacrosScala2LibraryTastyBlacklisted: List[String] =
44+
if Properties.usingScalaLibraryTasty then loadList(runMacrosScala2LibraryTastyBlacklistFile)
45+
else Nil
46+
47+
// neg tests lists
48+
49+
def negScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/neg-scala2-library-tasty.blacklist"
50+
def negInitGlobalScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist"
51+
52+
def negScala2LibraryTastyBlacklisted: List[String] =
53+
if Properties.usingScalaLibraryTasty then loadList(negScala2LibraryTastyBlacklistFile)
54+
else Nil
55+
def negInitGlobalScala2LibraryTastyBlacklisted: List[String] =
56+
if Properties.usingScalaLibraryTasty then loadList(negInitGlobalScala2LibraryTastyBlacklistFile)
57+
else Nil
3958

40-
// other lists
59+
// patmat tests lists
4160

42-
def scala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/scala2-library-tasty.blacklist"
61+
def patmatExhaustivityScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist"
4362

44-
def scala2LibraryTastyBlacklisted: List[String] =
45-
if Properties.usingScalaLibraryTasty then loadList(scala2LibraryTastyBlacklistFile)
63+
def patmatExhaustivityScala2LibraryTastyBlacklisted: List[String] =
64+
if Properties.usingScalaLibraryTasty then loadList(patmatExhaustivityScala2LibraryTastyBlacklistFile)
4665
else Nil
4766

4867
// load lists

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class BootstrappedOnlyCompilationTests {
120120

121121
@Test def runMacros: Unit = {
122122
implicit val testGroup: TestGroup = TestGroup("runMacros")
123-
compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros"), FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted))
123+
compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros"), FileFilter.exclude(TestSources.runMacrosScala2LibraryTastyBlacklisted))
124124
.checkRuns()
125125
}
126126

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class CompilationTests {
133133
@Test def negAll: Unit = {
134134
implicit val testGroup: TestGroup = TestGroup("compileNeg")
135135
aggregateTests(
136-
compileFilesInDir("tests/neg", defaultOptions, FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)),
136+
compileFilesInDir("tests/neg", defaultOptions, FileFilter.exclude(TestSources.negScala2LibraryTastyBlacklisted)),
137137
compileFilesInDir("tests/neg-deep-subtype", allowDeepSubtypes),
138138
compileFilesInDir("tests/neg-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")),
139139
compileFile("tests/neg-custom-args/sourcepath/outer/nested/Test1.scala", defaultOptions.and("-sourcepath", "tests/neg-custom-args/sourcepath")),
@@ -156,7 +156,7 @@ class CompilationTests {
156156
@Test def runAll: Unit = {
157157
implicit val testGroup: TestGroup = TestGroup("runAll")
158158
aggregateTests(
159-
compileFilesInDir("tests/run", defaultOptions.and("-Ysafe-init"), FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)),
159+
compileFilesInDir("tests/run", defaultOptions.and("-Ysafe-init")),
160160
compileFilesInDir("tests/run-deep-subtype", allowDeepSubtypes),
161161
compileFilesInDir("tests/run-custom-args/captures", allowDeepSubtypes.and("-language:experimental.captureChecking")),
162162
// Run tests for legacy lazy vals.
@@ -216,8 +216,8 @@ class CompilationTests {
216216
@Test def checkInitGlobal: Unit = {
217217
implicit val testGroup: TestGroup = TestGroup("checkInitGlobal")
218218
val options = defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings")
219-
compileFilesInDir("tests/init-global/neg", options, FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)).checkExpectedErrors()
220-
compileFilesInDir("tests/init-global/pos", options, FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)).checkCompile()
219+
compileFilesInDir("tests/init-global/neg", options, FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklistFile)).checkExpectedErrors()
220+
compileFilesInDir("tests/init-global/pos", options, FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyBlacklistFile)).checkCompile()
221221
}
222222

223223
// initialization tests

compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class PatmatExhaustivityTest {
6363

6464
@Test
6565
def patmatExhaustivity: Unit = {
66-
val blacklisted = TestSources.scala2LibraryTastyBlacklisted.toSet
66+
val blacklisted = TestSources.patmatExhaustivityScala2LibraryTastyBlacklisted.toSet
6767
val res = Directory(testsDir).list.toList
6868
.filter(f => f.extension == "scala" || f.isDirectory)
6969
.filter { f =>

0 commit comments

Comments
 (0)