From 985d69880f547d4e53f35c210a673f11cf1ed8b2 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Thu, 11 Jun 2015 15:05:49 +0300 Subject: [PATCH] Better tests --- .../testData/basic/common/shadowing/InInitializer1.kt | 2 +- .../testData/basic/common/shadowing/InInitializer2.kt | 2 +- .../PreferMemberToGlobal.dependency.kt | 4 +++- .../multifile/PreferMemberToGlobal/PreferMemberToGlobal.kt | 7 +++++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/idea/idea-completion/testData/basic/common/shadowing/InInitializer1.kt b/idea/idea-completion/testData/basic/common/shadowing/InInitializer1.kt index b379bb74980..c3c4c2f98a6 100644 --- a/idea/idea-completion/testData/basic/common/shadowing/InInitializer1.kt +++ b/idea/idea-completion/testData/basic/common/shadowing/InInitializer1.kt @@ -1,5 +1,5 @@ fun foo(xxx: String) { - var xxx = xx + var xxx: Int = xx } // EXIST: { lookupString: "xxx", itemText: "xxx", typeText: "String" } diff --git a/idea/idea-completion/testData/basic/common/shadowing/InInitializer2.kt b/idea/idea-completion/testData/basic/common/shadowing/InInitializer2.kt index 50e8e2c16ea..552c7d1563f 100644 --- a/idea/idea-completion/testData/basic/common/shadowing/InInitializer2.kt +++ b/idea/idea-completion/testData/basic/common/shadowing/InInitializer2.kt @@ -1,5 +1,5 @@ fun foo() { - var xxx = + var xxx: Int = } // ABSENT: xxx diff --git a/idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/PreferMemberToGlobal.dependency.kt b/idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/PreferMemberToGlobal.dependency.kt index 65c456d456f..b09f787fc9f 100644 --- a/idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/PreferMemberToGlobal.dependency.kt +++ b/idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/PreferMemberToGlobal.dependency.kt @@ -1,3 +1,5 @@ package dependency -fun xxx(): Int = 0 \ No newline at end of file +fun xxx(): Int = 0 +fun xxy(): Int = 0 +fun xxz(): Int = 0 \ No newline at end of file diff --git a/idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/PreferMemberToGlobal.kt b/idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/PreferMemberToGlobal.kt index bf09db6b00d..c578d7a26b4 100644 --- a/idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/PreferMemberToGlobal.kt +++ b/idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/PreferMemberToGlobal.kt @@ -1,5 +1,9 @@ +import dependency.xxx + class C { fun xxx(){} + fun xxy(){} + fun xxz(p: Int){} fun f() { xx @@ -8,4 +12,7 @@ class C { // INVOCATION_COUNT: 2 // EXIST: { lookupString: "xxx", itemText: "xxx", tailText: "()", typeText: "Unit" } +// EXIST: { lookupString: "xxy", itemText: "xxy", tailText: "()", typeText: "Unit" } +// EXIST: { lookupString: "xxz", itemText: "xxz", tailText: "(p: Int)", typeText: "Unit" } +// EXIST: { lookupString: "xxz", itemText: "xxz", tailText: "() (dependency)", typeText: "Int" } // NOTHING_ELSE