Works also for top level fun - why not?

This commit is contained in:
Valentin Kipyatkov
2015-11-06 19:08:59 +03:00
parent 870fc9284b
commit d599b77ece
3 changed files with 22 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
// INTENTION_TEXT: "Add import for 'kotlin.test.assertFailsWith'"
// WITH_RUNTIME
fun foo() {
kotlin.test.<caret>assertFailsWith<Exception>("", {})
kotlin.test.assertFailsWith(RuntimeException::class.java, "", {})
}
@@ -0,0 +1,9 @@
import kotlin.test.assertFailsWith
// INTENTION_TEXT: "Add import for 'kotlin.test.assertFailsWith'"
// WITH_RUNTIME
fun foo() {
<caret>assertFailsWith<Exception>("", {})
assertFailsWith(RuntimeException::class.java, "", {})
}
@@ -5135,6 +5135,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/StaticJavaMethod.kt");
doTest(fileName);
}
@TestMetadata("TopLevelFun.kt")
public void testTopLevelFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/TopLevelFun.kt");
doTest(fileName);
}
}
@TestMetadata("idea/testData/intentions/infixCallToOrdinary")