Lines 20102-20105
Link Here
|
20102 |
requestor.getResults()); |
20102 |
requestor.getResults()); |
20103 |
} |
20103 |
} |
20104 |
|
20104 |
|
|
|
20105 |
public void test270436a() throws JavaModelException { |
20106 |
this.workingCopies = new ICompilationUnit[1]; |
20107 |
this.workingCopies[0] = getWorkingCopy( |
20108 |
"/Completion/src/test/Test270436a.java", |
20109 |
"package test;\n" + |
20110 |
"public final class TestClass {}\n" + |
20111 |
"interface TestInterface {}\n" + |
20112 |
"class Subclass extends test.Test {}\n"); |
20113 |
|
20114 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); |
20115 |
String str = this.workingCopies[0].getSource(); |
20116 |
String completeBehind = "test.Test"; |
20117 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
20118 |
|
20119 |
// In the absence of the fix, it would have been: |
20120 |
// TestInterface[TYPE_REF]{TestInterface, test, Ltest.TestInterface;, null, 19} |
20121 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
20122 |
assertResults( |
20123 |
"", |
20124 |
requestor.getResults()); |
20125 |
} |
20126 |
|
20127 |
public void test270436b() throws JavaModelException { |
20128 |
this.workingCopies = new ICompilationUnit[1]; |
20129 |
this.workingCopies[0] = getWorkingCopy( |
20130 |
"/Completion/src/test/Test270436b.java", |
20131 |
"package test;\n" + |
20132 |
"public final class TestClass {}\n" + |
20133 |
"interface TestInterface {}\n" + |
20134 |
"class Subclass extends test.Sub {}\n"); |
20135 |
|
20136 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); |
20137 |
String str = this.workingCopies[0].getSource(); |
20138 |
String completeBehind = "test.Sub"; |
20139 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
20140 |
|
20141 |
// In the absence of the fix, it would have been: |
20142 |
// Subclass[TYPE_REF]{Subclass, test, Ltest.Subclass;, null, 39} |
20143 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
20144 |
assertResults( |
20145 |
"", |
20146 |
requestor.getResults()); |
20147 |
} |
20148 |
|
20105 |
} |
20149 |
} |