[Swift Export] Rename tests generation tool
Now it generates test-cases for sir-compiler-bridges as well, so it makes sense to move away from Analysis API in its name.
This commit is contained in:
committed by
Space Team
parent
fe9ab0a1fc
commit
58bef34b9c
@@ -0,0 +1,34 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { java.srcDirs("main") }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testApi(projectTests(":native:swift:sir-analysis-api"))
|
||||
testApi(projectTests(":native:swift:sir-compiler-bridge"))
|
||||
testImplementation(projectTests(":generators:test-generator"))
|
||||
|
||||
testRuntimeOnly(projectTests(":analysis:analysis-test-framework"))
|
||||
testImplementation(libs.junit.jupiter.api)
|
||||
}
|
||||
|
||||
val generateTests by generator("org.jetbrains.kotlin.generators.tests.native.swift.sir.GenerateSirTestsKt")
|
||||
|
||||
testsJar()
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xcontext-receivers")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
projectTest(jUnitMode = JUnitMode.JUnit5) {
|
||||
workingDir = rootDir
|
||||
useJUnitPlatform { }
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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.native.swift.sir
|
||||
|
||||
import org.jetbrains.kotlin.generators.generateTestGroupSuiteWithJUnit5
|
||||
import org.jetbrains.kotlin.sir.analysisapi.AbstractKotlinSirContextTest
|
||||
import org.jetbrains.kotlin.sir.bridge.AbstractKotlinSirBridgeTest
|
||||
|
||||
|
||||
fun main() {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
generateTestGroupSuiteWithJUnit5 {
|
||||
testGroup(
|
||||
"native/swift/sir-analysis-api/tests-gen/",
|
||||
"native/swift/sir-analysis-api/testData"
|
||||
) {
|
||||
testClass<AbstractKotlinSirContextTest>(
|
||||
suiteTestClassName = "SirAnalysisGeneratedTests"
|
||||
) {
|
||||
model("", pattern = "^([^_](.+)).kt$", recursive = false)
|
||||
}
|
||||
}
|
||||
testGroup(
|
||||
"native/swift/sir-compiler-bridge/tests-gen/",
|
||||
"native/swift/sir-compiler-bridge/testData"
|
||||
) {
|
||||
testClass<AbstractKotlinSirBridgeTest>(
|
||||
suiteTestClassName = "SirCompilerBridgeTestGenerated"
|
||||
) {
|
||||
model("", extension = null, recursive = false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user