[LL FIR] drop outdated LazyBodyIsNotTouchedTest

We have our own transformers and tests against compiler test data,
so separate test with compiler transformers is redundant
This commit is contained in:
Dmitrii Gridin
2023-09-04 13:17:08 +02:00
committed by Space Team
parent 01fc708a0f
commit c095b60fe8
3 changed files with 1 additions and 4644 deletions
@@ -1,36 +0,0 @@
/*
* Copyright 2010-2023 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.
*/
package org.jetbrains.kotlin.fir
import org.jetbrains.kotlin.fir.declarations.FirFile
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
import org.jetbrains.kotlin.fir.resolve.ScopeSession
import org.jetbrains.kotlin.fir.resolve.transformers.createCompilerProcessorByPhase
import java.io.File
abstract class AbstractLazyBodyIsNotTouchedTest : AbstractFirBaseDiagnosticsTest() {
override val useLazyBodiesModeForRawFir: Boolean get() = true
override fun runAnalysis(testDataFile: File, testFiles: List<TestFile>, firFilesPerSession: Map<FirSession, List<FirFile>>) {
val phases = FirResolvePhase.values()
.dropWhile { it <= FirResolvePhase.RAW_FIR }
.filterNot { it == FirResolvePhase.COMPILER_REQUIRED_ANNOTATIONS }
.takeWhile { it < FirResolvePhase.ARGUMENTS_OF_ANNOTATIONS }
for ((session, firFiles) in firFilesPerSession) {
val scopeSession = ScopeSession()
/*
Test that we are not touching lazy bodies & lazy expressions during phases < ARGUMENTS_OF_ANNOTATIONS
If we try to access them, the exception will be thrown and test will fail
*/
doFirResolveTestBench(
firFiles,
phases.map { it.createCompilerProcessorByPhase(session, scopeSession) },
gc = false
)
}
}
}