[Test] Add an ability for AnalysisHandler automatically register AfterAnalysisCheckers

This is needed for cases like dump handlers to register corresponding
  checkers, which compares identity of dumps for different configurations,
  like `IrTextDumpHandler` and `FirIrDumpIdenticalChecker`
This commit is contained in:
Dmitriy Novozhilov
2024-02-16 09:57:55 +02:00
committed by Space Team
parent 60bf15d654
commit ad27d04e68
2 changed files with 29 additions and 16 deletions
@@ -6,6 +6,7 @@
package org.jetbrains.kotlin.test.model
import org.jetbrains.kotlin.test.Assertions
import org.jetbrains.kotlin.test.Constructor
import org.jetbrains.kotlin.test.services.TestServices
import org.jetbrains.kotlin.test.services.assertions
@@ -14,6 +15,9 @@ abstract class AnalysisHandler<A : ResultingArtifact<A>>(
val failureDisablesNextSteps: Boolean,
val doNotRunIfThereWerePreviousFailures: Boolean
) : ServicesAndDirectivesContainer {
open val additionalAfterAnalysisCheckers: List<Constructor<AfterAnalysisChecker>>
get() = emptyList()
protected val assertions: Assertions
get() = testServices.assertions