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 21110 Details for
Bug 87929
Wrong decoding of type signature with wildcards
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch87929_org.eclipse.jdt.core.tests.model.txt (text/plain), 3.01 KB, created by
Jerome Lanneluc
on 2005-05-13 10:54:18 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-05-13 10:54:18 EDT
Size:
3.01 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java,v >retrieving revision 1.39 >diff -u -r1.39 ResolveTests_1_5.java >--- src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 3 May 2005 11:24:51 -0000 1.39 >+++ src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 13 May 2005 14:52:39 -0000 >@@ -10,8 +10,6 @@ > *******************************************************************************/ > package org.eclipse.jdt.core.tests.model; > >-import java.lang.reflect.Method; >- > import org.eclipse.jdt.core.*; > import org.eclipse.jdt.core.ICompilationUnit; > >@@ -20,23 +18,18 @@ > public class ResolveTests_1_5 extends AbstractJavaModelTests { > ICompilationUnit wc = null; > WorkingCopyOwner owner = null; >+ >+static { >+ // Names of tests to run: can be "testBugXXXX" or "BugXXXX") >+ //TESTS_NAMES = new String[] { "test0095" }; >+ // Numbers of tests to run: "test<number>" will be run for each number of this array >+ //TESTS_NUMBERS = new int[] { 13 }; >+ // Range numbers of tests to run: all tests between "test<first>" and "test<last>" will be run for { first, last } >+ //TESTS_RANGE = new int[] { 16, -1 }; >+} > public static Test suite() { >- TestSuite suite = new Suite(ResolveTests_1_5.class.getName()); >- >- if (true) { >- Class c = ResolveTests_1_5.class; >- Method[] methods = c.getMethods(); >- for (int i = 0, max = methods.length; i < max; i++) { >- if (methods[i].getName().startsWith("test")) { //$NON-NLS-1$ >- suite.addTest(new ResolveTests_1_5(methods[i].getName())); >- } >- } >- return suite; >- } >- suite.addTest(new ResolveTests_1_5("test0093")); >- return suite; >+ return buildTestSuite(ResolveTests_1_5.class); > } >- > public ResolveTests_1_5(String name) { > super(name); > } >@@ -2095,4 +2088,36 @@ > true/*show key*/ > ); > } >+/* >+ * Regression test for bug 87929 Wrong decoding of type signature with wildcards >+ */ >+public void test0095() throws JavaModelException { >+ IJavaElement[] elements = select( >+ "/Resolve/src2/test0095/X.java", >+ "package test0095;\n" + >+ "public class X {\n" + >+ " Y<?, ? extends Z<? super Exception>> y;\n" + >+ "}\n" + >+ "class Y<K, V> {\n" + >+ "}\n" + >+ "class Z<T> {\n" + >+ "}", >+ "Y<?, ? extends Z<? super Exception>>"); >+ >+ assertElementsEqual( >+ "Unexpected elements", >+ "Y {key=Ltest0095/X~Y<Ltest0095/X~Y;*Ltest0095/X~Y;+Ltest0095/X~Z<Ltest0095/X~Z;-Ljava/lang/Exception;>;>;} [in [Working copy] X.java [in test0095 [in src2 [in Resolve]]]]", >+ elements, >+ true/*show key*/ >+ ); >+ >+ String key = ((IType) elements[0]).getKey(); >+ String signature = new BindingKey(key).internalToSignature(); >+ String[] typeArguments = Signature.getTypeArguments(signature); >+ assertStringsEqual( >+ "Unexpected type arguments", >+ "*\n" + >+ "+Ltest0095.Z<-Ljava.lang.Exception;>;\n", >+ typeArguments); >+} > }
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 87929
: 21110