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 22940 Details for
Bug 99608
IMethodBinding#overrides returns false on overridden method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch99608_org.eclipse.jdt.core.tests.model.txt (text/plain), 2.17 KB, created by
Jerome Lanneluc
on 2005-06-13 11:36:13 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-06-13 11:36:13 EDT
Size:
2.17 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java,v >retrieving revision 1.11 >diff -u -r1.11 CompatibilityRulesTests.java >--- src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java 6 Jun 2005 13:03:12 -0000 1.11 >+++ src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java 13 Jun 2005 15:35:34 -0000 >@@ -28,14 +28,18 @@ > } > > public static Test suite() { >- if (false) { >- Suite suite = new Suite(CompatibilityRulesTests.class.getName()); >- suite.addTest(new CompatibilityRulesTests("test027")); >- return suite; >- } >- return new Suite(CompatibilityRulesTests.class); >+ return buildTestSuite(CompatibilityRulesTests.class); > } > >+ // Use this static initializer to specify subset for tests >+ // All specified tests which do not belong to the class are skipped... >+ static { >+// TESTS_PREFIX = "testBug86380"; >+// TESTS_NAMES = new String[] { "test030" }; >+// TESTS_NUMBERS = new int[] { 83230 }; >+// TESTS_RANGE = new int[] { 83304, -1 }; >+ } >+ > public void setUpSuite() throws Exception { > super.setUpSuite(); > createJavaProject("P", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5"); >@@ -640,4 +644,29 @@ > assertTrue("Y#bar() should not override X#foo()", !bindings[0].overrides(bindings[1])); > } > >+ /* >+ * Ensures that a method in a subtype overrides a method the super parameterized type. >+ */ >+ public void test030() throws JavaModelException { >+ IMethodBinding[] bindings = createMethodBindings( >+ new String[] { >+ "/P/p1/X.java", >+ "package p1;\n" + >+ "public class X<T> {\n" + >+ " void foo(T t) {\n" + >+ " }\n" + >+ "}", >+ "/P/p1/Y.java", >+ "package p1;\n" + >+ "public class Y extends X<String> {\n" + >+ " void foo(String s) {\n" + >+ " }\n" + >+ "}", >+ }, >+ new String[] { >+ "Lp1/Y;.foo(Ljava/lang/String;)V", >+ "Lp1/X;.foo(TT;)V" >+ }); >+ assertTrue("Y#foo(String) should override X#foo(T)", bindings[0].overrides(bindings[1])); >+ } > }
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 99608
:
22939
| 22940