Minor, move irText tests on data classes to a subdirectory

This commit is contained in:
Alexander Udalov
2021-11-26 22:36:17 +01:00
parent a5fa69b8ee
commit 2fbd2e2a15
33 changed files with 135 additions and 102 deletions
@@ -88,24 +88,6 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
runTest("compiler/testData/ir/irText/classes/companionObject.kt");
}
@Test
@TestMetadata("dataClassWithArrayMembers.kt")
public void testDataClassWithArrayMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt");
}
@Test
@TestMetadata("dataClasses.kt")
public void testDataClasses() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses.kt");
}
@Test
@TestMetadata("dataClassesGeneric.kt")
public void testDataClassesGeneric() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClassesGeneric.kt");
}
@Test
@TestMetadata("delegatedGenericImplementation.kt")
public void testDelegatedGenericImplementation() throws Exception {
@@ -232,12 +214,6 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
runTest("compiler/testData/ir/irText/classes/kt19306.kt");
}
@Test
@TestMetadata("kt31649.kt")
public void testKt31649() throws Exception {
runTest("compiler/testData/ir/irText/classes/kt31649.kt");
}
@Test
@TestMetadata("kt43217.kt")
public void testKt43217() throws Exception {
@@ -262,12 +238,6 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
runTest("compiler/testData/ir/irText/classes/kt45934.kt");
}
@Test
@TestMetadata("lambdaInDataClassDefaultParameter.kt")
public void testLambdaInDataClassDefaultParameter() throws Exception {
runTest("compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt");
}
@Test
@TestMetadata("localClasses.kt")
public void testLocalClasses() throws Exception {
@@ -286,12 +256,6 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
runTest("compiler/testData/ir/irText/classes/objectWithInitializers.kt");
}
@Test
@TestMetadata("openDataClass.kt")
public void testOpenDataClass() throws Exception {
runTest("compiler/testData/ir/irText/classes/openDataClass.kt");
}
@Test
@TestMetadata("outerClassAccess.kt")
public void testOuterClassAccess() throws Exception {
@@ -345,6 +309,52 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
public void testSuperCallsComposed() throws Exception {
runTest("compiler/testData/ir/irText/classes/superCallsComposed.kt");
}
@Nested
@TestMetadata("compiler/testData/ir/irText/classes/dataClasses")
@TestDataPath("$PROJECT_ROOT")
public class DataClasses {
@Test
public void testAllFilesPresentInDataClasses() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/classes/dataClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("dataClassWithArrayMembers.kt")
public void testDataClassWithArrayMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt");
}
@Test
@TestMetadata("dataClasses.kt")
public void testDataClasses() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt");
}
@Test
@TestMetadata("dataClassesGeneric.kt")
public void testDataClassesGeneric() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt");
}
@Test
@TestMetadata("kt31649.kt")
public void testKt31649() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/kt31649.kt");
}
@Test
@TestMetadata("lambdaInDataClassDefaultParameter.kt")
public void testLambdaInDataClassDefaultParameter() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.kt");
}
@Test
@TestMetadata("openDataClass.kt")
public void testOpenDataClass() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt");
}
}
}
@Nested
@@ -88,24 +88,6 @@ public class IrTextTestGenerated extends AbstractIrTextTest {
runTest("compiler/testData/ir/irText/classes/companionObject.kt");
}
@Test
@TestMetadata("dataClassWithArrayMembers.kt")
public void testDataClassWithArrayMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt");
}
@Test
@TestMetadata("dataClasses.kt")
public void testDataClasses() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses.kt");
}
@Test
@TestMetadata("dataClassesGeneric.kt")
public void testDataClassesGeneric() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClassesGeneric.kt");
}
@Test
@TestMetadata("delegatedGenericImplementation.kt")
public void testDelegatedGenericImplementation() throws Exception {
@@ -232,12 +214,6 @@ public class IrTextTestGenerated extends AbstractIrTextTest {
runTest("compiler/testData/ir/irText/classes/kt19306.kt");
}
@Test
@TestMetadata("kt31649.kt")
public void testKt31649() throws Exception {
runTest("compiler/testData/ir/irText/classes/kt31649.kt");
}
@Test
@TestMetadata("kt43217.kt")
public void testKt43217() throws Exception {
@@ -262,12 +238,6 @@ public class IrTextTestGenerated extends AbstractIrTextTest {
runTest("compiler/testData/ir/irText/classes/kt45934.kt");
}
@Test
@TestMetadata("lambdaInDataClassDefaultParameter.kt")
public void testLambdaInDataClassDefaultParameter() throws Exception {
runTest("compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt");
}
@Test
@TestMetadata("localClasses.kt")
public void testLocalClasses() throws Exception {
@@ -286,12 +256,6 @@ public class IrTextTestGenerated extends AbstractIrTextTest {
runTest("compiler/testData/ir/irText/classes/objectWithInitializers.kt");
}
@Test
@TestMetadata("openDataClass.kt")
public void testOpenDataClass() throws Exception {
runTest("compiler/testData/ir/irText/classes/openDataClass.kt");
}
@Test
@TestMetadata("outerClassAccess.kt")
public void testOuterClassAccess() throws Exception {
@@ -345,6 +309,52 @@ public class IrTextTestGenerated extends AbstractIrTextTest {
public void testSuperCallsComposed() throws Exception {
runTest("compiler/testData/ir/irText/classes/superCallsComposed.kt");
}
@Nested
@TestMetadata("compiler/testData/ir/irText/classes/dataClasses")
@TestDataPath("$PROJECT_ROOT")
public class DataClasses {
@Test
public void testAllFilesPresentInDataClasses() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/classes/dataClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("dataClassWithArrayMembers.kt")
public void testDataClassWithArrayMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt");
}
@Test
@TestMetadata("dataClasses.kt")
public void testDataClasses() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt");
}
@Test
@TestMetadata("dataClassesGeneric.kt")
public void testDataClassesGeneric() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt");
}
@Test
@TestMetadata("kt31649.kt")
public void testKt31649() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/kt31649.kt");
}
@Test
@TestMetadata("lambdaInDataClassDefaultParameter.kt")
public void testLambdaInDataClassDefaultParameter() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.kt");
}
@Test
@TestMetadata("openDataClass.kt")
public void testOpenDataClass() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt");
}
}
}
@Nested
@@ -87,21 +87,6 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase {
runTest("compiler/testData/ir/irText/classes/companionObject.kt");
}
@TestMetadata("dataClassWithArrayMembers.kt")
public void testDataClassWithArrayMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt");
}
@TestMetadata("dataClasses.kt")
public void testDataClasses() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses.kt");
}
@TestMetadata("dataClassesGeneric.kt")
public void testDataClassesGeneric() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClassesGeneric.kt");
}
@TestMetadata("delegatedGenericImplementation.kt")
public void testDelegatedGenericImplementation() throws Exception {
runTest("compiler/testData/ir/irText/classes/delegatedGenericImplementation.kt");
@@ -192,16 +177,6 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase {
runTest("compiler/testData/ir/irText/classes/kt19306.kt");
}
@TestMetadata("kt31649.kt")
public void testKt31649() throws Exception {
runTest("compiler/testData/ir/irText/classes/kt31649.kt");
}
@TestMetadata("lambdaInDataClassDefaultParameter.kt")
public void testLambdaInDataClassDefaultParameter() throws Exception {
runTest("compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt");
}
@TestMetadata("localClasses.kt")
public void testLocalClasses() throws Exception {
runTest("compiler/testData/ir/irText/classes/localClasses.kt");
@@ -217,11 +192,6 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase {
runTest("compiler/testData/ir/irText/classes/objectWithInitializers.kt");
}
@TestMetadata("openDataClass.kt")
public void testOpenDataClass() throws Exception {
runTest("compiler/testData/ir/irText/classes/openDataClass.kt");
}
@TestMetadata("outerClassAccess.kt")
public void testOuterClassAccess() throws Exception {
runTest("compiler/testData/ir/irText/classes/outerClassAccess.kt");
@@ -266,6 +236,49 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase {
public void testSuperCallsComposed() throws Exception {
runTest("compiler/testData/ir/irText/classes/superCallsComposed.kt");
}
@TestMetadata("compiler/testData/ir/irText/classes/dataClasses")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DataClasses extends AbstractKlibTextTestCase {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInDataClasses() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/classes/dataClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("dataClassWithArrayMembers.kt")
public void testDataClassWithArrayMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt");
}
@TestMetadata("dataClasses.kt")
public void testDataClasses() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt");
}
@TestMetadata("dataClassesGeneric.kt")
public void testDataClassesGeneric() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt");
}
@TestMetadata("kt31649.kt")
public void testKt31649() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/kt31649.kt");
}
@TestMetadata("lambdaInDataClassDefaultParameter.kt")
public void testLambdaInDataClassDefaultParameter() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.kt");
}
@TestMetadata("openDataClass.kt")
public void testOpenDataClass() throws Exception {
runTest("compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt");
}
}
}
@TestMetadata("compiler/testData/ir/irText/declarations")