mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make tests more independent from all/imported classes behavior
This commit is contained in:
+7
-1
@@ -1,6 +1,12 @@
|
||||
class Util {
|
||||
{
|
||||
FooZoo<caret>
|
||||
Another.fooZoo<caret>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Another {
|
||||
private static void fooZoo() {}
|
||||
static void fooZooGoo() {}
|
||||
static void fooZooImpl() {}
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
interface FooIntf {}
|
||||
class FooClass {}
|
||||
class Foo {}
|
||||
interface XFooIntf {}
|
||||
class XFooClass {}
|
||||
class XFoo {}
|
||||
|
||||
class Goo implements Fo<caret> {
|
||||
class Goo implements XFo<caret> {
|
||||
}
|
||||
|
||||
+6
-7
@@ -1289,14 +1289,13 @@ class Foo {
|
||||
|
||||
public void testBackspaceShouldShowPreviousVariants() {
|
||||
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.NONE
|
||||
myFixture.addClass("class OuterX { static class TrueLine {} }")
|
||||
myFixture.configureByText 'a.java', 'class Foo{ void foo(int truex) { return tr<caret> }}'
|
||||
type 'ue'
|
||||
assert myFixture.lookupElementStrings == ['true', 'truex']
|
||||
type 'l'
|
||||
assert myFixture.lookupElementStrings == ['TrueLine']
|
||||
myFixture.configureByText 'a.java', 'class Foo{ void foo(int itera, int itex) { it<caret> }}'
|
||||
type 'e'
|
||||
myFixture.assertPreferredCompletionItems 0, 'itera', 'itex'
|
||||
type 'r'
|
||||
myFixture.assertPreferredCompletionItems 0, 'itera', 'iter'
|
||||
type '\b'
|
||||
assert myFixture.lookupElementStrings == ['true', 'truex']
|
||||
myFixture.assertPreferredCompletionItems 0, 'itera', 'itex'
|
||||
}
|
||||
|
||||
public void testBackspaceUntilDot() {
|
||||
|
||||
+3
-6
@@ -261,7 +261,7 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
}
|
||||
|
||||
public void testPreferInterfacesInImplements() {
|
||||
checkPreferredItems(0, "FooIntf", "Foo", "FooClass");
|
||||
checkPreferredItems(0, "XFooIntf", "XFoo", "XFooClass");
|
||||
}
|
||||
|
||||
public void testPreferClassesInExtends() {
|
||||
@@ -445,14 +445,11 @@ import java.lang.annotation.Target;
|
||||
}
|
||||
|
||||
public void testChangePreselectionOnSecondInvocation() {
|
||||
myFixture.addClass('package foo; public class FooZoo { }')
|
||||
myFixture.addClass('public class FooZooImpl { }')
|
||||
myFixture.addClass('public class FooZooGoo {}')
|
||||
configureNoCompletion(getTestName(false) + ".java");
|
||||
myFixture.complete(CompletionType.BASIC);
|
||||
assertPreferredItems(0, 'FooZooGoo', 'FooZooImpl');
|
||||
assertPreferredItems(0, 'fooZooGoo', 'fooZooImpl');
|
||||
myFixture.complete(CompletionType.BASIC);
|
||||
assertPreferredItems(0, 'FooZoo', 'FooZooGoo', 'FooZooImpl');
|
||||
assertPreferredItems(0, 'fooZoo', 'fooZooGoo', 'fooZooImpl');
|
||||
}
|
||||
|
||||
public void testUnderscoresDontMakeMatchMiddle() {
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
public void testReferenceParameters() throws Exception {
|
||||
configureByFile("ReferenceParameters.java");
|
||||
assertNotNull(myItems);
|
||||
assert myFixture.lookupElementStrings == ['AAAA', 'AAAB']
|
||||
myFixture.assertPreferredCompletionItems 0, 'AAAA', 'AAAB'
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-4
@@ -228,11 +228,9 @@ Abcdefg <caret>'''
|
||||
|
||||
public void testPrivate() {
|
||||
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.NONE
|
||||
myFixture.addClass("package foo; public class PrimaBalerina {}")
|
||||
myFixture.configureByText 'a.groovy', 'class Foo { <caret> }'
|
||||
type 'pri'
|
||||
assert myFixture.lookupElementStrings[0] == 'private'
|
||||
assert !('PrimaBalerina' in myFixture.lookupElementStrings)
|
||||
}
|
||||
|
||||
public void testFieldTypeNonImported() {
|
||||
@@ -264,9 +262,9 @@ Abcdefg <caret>'''
|
||||
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.NONE
|
||||
myFixture.configureByText 'a.groovy', '<caret>'
|
||||
type 'boo'
|
||||
myFixture.assertPreferredCompletionItems 0, 'boolean', 'Boolean'
|
||||
myFixture.assertPreferredCompletionItems 0, 'boolean'
|
||||
type '\b\b\bBoo'
|
||||
myFixture.assertPreferredCompletionItems 0, 'Boolean', 'boolean'
|
||||
myFixture.assertPreferredCompletionItems 0, 'Boolean'
|
||||
}
|
||||
|
||||
public void testPackageQualifier() {
|
||||
|
||||
Reference in New Issue
Block a user