[Test] Add debug names to unnamed test disposables

- This helps to track down disposables which are never disposed, and
  reduces confusion when printing disposables in general (the names will
  now be meaningful, instead of endless lists of "newDisposable" and
  "TestDisposable").

^KT-64099
This commit is contained in:
Marco Pennekamp
2023-12-05 20:40:50 +01:00
committed by Space Team
parent bba5447b12
commit 32fe29b8cc
33 changed files with 57 additions and 34 deletions
@@ -83,7 +83,7 @@ object ExperimentalOptInUsageInSourceChecker {
private fun createProjectForParsing(): Project {
return KotlinCoreEnvironment.createForProduction(
Disposer.newDisposable(),
Disposer.newDisposable("Disposable for project of ${ExperimentalOptInUsageInSourceChecker::class.simpleName}"),
CompilerConfiguration(),
EnvironmentConfigFiles.JVM_CONFIG_FILES
).project