[Analysis] add test generator for Kotlin/Native tests inside Analysis API

This test generator is enabled only if Kotlin/Native support is enabled in the project

^KT-62910
This commit is contained in:
Ilya Kirillov
2023-10-27 12:09:28 +02:00
committed by Space Team
parent a18c49d795
commit 68235b978b
6 changed files with 60 additions and 4 deletions
@@ -0,0 +1,29 @@
plugins {
kotlin("jvm")
id("jps-compatible")
}
sourceSets {
"main" { none() }
"test" { projectDefault() }
}
dependencies {
api(kotlinStdlib("jdk8"))
testImplementation(projectTests(":generators:test-generator"))
testImplementation(projectTests(":compiler:tests-common"))
testImplementation(projectTests(":compiler:tests-spec"))
testImplementation(projectTests(":generators:analysis-api-generator"))
testImplementation(intellijCore())
testApi(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine)
}
val generateAnalysisApiNativeTests by generator("org.jetbrains.kotlin.generators.tests.analysis.api.konan.GenerateAnalysisApiNativeTestsKt")
testsJar()
@@ -0,0 +1,19 @@
/*
* 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.generators.tests.analysis.api.dsl.AnalysisApiTestGroup
import org.jetbrains.kotlin.generators.tests.analysis.api.dsl.generate
fun main(args: Array<String>) {
System.setProperty("java.awt.headless", "true")
generate(args) {
generateTests()
}
}
private fun AnalysisApiTestGroup.generateTests() {
}