From 70e924586782bc671fcf126c077b6c93cd43c9f9 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 30 May 2023 23:12:50 +0200 Subject: [PATCH] Revert "tmp: implement a hack to fix LA test" This reverts commit 0387ce0365ae0fcdc078de89760623842c746778. This change was not needed because the 'IGNORE_BACKEND_K1: JVM' directive makes the test generated as ignored, in this case it is the method named `ignoreSignedToUnsignedConversions` which is not even recognized as a test. --- .../box/unsignedTypes/signedToUnsignedConversions.kt | 2 -- .../kotlin/codegen/AbstractLightAnalysisModeTest.kt | 11 +---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/compiler/testData/codegen/box/unsignedTypes/signedToUnsignedConversions.kt b/compiler/testData/codegen/box/unsignedTypes/signedToUnsignedConversions.kt index b6c91394436..132eb9649ba 100644 --- a/compiler/testData/codegen/box/unsignedTypes/signedToUnsignedConversions.kt +++ b/compiler/testData/codegen/box/unsignedTypes/signedToUnsignedConversions.kt @@ -1,8 +1,6 @@ // WITH_STDLIB // !LANGUAGE: +ImplicitSignedToUnsignedIntegerConversion // IGNORE_BACKEND_K1: JVM -// dedicated hack to avoid unmuting this test in light analysis, see comments in AbstractLightAnalysisModeTest -// FAIL_IN_LIGHT_ANALYSIS // FILE: signedToUnsignedConversions_annotation.kt package kotlin.internal diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt index a7cbfd826aa..3c944275c99 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt @@ -32,21 +32,12 @@ abstract class AbstractLightAnalysisModeTest : CodegenTestCase() { "// TARGET_FRONTEND: FIR", "// IGNORE_BACKEND_K1:", ) - - // current ignore+unmute logic doesn't support the situation when LA successds but codegen fails - // so this is a very dirty hack to support it for one particular case - signedToUnsignedConversions.kt - // We assume that these tests will soo be irrelevant and therefore the hack will die too - private val failDirective = "FAIL_IN_LIGHT_ANALYSIS" } override fun doMultiFileTest(wholeFile: File, files: List) { - var isIgnored = false for (file in files) { - if (file.content.contains(failDirective)) - throw RuntimeException("Forced ignore for this test") - if (!isIgnored && ignoreDirectives.any { file.content.contains(it) }) isIgnored = true + if (ignoreDirectives.any { file.content.contains(it) }) return } - if (isIgnored) return val fullTxt = compileWithFullAnalysis(files) .replace("final enum class", "enum class")