Lines 20101-20105
Link Here
|
20101 |
"methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test253008;, ()Z, methodReturningBoolean, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
20101 |
"methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test253008;, ()Z, methodReturningBoolean, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", |
20102 |
requestor.getResults()); |
20102 |
requestor.getResults()); |
20103 |
} |
20103 |
} |
|
|
20104 |
// bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=274466 |
20105 |
// Check for boolean methods with higher relevance in assert statements |
20106 |
public void test274466() throws JavaModelException { |
20107 |
this.workingCopies = new ICompilationUnit[1]; |
20108 |
this.workingCopies[0] = getWorkingCopy( |
20109 |
"/Completion/src/test/Test274466.java", |
20110 |
"package test;" + |
20111 |
"public class Test274466 {\n" + |
20112 |
" boolean methodReturningBoolean() { return true; }\n" + |
20113 |
" void methodReturningBlah() { return; }\n" + |
20114 |
" int foo(int p) {\n" + |
20115 |
" assert methodR" + |
20116 |
" }\n" + |
20117 |
"}\n"); |
20118 |
|
20119 |
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); |
20120 |
String str = this.workingCopies[0].getSource(); |
20121 |
String completeBehind = "methodR"; |
20122 |
int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); |
20123 |
|
20124 |
this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); |
20125 |
assertResults( |
20126 |
"methodReturningBlah[METHOD_REF]{methodReturningBlah(), Ltest.Test274466;, ()V, methodReturningBlah, " + |
20127 |
(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + |
20128 |
"methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test274466;, ()Z, methodReturningBoolean, " + |
20129 |
(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_EXACT_EXPECTED_TYPE + R_NON_RESTRICTED) + "}", |
20130 |
requestor.getResults()); |
20131 |
} |
20104 |
|
20132 |
|
20105 |
} |
20133 |
} |