[JS] Use just analysis results in js ir tests
This commit is contained in:
committed by
Space Team
parent
5cf0fd116f
commit
de3f57cbdf
+10
-14
@@ -319,22 +319,18 @@ class ClassicFrontendFacade(
|
|||||||
val friendLibraries = getDependencies(module, testServices, DependencyRelation.FriendDependency)
|
val friendLibraries = getDependencies(module, testServices, DependencyRelation.FriendDependency)
|
||||||
val allDependencies = runtimeKlibs + dependencyDescriptors + friendLibraries + friendsDescriptors + transitiveLibraries
|
val allDependencies = runtimeKlibs + dependencyDescriptors + friendLibraries + friendsDescriptors + transitiveLibraries
|
||||||
|
|
||||||
val analyzer = AnalyzerWithCompilerReport(configuration)
|
|
||||||
val builtInModuleDescriptor = allDependencies.firstNotNullOfOrNull { it.builtIns }?.builtInsModule
|
val builtInModuleDescriptor = allDependencies.firstNotNullOfOrNull { it.builtIns }?.builtInsModule
|
||||||
analyzer.analyzeAndReport(files) {
|
|
||||||
TopDownAnalyzerFacadeForJSIR.analyzeFiles(
|
|
||||||
files,
|
|
||||||
project,
|
|
||||||
configuration,
|
|
||||||
allDependencies,
|
|
||||||
friendsDescriptors + friendLibraries,
|
|
||||||
compilerEnvironment,
|
|
||||||
thisIsBuiltInsModule = builtInModuleDescriptor == null,
|
|
||||||
customBuiltInsModule = builtInModuleDescriptor
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
return analyzer.analysisResult
|
return TopDownAnalyzerFacadeForJSIR.analyzeFiles(
|
||||||
|
files,
|
||||||
|
project,
|
||||||
|
configuration,
|
||||||
|
allDependencies,
|
||||||
|
friendsDescriptors + friendLibraries,
|
||||||
|
compilerEnvironment,
|
||||||
|
thisIsBuiltInsModule = builtInModuleDescriptor == null,
|
||||||
|
customBuiltInsModule = builtInModuleDescriptor
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun performWasmModuleResolve(
|
private fun performWasmModuleResolve(
|
||||||
|
|||||||
+3
-1
@@ -10,8 +10,9 @@ import org.jetbrains.kotlin.test.TargetBackend
|
|||||||
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
|
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
|
||||||
import org.jetbrains.kotlin.test.builders.classicFrontendHandlersStep
|
import org.jetbrains.kotlin.test.builders.classicFrontendHandlersStep
|
||||||
import org.jetbrains.kotlin.test.builders.classicFrontendStep
|
import org.jetbrains.kotlin.test.builders.classicFrontendStep
|
||||||
|
import org.jetbrains.kotlin.test.directives.ConfigurationDirectives
|
||||||
|
import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives
|
||||||
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives
|
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives
|
||||||
import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendFacade
|
|
||||||
import org.jetbrains.kotlin.test.frontend.classic.handlers.ClassicDiagnosticsHandler
|
import org.jetbrains.kotlin.test.frontend.classic.handlers.ClassicDiagnosticsHandler
|
||||||
import org.jetbrains.kotlin.test.frontend.classic.handlers.DeclarationsDumpHandler
|
import org.jetbrains.kotlin.test.frontend.classic.handlers.DeclarationsDumpHandler
|
||||||
import org.jetbrains.kotlin.test.frontend.classic.handlers.DynamicCallsDumpHandler
|
import org.jetbrains.kotlin.test.frontend.classic.handlers.DynamicCallsDumpHandler
|
||||||
@@ -34,6 +35,7 @@ abstract class AbstractDiagnosticsTestWithJsStdLib : AbstractKotlinCompilerTest(
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultDirectives {
|
defaultDirectives {
|
||||||
|
+ConfigurationDirectives.WITH_STDLIB
|
||||||
+JvmEnvironmentConfigurationDirectives.USE_PSI_CLASS_FILES_READING
|
+JvmEnvironmentConfigurationDirectives.USE_PSI_CLASS_FILES_READING
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user