Fixed tests

This commit is contained in:
Valentin Kipyatkov
2014-09-26 15:20:46 +04:00
parent da159c1e53
commit 028520956f
3 changed files with 16 additions and 17 deletions
@@ -1,10 +1,10 @@
val id = ""
val p = ""
val p1 = ""
val xId = ""
val xP = ""
val xP1 = ""
fun g(zone: java.util.TimeZone) {
val local = ""
zone.setID(<caret>)
val xLocal = ""
zone.setID(x<caret>)
}
// ORDER: local, id, p, p1
// ORDER: xLocal, xId, xP, xP1
@@ -1,13 +1,13 @@
// test that name similarity sorting takes over declaration kind sorting
val globalBar = ""
val globalX = ""
val xGlobalBar = ""
val xGlobalX = ""
fun f(fooBar: String){}
fun g() {
val localBar = ""
val localX = ""
f(<caret>)
val xLocalBar = ""
val xLocalX = ""
f(x<caret>)
}
// ORDER: localBar, globalBar, localX, globalX
// ORDER: xLocalBar, xGlobalBar, xLocalX, xGlobalX
@@ -39,14 +39,13 @@ public abstract class AbstractCompletionWeigherTest(val completionType: Completi
myFixture.assertPreferredCompletionItems(InTextDirectivesUtils.getPrefixedInt(text, "// SELECTED:") ?: 0, *items)
}
override fun getProjectDescriptor(): LightProjectDescriptor {
return JetWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
}
protected override fun getTestDataPath() : String? {
return File(PluginTestCaseBase.getTestDataPathBase(), relativeTestDataPath).getPath() + File.separator
}
}
public abstract class AbstractBasicCompletionWeigherTest() : AbstractCompletionWeigherTest(CompletionType.BASIC, "/completion/weighers/basic")
public abstract class AbstractSmartCompletionWeigherTest() : AbstractCompletionWeigherTest(CompletionType.SMART, "/completion/weighers/smart")
public abstract class AbstractSmartCompletionWeigherTest() : AbstractCompletionWeigherTest(CompletionType.SMART, "/completion/weighers/smart") {
override fun getProjectDescriptor() = JetWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
}