Lines 115-120
Link Here
|
115 |
} |
115 |
} |
116 |
} |
116 |
} |
117 |
|
117 |
|
|
|
118 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=246276 |
119 |
public void testArrayInitializer1() throws JavaModelException { |
120 |
this.workingCopies = new ICompilationUnit[1]; |
121 |
this.workingCopies[0] = getWorkingCopy( |
122 |
"/Completion/src/ArrayInitializer.java", |
123 |
"public class ArrayInitializer {\n"+ |
124 |
" int bar() {return 0;}\n"+ |
125 |
" void foo(int[] i) {\n"+ |
126 |
" i = new int[] {\n"+ |
127 |
" bar()\n"+ |
128 |
" };\n"+ |
129 |
" }\n"+ |
130 |
"}\n"); |
131 |
|
132 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); |
133 |
|
134 |
String str = this.workingCopies[0].getSource(); |
135 |
String completeBehind = "bar("; |
136 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
137 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
138 |
|
139 |
assertResults( |
140 |
"bar[METHOD_REF]{, LArrayInitializer;, ()I, bar, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
141 |
requestor.getResults()); |
142 |
} |
143 |
|
118 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=164311 |
144 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=164311 |
119 |
public void testBug164311() throws JavaModelException { |
145 |
public void testBug164311() throws JavaModelException { |
120 |
this.workingCopies = new ICompilationUnit[1]; |
146 |
this.workingCopies = new ICompilationUnit[1]; |