[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:
Dmitriy Dolovov
2023-08-15 15:03:20 +02:00
committed by Space Team
parent a8034b6baa
commit ec9370c30b
24 changed files with 28 additions and 28 deletions
@@ -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 */
@SuppressWarnings("all")
@TestMetadata("native/native.tests/testData/klibIr")
@TestMetadata("native/native.tests/testData/klib/dump-ir")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
public class FirNativeKlibIrTestGenerated extends AbstractNativeKlibIrTest {
public class FirNativeKlibDumpIrTestGenerated extends AbstractNativeKlibDumpIrTest {
@Test
public void testAllFilesPresentInKlibIr() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klibIr"), Pattern.compile("^([^_](.+)).kt$"), null, true);
public void testAllFilesPresentInDump_ir() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klib/dump-ir"), Pattern.compile("^([^_](.+)).kt$"), null, true);
}
@Test
@TestMetadata("class.kt")
public void testClass() throws Exception {
runTest("native/native.tests/testData/klibIr/class.kt");
runTest("native/native.tests/testData/klib/dump-ir/class.kt");
}
@Test
@TestMetadata("constructor.kt")
public void testConstructor() throws Exception {
runTest("native/native.tests/testData/klibIr/constructor.kt");
runTest("native/native.tests/testData/klib/dump-ir/constructor.kt");
}
@Test
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
runTest("native/native.tests/testData/klibIr/enum.kt");
runTest("native/native.tests/testData/klib/dump-ir/enum.kt");
}
@Test
@TestMetadata("field.kt")
public void testField() throws Exception {
runTest("native/native.tests/testData/klibIr/field.kt");
runTest("native/native.tests/testData/klib/dump-ir/field.kt");
}
@Test
@TestMetadata("fun.kt")
public void testFun() throws Exception {
runTest("native/native.tests/testData/klibIr/fun.kt");
runTest("native/native.tests/testData/klib/dump-ir/fun.kt");
}
@Test
@TestMetadata("typealias.kt")
public void testTypealias() throws Exception {
runTest("native/native.tests/testData/klibIr/typealias.kt");
runTest("native/native.tests/testData/klib/dump-ir/typealias.kt");
}
}
@@ -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 */
@SuppressWarnings("all")
@TestMetadata("native/native.tests/testData/klibIr")
@TestMetadata("native/native.tests/testData/klib/dump-ir")
@TestDataPath("$PROJECT_ROOT")
public class NativeKlibIrTestGenerated extends AbstractNativeKlibIrTest {
public class NativeKlibDumpIrTestGenerated extends AbstractNativeKlibDumpIrTest {
@Test
public void testAllFilesPresentInKlibIr() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klibIr"), Pattern.compile("^([^_](.+)).kt$"), null, true);
public void testAllFilesPresentInDump_ir() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klib/dump-ir"), Pattern.compile("^([^_](.+)).kt$"), null, true);
}
@Test
@TestMetadata("class.kt")
public void testClass() throws Exception {
runTest("native/native.tests/testData/klibIr/class.kt");
runTest("native/native.tests/testData/klib/dump-ir/class.kt");
}
@Test
@TestMetadata("constructor.kt")
public void testConstructor() throws Exception {
runTest("native/native.tests/testData/klibIr/constructor.kt");
runTest("native/native.tests/testData/klib/dump-ir/constructor.kt");
}
@Test
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
runTest("native/native.tests/testData/klibIr/enum.kt");
runTest("native/native.tests/testData/klib/dump-ir/enum.kt");
}
@Test
@TestMetadata("field.kt")
public void testField() throws Exception {
runTest("native/native.tests/testData/klibIr/field.kt");
runTest("native/native.tests/testData/klib/dump-ir/field.kt");
}
@Test
@TestMetadata("fun.kt")
public void testFun() throws Exception {
runTest("native/native.tests/testData/klibIr/fun.kt");
runTest("native/native.tests/testData/klib/dump-ir/fun.kt");
}
@Test
@TestMetadata("typealias.kt")
public void testTypealias() throws Exception {
runTest("native/native.tests/testData/klibIr/typealias.kt");
runTest("native/native.tests/testData/klib/dump-ir/typealias.kt");
}
}
@@ -212,22 +212,22 @@ fun main() {
}
}
// Klib ir tests
// Dump KLIB IR tests
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
testClass<AbstractNativeKlibIrTest>(
suiteTestClassName = "NativeKlibIrTestGenerated",
testClass<AbstractNativeKlibDumpIrTest>(
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") {
testClass<AbstractNativeKlibIrTest>(
suiteTestClassName = "FirNativeKlibIrTestGenerated",
testClass<AbstractNativeKlibDumpIrTest>(
suiteTestClassName = "FirNativeKlibDumpIrTestGenerated",
annotations = listOf(
*frontendFir()
)
) {
model("klibIr", pattern = "^([^_](.+)).kt$", recursive = true)
model("klib/dump-ir", pattern = "^([^_](.+)).kt$", recursive = true)
}
}
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Tag
import java.io.File
@Tag("klib")
abstract class AbstractNativeKlibIrTest : AbstractNativeSimpleTest() {
abstract class AbstractNativeKlibDumpIrTest : AbstractNativeSimpleTest() {
protected fun runTest(@TestDataFile testPath: String) {
val testPathFull = getAbsoluteFile(testPath)
muteTestIfNecessary(testPathFull)