From cde74504d41aa74a7f3d7d5f2bbeef69bf5e475e Mon Sep 17 00:00:00 2001 From: Michael Bogdanov Date: Wed, 24 Sep 2014 17:12:27 +0400 Subject: [PATCH] Test for obsolete kt5307 --- compiler/testData/codegen/box/when/kt5307.kt | 11 +++++++++++ .../generated/BlackBoxCodegenTestGenerated.java | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 compiler/testData/codegen/box/when/kt5307.kt diff --git a/compiler/testData/codegen/box/when/kt5307.kt b/compiler/testData/codegen/box/when/kt5307.kt new file mode 100644 index 00000000000..bbbbc8611c4 --- /dev/null +++ b/compiler/testData/codegen/box/when/kt5307.kt @@ -0,0 +1,11 @@ +fun box(): String { + val value = 1 + when (value) { + 0 -> {} + 1 -> when (value) { + 2 -> false + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java index 115e504779b..3f6eabb924a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java @@ -6492,6 +6492,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { doTest(fileName); } + @TestMetadata("kt5307.kt") + public void testKt5307() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt5307.kt"); + doTest(fileName); + } + @TestMetadata("longInRange.kt") public void testLongInRange() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/when/longInRange.kt");