[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
+1
-1
@@ -17,7 +17,7 @@ dependencies {
|
||||
testImplementation(libs.junit.jupiter.api)
|
||||
}
|
||||
|
||||
val generateSirAnalysisApiTests by generator("org.jetbrains.kotlin.generators.tests.native.swift.sir.analysis.api.GenerateSirAnalysisApiTestsKt")
|
||||
val generateTests by generator("org.jetbrains.kotlin.generators.tests.native.swift.sir.GenerateSirTestsKt")
|
||||
|
||||
testsJar()
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* 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.analysis.api
|
||||
package org.jetbrains.kotlin.generators.tests.native.swift.sir
|
||||
|
||||
import org.jetbrains.kotlin.generators.generateTestGroupSuiteWithJUnit5
|
||||
import org.jetbrains.kotlin.sir.analysisapi.AbstractKotlinSirContextTest
|
||||
@@ -11,13 +11,13 @@ It should be possible to populate SIR from two types of artefacts:
|
||||
|
||||
### How to generate tests:
|
||||
```bash
|
||||
./gradlew :generators:sir-analysis-api-generator:generateSirAnalysisApiTests
|
||||
./gradlew :generators:sir-tests-generator:generateTests
|
||||
```
|
||||
this will generate test by their input files. Input files could be found and should be placed here - `native/swift/sir-analysis-api/testData`
|
||||
|
||||
The test expects to find `.sir` file, containing serialized SIR for the test-case. Name of the `.sir` file should be the same as a name of corresponding `.kt` file.
|
||||
|
||||
The project for the generator can be found here - `generators/sir-analysis-api-generator/build.gradle.kts`
|
||||
The project for the generator can be found here - `generators/sir-tests-generator/build.gradle.kts`
|
||||
|
||||
### How to run tests:
|
||||
```bash
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test;
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.native.swift.sir.analysis.api.GenerateSirAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.native.swift.sir.GenerateSirTestsKt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("native/swift/sir-analysis-api/testData")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+10
-10
@@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test;
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.native.swift.sir.analysis.api.GenerateSirAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.native.swift.sir.GenerateSirTestsKt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("native/swift/sir-compiler-bridge/testData")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -31,9 +31,9 @@ public class SirCompilerBridgeTestGenerated extends AbstractKotlinSirBridgeTest
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smoke0")
|
||||
public void testSmoke0() throws Exception {
|
||||
runTest("native/swift/sir-compiler-bridge/testData/smoke0/");
|
||||
@TestMetadata("primitive_parameters")
|
||||
public void testPrimitive_parameters() throws Exception {
|
||||
runTest("native/swift/sir-compiler-bridge/testData/primitive_parameters/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -42,15 +42,15 @@ public class SirCompilerBridgeTestGenerated extends AbstractKotlinSirBridgeTest
|
||||
runTest("native/swift/sir-compiler-bridge/testData/primitive_types/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("smoke0")
|
||||
public void testSmoke0() throws Exception {
|
||||
runTest("native/swift/sir-compiler-bridge/testData/smoke0/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unsigned_primitive_types")
|
||||
public void testUnsigned_primitive_types() throws Exception {
|
||||
runTest("native/swift/sir-compiler-bridge/testData/unsigned_primitive_types/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("primitive_parameters")
|
||||
public void testPrimitive_parameters() throws Exception {
|
||||
runTest("native/swift/sir-compiler-bridge/testData/primitive_parameters/");
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -402,7 +402,7 @@ include ":native:swift:sir",
|
||||
":native:swift:sir-passes",
|
||||
":native:swift:sir-analysis-api",
|
||||
":native:swift:sir-compiler-bridge",
|
||||
":generators:sir-analysis-api-generator"
|
||||
":generators:sir-tests-generator"
|
||||
|
||||
void intellij(String imlPath) {
|
||||
File imlFile = new File("${rootDir}/intellij/community/plugins/kotlin/${imlPath}")
|
||||
|
||||
Reference in New Issue
Block a user