[FIR2IR] Rework reordering condition to better handle synthetic class delegation fields

^KT-60243

Merge-request: KT-MR-11125
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
Vladimir Sukharev
2023-07-19 09:59:53 +00:00
committed by Space Team
parent 66bbb9582c
commit f7269eb384
20 changed files with 2407 additions and 2 deletions
@@ -894,6 +894,28 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT
}
}
@Nested
@TestMetadata("compiler/testData/ir/irText/declarations/delegate")
@TestDataPath("$PROJECT_ROOT")
public class Delegate {
@Test
public void testAllFilesPresentInDelegate() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/delegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("delegationEvaluationOrder1.kt")
public void testDelegationEvaluationOrder1() throws Exception {
runTest("compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.kt");
}
@Test
@TestMetadata("delegationEvaluationOrder2.kt")
public void testDelegationEvaluationOrder2() throws Exception {
runTest("compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.kt");
}
}
@Nested
@TestMetadata("compiler/testData/ir/irText/declarations/jvmRecord")
@TestDataPath("$PROJECT_ROOT")
@@ -894,6 +894,28 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest {
}
}
@Nested
@TestMetadata("compiler/testData/ir/irText/declarations/delegate")
@TestDataPath("$PROJECT_ROOT")
public class Delegate {
@Test
public void testAllFilesPresentInDelegate() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/delegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("delegationEvaluationOrder1.kt")
public void testDelegationEvaluationOrder1() throws Exception {
runTest("compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.kt");
}
@Test
@TestMetadata("delegationEvaluationOrder2.kt")
public void testDelegationEvaluationOrder2() throws Exception {
runTest("compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.kt");
}
}
@Nested
@TestMetadata("compiler/testData/ir/irText/declarations/jvmRecord")
@TestDataPath("$PROJECT_ROOT")
@@ -894,6 +894,28 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest {
}
}
@Nested
@TestMetadata("compiler/testData/ir/irText/declarations/delegate")
@TestDataPath("$PROJECT_ROOT")
public class Delegate {
@Test
public void testAllFilesPresentInDelegate() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/delegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("delegationEvaluationOrder1.kt")
public void testDelegationEvaluationOrder1() throws Exception {
runTest("compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.kt");
}
@Test
@TestMetadata("delegationEvaluationOrder2.kt")
public void testDelegationEvaluationOrder2() throws Exception {
runTest("compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.kt");
}
}
@Nested
@TestMetadata("compiler/testData/ir/irText/declarations/jvmRecord")
@TestDataPath("$PROJECT_ROOT")