JVM: Make coroutines spilling tests runtime
instead of bytecode text ones. Check the content of continuation object instead of bytecode, since this is less prone to changes during changes in coroutines codegen. #KT-48678
This commit is contained in:
+58
@@ -13043,6 +13043,64 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
public void testSafeCallElvis() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/safeCallElvis.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/varSpilling/cleanup")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Cleanup {
|
||||
@Test
|
||||
public void testAllFilesPresentInCleanup() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/varSpilling/cleanup"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("backEdge.kt")
|
||||
public void testBackEdge() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/backEdge.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("if.kt")
|
||||
public void testIf() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/if.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullCleanup.kt")
|
||||
public void testNullCleanup() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/nullCleanup.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullNotSpill.kt")
|
||||
public void testNullNotSpill() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/nullNotSpill.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoRefs.kt")
|
||||
public void testTwoRefs() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/twoRefs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unusedParamNotSpill.kt")
|
||||
public void testUnusedParamNotSpill() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/unusedParamNotSpill.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("when.kt")
|
||||
public void testWhen() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/when.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-58
@@ -1716,64 +1716,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/cleanup")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Cleanup {
|
||||
@Test
|
||||
public void testAllFilesPresentInCleanup() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/cleanup"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("backEdge.kt")
|
||||
public void testBackEdge() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/backEdge.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("if.kt")
|
||||
public void testIf() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/if.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullCleanup.kt")
|
||||
public void testNullCleanup() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/nullCleanup.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullNotSpill.kt")
|
||||
public void testNullNotSpill() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/nullNotSpill.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoRefs.kt")
|
||||
public void testTwoRefs() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/twoRefs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unusedParamNotSpill.kt")
|
||||
public void testUnusedParamNotSpill() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/unusedParamNotSpill.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("when.kt")
|
||||
public void testWhen() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/when.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/debug")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+58
@@ -13163,6 +13163,64 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
public void testSafeCallElvis() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/safeCallElvis.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/varSpilling/cleanup")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Cleanup {
|
||||
@Test
|
||||
public void testAllFilesPresentInCleanup() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/varSpilling/cleanup"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("backEdge.kt")
|
||||
public void testBackEdge() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/backEdge.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("if.kt")
|
||||
public void testIf() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/if.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullCleanup.kt")
|
||||
public void testNullCleanup() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/nullCleanup.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullNotSpill.kt")
|
||||
public void testNullNotSpill() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/nullNotSpill.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoRefs.kt")
|
||||
public void testTwoRefs() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/twoRefs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unusedParamNotSpill.kt")
|
||||
public void testUnusedParamNotSpill() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/unusedParamNotSpill.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("when.kt")
|
||||
public void testWhen() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/cleanup/when.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-58
@@ -1752,64 +1752,6 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/cleanup")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Cleanup {
|
||||
@Test
|
||||
public void testAllFilesPresentInCleanup() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/cleanup"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("backEdge.kt")
|
||||
public void testBackEdge() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/backEdge.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("if.kt")
|
||||
public void testIf() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/if.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullCleanup.kt")
|
||||
public void testNullCleanup() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/nullCleanup.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullNotSpill.kt")
|
||||
public void testNullNotSpill() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/nullNotSpill.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoRefs.kt")
|
||||
public void testTwoRefs() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/twoRefs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unusedParamNotSpill.kt")
|
||||
public void testUnusedParamNotSpill() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/unusedParamNotSpill.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("when.kt")
|
||||
public void testWhen() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/coroutines/cleanup/when.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/debug")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user