From 0462a018c5a2118e99b625cbbc3a3a85d8bc8bce Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Wed, 16 Jul 2014 21:13:47 +0400 Subject: [PATCH] Add test documenting a minor issue introduced in previous commit --- .../doNotShortenReferenceInsideMessage.kt | 7 +++++++ .../doNotShortenReferenceInsideMessage.kt.after | 9 +++++++++ .../jet/plugin/intentions/IntentionTestGenerated.java | 5 +++++ 3 files changed, 21 insertions(+) create mode 100644 idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt create mode 100644 idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt.after diff --git a/idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt b/idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt new file mode 100644 index 00000000000..69f5bb88b02 --- /dev/null +++ b/idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt @@ -0,0 +1,7 @@ +//TODO: should not shorten references here + +fun main(args: Array) { + assert(false, "mess": kotlin.String) +} + +// WITH_RUNTIME \ No newline at end of file diff --git a/idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt.after b/idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt.after new file mode 100644 index 00000000000..ac877ed53ca --- /dev/null +++ b/idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt.after @@ -0,0 +1,9 @@ +//TODO: should not shorten references here + +fun main(args: Array) { + if (!false) { + throw AssertionError("mess": String) + } +} + +// WITH_RUNTIME \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/plugin/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/jet/plugin/intentions/IntentionTestGenerated.java index da9e608962a..4171c8f65b7 100644 --- a/idea/tests/org/jetbrains/jet/plugin/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/plugin/intentions/IntentionTestGenerated.java @@ -2149,6 +2149,11 @@ public class IntentionTestGenerated extends AbstractIntentionTest { doTest("idea/testData/intentions/convertAssertToIf/booleanConditionWithVariables.kt"); } + @TestMetadata("doNotShortenReferenceInsideMessage.kt") + public void testDoNotShortenReferenceInsideMessage() throws Exception { + doTest("idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt"); + } + @TestMetadata("dotQualifiedCall.kt") public void testDotQualifiedCall() throws Exception { doTest("idea/testData/intentions/convertAssertToIf/dotQualifiedCall.kt");