[KLIB][tests] Reorganize "klib dump-ir" tests
- Keep the test data under "native/native.tests/testData/klib/" dir - Rename tests from "klib ir" to "klib dump-ir"
This commit is contained in:
committed by
Space Team
parent
a8034b6baa
commit
ec9370c30b
Vendored
Vendored
Vendored
Vendored
+10
-10
@@ -18,49 +18,49 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateNativeTestsKt}. DO NOT MODIFY MANUALLY */
|
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateNativeTestsKt}. DO NOT MODIFY MANUALLY */
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@TestMetadata("native/native.tests/testData/klibIr")
|
@TestMetadata("native/native.tests/testData/klib/dump-ir")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@Tag("frontend-fir")
|
@Tag("frontend-fir")
|
||||||
@FirPipeline()
|
@FirPipeline()
|
||||||
public class FirNativeKlibIrTestGenerated extends AbstractNativeKlibIrTest {
|
public class FirNativeKlibDumpIrTestGenerated extends AbstractNativeKlibDumpIrTest {
|
||||||
@Test
|
@Test
|
||||||
public void testAllFilesPresentInKlibIr() throws Exception {
|
public void testAllFilesPresentInDump_ir() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klibIr"), Pattern.compile("^([^_](.+)).kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klib/dump-ir"), Pattern.compile("^([^_](.+)).kt$"), null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("class.kt")
|
@TestMetadata("class.kt")
|
||||||
public void testClass() throws Exception {
|
public void testClass() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/class.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/class.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("constructor.kt")
|
@TestMetadata("constructor.kt")
|
||||||
public void testConstructor() throws Exception {
|
public void testConstructor() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/constructor.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/constructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("enum.kt")
|
@TestMetadata("enum.kt")
|
||||||
public void testEnum() throws Exception {
|
public void testEnum() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/enum.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/enum.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("field.kt")
|
@TestMetadata("field.kt")
|
||||||
public void testField() throws Exception {
|
public void testField() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/field.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/field.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("fun.kt")
|
@TestMetadata("fun.kt")
|
||||||
public void testFun() throws Exception {
|
public void testFun() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/fun.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/fun.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("typealias.kt")
|
@TestMetadata("typealias.kt")
|
||||||
public void testTypealias() throws Exception {
|
public void testTypealias() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/typealias.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/typealias.kt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+10
-10
@@ -16,47 +16,47 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateNativeTestsKt}. DO NOT MODIFY MANUALLY */
|
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateNativeTestsKt}. DO NOT MODIFY MANUALLY */
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@TestMetadata("native/native.tests/testData/klibIr")
|
@TestMetadata("native/native.tests/testData/klib/dump-ir")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
public class NativeKlibIrTestGenerated extends AbstractNativeKlibIrTest {
|
public class NativeKlibDumpIrTestGenerated extends AbstractNativeKlibDumpIrTest {
|
||||||
@Test
|
@Test
|
||||||
public void testAllFilesPresentInKlibIr() throws Exception {
|
public void testAllFilesPresentInDump_ir() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klibIr"), Pattern.compile("^([^_](.+)).kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klib/dump-ir"), Pattern.compile("^([^_](.+)).kt$"), null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("class.kt")
|
@TestMetadata("class.kt")
|
||||||
public void testClass() throws Exception {
|
public void testClass() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/class.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/class.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("constructor.kt")
|
@TestMetadata("constructor.kt")
|
||||||
public void testConstructor() throws Exception {
|
public void testConstructor() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/constructor.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/constructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("enum.kt")
|
@TestMetadata("enum.kt")
|
||||||
public void testEnum() throws Exception {
|
public void testEnum() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/enum.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/enum.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("field.kt")
|
@TestMetadata("field.kt")
|
||||||
public void testField() throws Exception {
|
public void testField() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/field.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/field.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("fun.kt")
|
@TestMetadata("fun.kt")
|
||||||
public void testFun() throws Exception {
|
public void testFun() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/fun.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/fun.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("typealias.kt")
|
@TestMetadata("typealias.kt")
|
||||||
public void testTypealias() throws Exception {
|
public void testTypealias() throws Exception {
|
||||||
runTest("native/native.tests/testData/klibIr/typealias.kt");
|
runTest("native/native.tests/testData/klib/dump-ir/typealias.kt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+7
-7
@@ -212,22 +212,22 @@ fun main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Klib ir tests
|
// Dump KLIB IR tests
|
||||||
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
||||||
testClass<AbstractNativeKlibIrTest>(
|
testClass<AbstractNativeKlibDumpIrTest>(
|
||||||
suiteTestClassName = "NativeKlibIrTestGenerated",
|
suiteTestClassName = "NativeKlibDumpIrTestGenerated",
|
||||||
) {
|
) {
|
||||||
model("klibIr", pattern = "^([^_](.+)).kt$", recursive = true)
|
model("klib/dump-ir", pattern = "^([^_](.+)).kt$", recursive = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
||||||
testClass<AbstractNativeKlibIrTest>(
|
testClass<AbstractNativeKlibDumpIrTest>(
|
||||||
suiteTestClassName = "FirNativeKlibIrTestGenerated",
|
suiteTestClassName = "FirNativeKlibDumpIrTestGenerated",
|
||||||
annotations = listOf(
|
annotations = listOf(
|
||||||
*frontendFir()
|
*frontendFir()
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
model("klibIr", pattern = "^([^_](.+)).kt$", recursive = true)
|
model("klib/dump-ir", pattern = "^([^_](.+)).kt$", recursive = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Tag
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
@Tag("klib")
|
@Tag("klib")
|
||||||
abstract class AbstractNativeKlibIrTest : AbstractNativeSimpleTest() {
|
abstract class AbstractNativeKlibDumpIrTest : AbstractNativeSimpleTest() {
|
||||||
protected fun runTest(@TestDataFile testPath: String) {
|
protected fun runTest(@TestDataFile testPath: String) {
|
||||||
val testPathFull = getAbsoluteFile(testPath)
|
val testPathFull = getAbsoluteFile(testPath)
|
||||||
muteTestIfNecessary(testPathFull)
|
muteTestIfNecessary(testPathFull)
|
||||||
Reference in New Issue
Block a user