[LL FIR] AbstractCompilerBasedTestForFir: convert receiver to parameter
to allow using super call from implementations ^KT-66232
This commit is contained in:
committed by
Space Team
parent
4b5eac7816
commit
d6b3f6f352
+20
-15
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -19,29 +19,34 @@ import org.jetbrains.kotlin.test.runners.configurationForClassicAndFirTestsAlong
|
||||
import org.jetbrains.kotlin.utils.bind
|
||||
|
||||
abstract class AbstractLLFirNativeTestBase : AbstractCompilerBasedTestForFir() {
|
||||
override fun configureTest(builder: TestConfigurationBuilder) {
|
||||
with(builder) {
|
||||
globalDefaults {
|
||||
targetPlatform = NativePlatforms.unspecifiedNativePlatform
|
||||
}
|
||||
|
||||
protected fun TestConfigurationBuilder.baseConfiguration() {
|
||||
globalDefaults {
|
||||
targetPlatform = NativePlatforms.unspecifiedNativePlatform
|
||||
baseFirNativeDiagnosticTestConfiguration()
|
||||
configurationForClassicAndFirTestsAlongside(::ReversedFirIdenticalChecker)
|
||||
}
|
||||
baseFirNativeDiagnosticTestConfiguration()
|
||||
configurationForClassicAndFirTestsAlongside(::ReversedFirIdenticalChecker)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
abstract class AbstractLLFirNativeTest : AbstractLLFirNativeTestBase() {
|
||||
override fun TestConfigurationBuilder.configureTest() {
|
||||
baseNativeDiagnosticTestConfiguration(::LowLevelFirFrontendFacade.bind(LLFirAnalyzerFacadeFactoryWithoutPreresolve))
|
||||
baseConfiguration()
|
||||
useAfterAnalysisCheckers(::LLFirOnlyNonReversedTestSuppressor)
|
||||
override fun configureTest(builder: TestConfigurationBuilder) {
|
||||
with(builder) {
|
||||
baseNativeDiagnosticTestConfiguration(::LowLevelFirFrontendFacade.bind(LLFirAnalyzerFacadeFactoryWithoutPreresolve))
|
||||
super.configureTest(builder)
|
||||
useAfterAnalysisCheckers(::LLFirOnlyNonReversedTestSuppressor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AbstractLLFirReversedNativeTest : AbstractLLFirNativeTestBase() {
|
||||
override fun TestConfigurationBuilder.configureTest() {
|
||||
baseNativeDiagnosticTestConfiguration(::LowLevelFirFrontendFacade.bind(LLFirAnalyzerFacadeFactoryWithPreresolveInReversedOrder))
|
||||
baseConfiguration()
|
||||
useAfterAnalysisCheckers(::LLFirOnlyReversedTestSuppressor)
|
||||
override fun configureTest(builder: TestConfigurationBuilder) {
|
||||
with(builder) {
|
||||
baseNativeDiagnosticTestConfiguration(::LowLevelFirFrontendFacade.bind(LLFirAnalyzerFacadeFactoryWithPreresolveInReversedOrder))
|
||||
super.configureTest(builder)
|
||||
useAfterAnalysisCheckers(::LLFirOnlyReversedTestSuppressor)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user