Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 26289 Details for
Bug 100636
[model] Can't find overriden methods of protected nonstatic inner class.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch100636_org.eclipse.jdt.core.tests.model.txt (text/plain), 2.42 KB, created by
Jerome Lanneluc
on 2005-08-19 06:57:05 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-08-19 06:57:05 EDT
Size:
2.42 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java,v >retrieving revision 1.33 >diff -u -r1.33 ASTModelBridgeTests.java >--- src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java 15 Jun 2005 16:29:39 -0000 1.33 >+++ src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java 19 Aug 2005 10:36:56 -0000 >@@ -36,7 +36,7 @@ > // All specified tests which do not belong to the class are skipped... > static { > // TESTS_PREFIX = "testBug86380"; >-// TESTS_NAMES = new String[] { "testAnonymousType2" }; >+// TESTS_NAMES = new String[] { "testBinaryMemberTypeFromAnonymousClassFile" }; > // TESTS_NUMBERS = new int[] { 83230 }; > // TESTS_RANGE = new int[] { 83304, -1 }; > } >@@ -85,6 +85,15 @@ > "public class Y<T> {\n" + > " public Y(T t) {\n" + > " }\n" + >+ "}", >+ "p/Z.java", >+ "package p;\n" + >+ "public class Z {\n" + >+ " /*start*/class Member {\n" + >+ " }/*end*/\n" + >+ " void foo() {\n" + >+ " new Member() {};\n" + >+ " }\n" + > "}" > }, > "1.5"); >@@ -243,6 +252,28 @@ > } > > /* >+ * Ensures that the IJavaElement for a binary member type coming from an anoumous class file is correct. >+ * (regression test for bug 100636 [model] Can't find overriden methods of protected nonstatic inner class.) >+ */ >+ public void testBinaryMemberTypeFromAnonymousClassFile() throws JavaModelException { >+ IClassFile classFile = getClassFile("P", "/P/lib.jar", "p", "Z$1.class"); >+ String source = classFile.getSource(); >+ MarkerInfo markerInfo = new MarkerInfo(source); >+ markerInfo.astStarts = new int[] {source.indexOf("/*start*/") + "/*start*/".length()}; >+ markerInfo.astEnds = new int[] {source.indexOf("/*end*/")}; >+ ASTNode node = buildAST(markerInfo, classFile); >+ IBinding binding = ((TypeDeclaration) node).resolveBinding(); >+ assertNotNull("No binding", binding); >+ IJavaElement element = binding.getJavaElement(); >+ assertElementEquals( >+ "Unexpected Java element", >+ "Member [in Z$Member.class [in p [in lib.jar [in P]]]]", >+ element >+ ); >+ assertTrue("Element should exist", element.exists()); >+ } >+ >+ /* > * Ensures that the correct IBindings are created for a given set of IJavaElement > * (test several kinds of elements) > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 100636
:
23650
|
23714
|
23723
|
26288
| 26289