[LL FIR] add LL FIR tests based on AbstractFirPsiNativeDiagnosticsTest

^KT-62910 fixed
This commit is contained in:
Ilya Kirillov
2023-10-27 12:11:21 +02:00
committed by Space Team
parent a4564351d7
commit bffbbe6293
11 changed files with 466 additions and 1 deletions
@@ -16,6 +16,10 @@ dependencies {
testImplementation(projectTests(":compiler:tests-spec"))
testImplementation(projectTests(":generators:analysis-api-generator"))
testImplementation(projectTests(":analysis:low-level-api-fir"))
testImplementation(projectTests(":analysis:analysis-api-impl-barebone"))
testImplementation(projectTests(":analysis:low-level-api-fir:low-level-api-fir-native"))
testImplementation(intellijCore())
testApi(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter.api)
@@ -16,4 +16,7 @@ fun main(args: Array<String>) {
}
private fun AnalysisApiTestGroup.generateTests() {
suiteBasedTests {
generateFirNativeLowLevelTests()
}
}
@@ -0,0 +1,29 @@
/*
* 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.generators.tests.analysis.api.konan
import org.jetbrains.kotlin.analysis.low.level.api.fir.konan.compiler.based.AbstractLLFirNativeTest
import org.jetbrains.kotlin.analysis.low.level.api.fir.konan.compiler.based.AbstractLLFirReversedNativeTest
import org.jetbrains.kotlin.generators.TestGroupSuite
import org.jetbrains.kotlin.generators.model.annotation
import org.jetbrains.kotlin.test.utils.CUSTOM_TEST_DATA_EXTENSION_PATTERN
import org.junit.jupiter.api.Tag
internal fun TestGroupSuite.generateFirNativeLowLevelTests() {
testGroup("analysis/low-level-api-fir/low-level-api-fir-native/tests-gen", "compiler/testData/diagnostics") {
testClass<AbstractLLFirNativeTest>(
annotations = listOf(annotation(Tag::class.java, "llFirNative"))
) {
model("nativeTests", testMethod = "doTest", excludedPattern = CUSTOM_TEST_DATA_EXTENSION_PATTERN)
}
testClass<AbstractLLFirReversedNativeTest>(
annotations = listOf(annotation(Tag::class.java, "llFirNative"))
) {
model("nativeTests", testMethod = "doTest", excludedPattern = CUSTOM_TEST_DATA_EXTENSION_PATTERN)
}
}
}