Skip to content

Commit 7fab830

Browse files
committed
Use tasty files as input for inspector tests
1 parent 5fe3369 commit 7fab830

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

stdlib-bootstrapped-tasty-tests/test/BootstrappedStdLibTASYyTest.scala

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,6 @@ object BootstrappedStdLibTASYyTest:
9494
def scalaLibClassesPath =
9595
java.nio.file.Paths.get(scalaLibJarPath).getParent.resolve("classes").normalize
9696

97-
val scalaLibJarTastyClassNames = {
98-
val scalaLibJar = Jar(new File(java.nio.file.Paths.get(scalaLibJarPath)))
99-
scalaLibJar.toList.map(_.toString).filter(_.endsWith(".tasty"))
100-
.map(_.stripSuffix(".tasty").replace("/", "."))
101-
.sorted
102-
}
103-
10497
val scalaLibTastyPaths =
10598
new Directory(scalaLibClassesPath).deepFiles
10699
.filter(_.`extension` == "tasty")
@@ -113,8 +106,8 @@ object BootstrappedStdLibTASYyTest:
113106
root.showExtractors // Check that we can traverse the full tree
114107
()
115108
}
116-
val classNames = scalaLibJarTastyClassNames.filterNot(blacklisted.map(_.stripSuffix(".tasty").replace("/", ".")))
117-
val hasErrors = inspector.inspectTastyFilesInJar(scalaLibJarPath)
109+
val tastyFiles = scalaLibTastyPaths.filterNot(blacklisted)
110+
val hasErrors = inspector.inspectTastyFiles(tastyFiles.map(x => scalaLibClassesPath.resolve(x).toString))
118111
assert(!hasErrors, "Errors reported while loading from TASTy")
119112

120113
def compileFromTastyInJar(blacklisted: Set[String]): Unit = {

0 commit comments

Comments
 (0)