Tests: minor, inline helper functions used only once
This commit is contained in:
committed by
Space Team
parent
0c77fa1fa4
commit
c62f8c886b
+6
-1
@@ -9,9 +9,11 @@ import org.jetbrains.kotlin.test.Constructor
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor
|
||||
import org.jetbrains.kotlin.test.backend.BlackBoxInlinerCodegenSuppressor
|
||||
import org.jetbrains.kotlin.test.backend.handlers.LocalVariableDebugRunner
|
||||
import org.jetbrains.kotlin.test.backend.ir.IrBackendInput
|
||||
import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade
|
||||
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
|
||||
import org.jetbrains.kotlin.test.builders.configureJvmArtifactsHandlersStep
|
||||
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.REQUIRES_SEPARATE_PROCESS
|
||||
import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.REPORT_ONLY_EXPLICITLY_DEFINED_DEBUG_INFO
|
||||
import org.jetbrains.kotlin.test.model.Frontend2BackendConverter
|
||||
@@ -31,7 +33,10 @@ abstract class AbstractLocalVariableTestBase<R : ResultingArtifact.FrontendOutpu
|
||||
commonServicesConfigurationForDebugTest(it)
|
||||
}
|
||||
|
||||
configureCommonHandlersForLocalVariableTest()
|
||||
commonHandlersForCodegenTest()
|
||||
configureJvmArtifactsHandlersStep {
|
||||
useHandlers(::LocalVariableDebugRunner)
|
||||
}
|
||||
|
||||
useAfterAnalysisCheckers(::BlackBoxCodegenSuppressor, ::BlackBoxInlinerCodegenSuppressor)
|
||||
|
||||
|
||||
+6
-1
@@ -9,9 +9,11 @@ import org.jetbrains.kotlin.test.Constructor
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor
|
||||
import org.jetbrains.kotlin.test.backend.BlackBoxInlinerCodegenSuppressor
|
||||
import org.jetbrains.kotlin.test.backend.handlers.SteppingDebugRunner
|
||||
import org.jetbrains.kotlin.test.backend.ir.IrBackendInput
|
||||
import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade
|
||||
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
|
||||
import org.jetbrains.kotlin.test.builders.configureJvmArtifactsHandlersStep
|
||||
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.REQUIRES_SEPARATE_PROCESS
|
||||
import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.REPORT_ONLY_EXPLICITLY_DEFINED_DEBUG_INFO
|
||||
import org.jetbrains.kotlin.test.model.Frontend2BackendConverter
|
||||
@@ -31,7 +33,10 @@ abstract class AbstractSteppingTestBase<R : ResultingArtifact.FrontendOutput<R>>
|
||||
commonServicesConfigurationForDebugTest(it)
|
||||
}
|
||||
|
||||
configureCommonHandlersForSteppingTest()
|
||||
commonHandlersForCodegenTest()
|
||||
configureJvmArtifactsHandlersStep {
|
||||
useHandlers(::SteppingDebugRunner)
|
||||
}
|
||||
|
||||
useAfterAnalysisCheckers(::BlackBoxCodegenSuppressor, ::BlackBoxInlinerCodegenSuppressor)
|
||||
|
||||
|
||||
-22
@@ -122,20 +122,6 @@ fun TestConfigurationBuilder.configureCommonHandlersForBoxTest() {
|
||||
}
|
||||
}
|
||||
|
||||
fun TestConfigurationBuilder.configureCommonHandlersForSteppingTest() {
|
||||
commonHandlersForCodegenTest()
|
||||
configureJvmArtifactsHandlersStep {
|
||||
steppingHandlersForBackendStep()
|
||||
}
|
||||
}
|
||||
|
||||
fun TestConfigurationBuilder.configureCommonHandlersForLocalVariableTest() {
|
||||
commonHandlersForCodegenTest()
|
||||
configureJvmArtifactsHandlersStep {
|
||||
localVariableHandlersForBackendStep()
|
||||
}
|
||||
}
|
||||
|
||||
fun TestConfigurationBuilder.commonHandlersForCodegenTest() {
|
||||
configureClassicFrontendHandlersStep {
|
||||
commonClassicFrontendHandlersForCodegenTest()
|
||||
@@ -168,14 +154,6 @@ fun HandlersStepBuilder<BinaryArtifacts.Jvm, ArtifactKinds.Jvm>.boxHandlersForBa
|
||||
)
|
||||
}
|
||||
|
||||
fun HandlersStepBuilder<BinaryArtifacts.Jvm, ArtifactKinds.Jvm>.steppingHandlersForBackendStep() {
|
||||
useHandlers(::SteppingDebugRunner)
|
||||
}
|
||||
|
||||
fun HandlersStepBuilder<BinaryArtifacts.Jvm, ArtifactKinds.Jvm>.localVariableHandlersForBackendStep() {
|
||||
useHandlers(::LocalVariableDebugRunner)
|
||||
}
|
||||
|
||||
fun HandlersStepBuilder<ClassicFrontendOutputArtifact, FrontendKinds.ClassicFrontend>.commonClassicFrontendHandlersForCodegenTest() {
|
||||
useHandlers(
|
||||
::NoCompilationErrorsHandler,
|
||||
|
||||
Reference in New Issue
Block a user