KT-4107 Data objects
This commit is contained in:
Generated
+37
-3
@@ -6962,6 +6962,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataClasses"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("companionDataObject.kt")
|
||||
public void testCompanionDataObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/dataClasses/companionDataObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("componentNamedComponent1.kt")
|
||||
public void testComponentNamedComponent1() throws Exception {
|
||||
@@ -7035,9 +7041,21 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dataObject.kt")
|
||||
public void testDataObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/dataClasses/dataObject.kt");
|
||||
@TestMetadata("dataObjectDisabled.kt")
|
||||
public void testDataObjectDisabled() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/dataClasses/dataObjectDisabled.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dataObjectEnabled.kt")
|
||||
public void testDataObjectEnabled() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/dataClasses/dataObjectEnabled.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dataObjectLiteral.kt")
|
||||
public void testDataObjectLiteral() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/dataClasses/dataObjectLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -7661,6 +7679,22 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/dataObjects")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class DataObjects {
|
||||
@Test
|
||||
public void testAllFilesPresentInDataObjects() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataObjects"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideEqualsAndHashCode.kt")
|
||||
public void testOverrideEqualsAndHashCode() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/dataObjects/overrideEqualsAndHashCode.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/declarationChecks")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+16
@@ -61,6 +61,22 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/suspendInlineCycle_ir.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/dataObjects")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class DataObjects {
|
||||
@Test
|
||||
public void testAllFilesPresentInDataObjects() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/dataObjects"), Pattern.compile("^(.+)\\.kts?$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("customReadResolve.kt")
|
||||
public void testCustomReadResolve() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/dataObjects/customReadResolve.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+10
@@ -61,6 +61,16 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/suspendInlineCycle.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/dataObjects")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class DataObjects {
|
||||
@Test
|
||||
public void testAllFilesPresentInDataObjects() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/dataObjects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+28
@@ -13528,6 +13528,34 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/dataObjects")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class DataObjects {
|
||||
@Test
|
||||
public void testAllFilesPresentInDataObjects() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataObjects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("equals.kt")
|
||||
public void testEquals() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataObjects/equals.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("hashCode.kt")
|
||||
public void testHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataObjects/hashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("toString.kt")
|
||||
public void testToString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataObjects/toString.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/deadCodeElimination")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+40
@@ -13648,6 +13648,46 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/dataObjects")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class DataObjects {
|
||||
@Test
|
||||
public void testAllFilesPresentInDataObjects() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataObjects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("equals.kt")
|
||||
public void testEquals() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataObjects/equals.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("hashCode.kt")
|
||||
public void testHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataObjects/hashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("multipleInstances.kt")
|
||||
public void testMultipleInstances() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataObjects/multipleInstances.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("serialization.kt")
|
||||
public void testSerialization() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataObjects/serialization.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("toString.kt")
|
||||
public void testToString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataObjects/toString.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/deadCodeElimination")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user