[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 */
|
||||
@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");
|
||||
}
|
||||
}
|
||||
+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 */
|
||||
@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");
|
||||
}
|
||||
}
|
||||
+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") {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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)
|
||||
Reference in New Issue
Block a user