From 45bf70c9f960b2f60d66c2ceaefb381d9502b6b8 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 9 Mar 2021 21:57:45 +0100 Subject: [PATCH] Minor, add debug stepping test for KT-44745 --- .../FirLightTreeSteppingTestGenerated.java | 6 ++ .../codegen/FirPsiSteppingTestGenerated.java | 6 ++ compiler/testData/debug/stepping/continue.kt | 64 +++++++++++++++++++ ...ppingWithBytecodeInlinerTestGenerated.java | 6 ++ .../IrSteppingWithIrInlinerTestGenerated.java | 6 ++ .../codegen/SteppingTestGenerated.java | 6 ++ .../js/test/ir/IrJsSteppingTestGenerated.java | 6 ++ 7 files changed, 100 insertions(+) create mode 100644 compiler/testData/debug/stepping/continue.kt diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSteppingTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSteppingTestGenerated.java index 13b243f0d83..4900badff54 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSteppingTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSteppingTestGenerated.java @@ -139,6 +139,12 @@ public class FirLightTreeSteppingTestGenerated extends AbstractFirLightTreeStepp runTest("compiler/testData/debug/stepping/constructors.kt"); } + @Test + @TestMetadata("continue.kt") + public void testContinue() throws Exception { + runTest("compiler/testData/debug/stepping/continue.kt"); + } + @Test @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSteppingTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSteppingTestGenerated.java index fb6a4a70443..78aba6cd43f 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSteppingTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSteppingTestGenerated.java @@ -139,6 +139,12 @@ public class FirPsiSteppingTestGenerated extends AbstractFirPsiSteppingTest { runTest("compiler/testData/debug/stepping/constructors.kt"); } + @Test + @TestMetadata("continue.kt") + public void testContinue() throws Exception { + runTest("compiler/testData/debug/stepping/continue.kt"); + } + @Test @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { diff --git a/compiler/testData/debug/stepping/continue.kt b/compiler/testData/debug/stepping/continue.kt new file mode 100644 index 00000000000..ba7a568203e --- /dev/null +++ b/compiler/testData/debug/stepping/continue.kt @@ -0,0 +1,64 @@ +// WITH_STDLIB +// FILE: test.kt + +val strings = arrayOf("1a", "1b", "2", "3") + +fun box() { + for (s in strings) { + if (s == "1a" || s == "1b") { + continue + } + if (s == "2") { + continue + } + println(s) + } +} + +// EXPECTATIONS JVM JVM_IR +// test.kt:7 box +// test.kt:8 box +// test.kt:9 box +// test.kt:7 box +// test.kt:8 box +// test.kt:9 box +// test.kt:7 box +// test.kt:8 box +// test.kt:11 box +// test.kt:12 box +// test.kt:7 box +// test.kt:8 box +// test.kt:11 box +// test.kt:14 box +// test.kt:7 box +// test.kt:16 box + +// EXPECTATIONS JS_IR +// test.kt:7 box +// test.kt:4 +// test.kt:7 box +// test.kt:7 box +// test.kt:7 box +// test.kt:7 box +// test.kt:7 box +// test.kt:8 box +// test.kt:9 box +// test.kt:7 box +// test.kt:7 box +// test.kt:7 box +// test.kt:8 box +// test.kt:9 box +// test.kt:7 box +// test.kt:7 box +// test.kt:7 box +// test.kt:8 box +// test.kt:11 box +// test.kt:12 box +// test.kt:7 box +// test.kt:7 box +// test.kt:7 box +// test.kt:8 box +// test.kt:11 box +// test.kt:14 box +// test.kt:7 box +// test.kt:16 box diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSteppingWithBytecodeInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSteppingWithBytecodeInlinerTestGenerated.java index e831b9d6d34..71736b38b40 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSteppingWithBytecodeInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSteppingWithBytecodeInlinerTestGenerated.java @@ -139,6 +139,12 @@ public class IrSteppingWithBytecodeInlinerTestGenerated extends AbstractIrSteppi runTest("compiler/testData/debug/stepping/constructors.kt"); } + @Test + @TestMetadata("continue.kt") + public void testContinue() throws Exception { + runTest("compiler/testData/debug/stepping/continue.kt"); + } + @Test @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSteppingWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSteppingWithIrInlinerTestGenerated.java index ce29cd59a71..459641078ac 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSteppingWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSteppingWithIrInlinerTestGenerated.java @@ -139,6 +139,12 @@ public class IrSteppingWithIrInlinerTestGenerated extends AbstractIrSteppingWith runTest("compiler/testData/debug/stepping/constructors.kt"); } + @Test + @TestMetadata("continue.kt") + public void testContinue() throws Exception { + runTest("compiler/testData/debug/stepping/continue.kt"); + } + @Test @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/SteppingTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/SteppingTestGenerated.java index 24f120d08ca..cd0bad67599 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/SteppingTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/SteppingTestGenerated.java @@ -139,6 +139,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest { runTest("compiler/testData/debug/stepping/constructors.kt"); } + @Test + @TestMetadata("continue.kt") + public void testContinue() throws Exception { + runTest("compiler/testData/debug/stepping/continue.kt"); + } + @Test @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsSteppingTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsSteppingTestGenerated.java index 1bbca1bc1cb..2648c378d5a 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsSteppingTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsSteppingTestGenerated.java @@ -139,6 +139,12 @@ public class IrJsSteppingTestGenerated extends AbstractIrJsSteppingTest { runTest("compiler/testData/debug/stepping/constructors.kt"); } + @Test + @TestMetadata("continue.kt") + public void testContinue() throws Exception { + runTest("compiler/testData/debug/stepping/continue.kt"); + } + @Test @TestMetadata("dataClass.kt") public void testDataClass() throws Exception {