Lines 711-716
Link Here
|
711 |
suite.addTest(new JavaSearchBugsTests("testBug349683")); |
711 |
suite.addTest(new JavaSearchBugsTests("testBug349683")); |
712 |
suite.addTest(new JavaSearchBugsTests("testBug345807")); |
712 |
suite.addTest(new JavaSearchBugsTests("testBug345807")); |
713 |
suite.addTest(new JavaSearchBugsTests("testBug355605")); |
713 |
suite.addTest(new JavaSearchBugsTests("testBug355605")); |
|
|
714 |
suite.addTest(new JavaSearchBugsTests("testBug241834")); |
714 |
return suite; |
715 |
return suite; |
715 |
} |
716 |
} |
716 |
class TestCollector extends JavaSearchResultCollector { |
717 |
class TestCollector extends JavaSearchResultCollector { |
Lines 13748-13755
Link Here
|
13748 |
search(method, IMPLEMENTORS, EXACT_RULE, hierarchyScope, this.resultCollector); |
13749 |
search(method, IMPLEMENTORS, EXACT_RULE, hierarchyScope, this.resultCollector); |
13749 |
assertSearchResults("Unexpected search results!", "X.java void X$R.t:<anonymous>#1.s:<anonymous>#1.myMethod() [myMethod] EXACT_MATCH", this.resultCollector); |
13750 |
assertSearchResults("Unexpected search results!", "X.java void X$R.t:<anonymous>#1.s:<anonymous>#1.myMethod() [myMethod] EXACT_MATCH", this.resultCollector); |
13750 |
|
13751 |
|
|
|
13752 |
} finally { |
13753 |
deleteProject("P"); |
13754 |
} |
13755 |
} |
13756 |
/** |
13757 |
* @bug 241834: [search] ClassCastException during move class refactoring |
13758 |
* @test that search for declarations of referenced types doesn't cause CCE |
13759 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=241834" |
13760 |
*/ |
13761 |
public void testBug241834() throws CoreException { |
13762 |
try { |
13763 |
IJavaProject project = createJavaProject("P"); |
13764 |
project.setOption(JavaCore.COMPILER_DOC_COMMENT_SUPPORT, JavaCore.ENABLED); |
13765 |
createFolder("/P/pkg"); |
13766 |
createFile("/P/pkg/Foo.java", |
13767 |
"package pkg;\n"+ |
13768 |
"/**\n" + |
13769 |
" * {@link missing.Foo}\n" + |
13770 |
" */\n" + |
13771 |
"public class Foo {\n" + |
13772 |
"}\n"); |
13773 |
waitUntilIndexesReady(); |
13774 |
IType type = getCompilationUnit("/P/pkg/Foo.java").getType("Foo"); |
13775 |
searchDeclarationsOfReferencedTypes(type, this.resultCollector); |
13776 |
assertSearchResults(""); |
13751 |
} finally { |
13777 |
} finally { |
13752 |
deleteProject("P"); |
13778 |
deleteProject("P"); |
|
|
13779 |
|
13753 |
} |
13780 |
} |
13754 |
} |
13781 |
} |
13755 |
} |
13782 |
} |