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 36400 Details for
Bug 131932
structure model bug: generic method ITD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch containing failing testcase
pr131932-tests-patch.txt (text/plain), 4.08 KB, created by
Helen Beeken
on 2006-03-16 06:38:10 EST
(
hide
)
Description:
patch containing failing testcase
Filename:
MIME Type:
Creator:
Helen Beeken
Created:
2006-03-16 06:38:10 EST
Size:
4.08 KB
patch
obsolete
>Index: src/org/aspectj/systemtest/ajc151/Ajc151Tests.java >=================================================================== >RCS file: /home/technology/org.aspectj/modules/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java,v >retrieving revision 1.30 >diff -u -r1.30 Ajc151Tests.java >--- src/org/aspectj/systemtest/ajc151/Ajc151Tests.java 16 Mar 2006 11:01:55 -0000 1.30 >+++ src/org/aspectj/systemtest/ajc151/Ajc151Tests.java 16 Mar 2006 11:39:01 -0000 >@@ -112,6 +112,42 @@ > runTest("no ClassCastException with generic aspect and unknown type"); > } > >+ public void testStructureModelForGenericITD_pr131932() { >+ //AsmManager.setReporting("c:/debug.txt",true,true,true,true); >+ runTest("structure model for generic itd"); >+ IHierarchy top = AsmManager.getDefault().getHierarchy(); >+ >+ // get the IProgramElements corresponding to the ITD method statement >+ // and the class it matches. >+ IProgramElement itd = top.findElementForLabel(top.getRoot(), >+ IProgramElement.Kind.INTER_TYPE_METHOD,"Bar.getFirst()"); >+ assertNotNull("Couldn't find 'Bar.getFirst()' element in the tree",itd); >+ IProgramElement bar = top.findElementForLabel(top.getRoot(), >+ IProgramElement.Kind.CLASS,"Bar"); >+ assertNotNull("Couldn't find Bar element in the tree",bar); >+ >+ // check that the relationship map has 'itd declared on bar' >+ List matches = AsmManager.getDefault().getRelationshipMap().get(itd); >+ assertNotNull("itd Bar.getFirst() should have some relationships but does not",matches); >+ assertTrue("itd should have one relationship but has " + matches.size(), matches.size() == 1); >+ List matchesTargets = ((Relationship)matches.get(0)).getTargets(); >+ assertTrue("itd Bar.getFirst() should have one target but has " + matches.size(),matchesTargets.size() == 1); >+ IProgramElement target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0)); >+ assertEquals("target of relationship should be the Bar class but is IPE with label " >+ + target.toLabelString(),bar,target); >+ >+ // check that the relationship map has 'bar aspect declarations itd' >+ matches = AsmManager.getDefault().getRelationshipMap().get(bar); >+ assertNotNull("Bar should have some relationships but does not",matches); >+ assertTrue("Bar should have one relationship but has " + matches.size(), matches.size() == 1); >+ matchesTargets = ((Relationship)matches.get(0)).getTargets(); >+ assertTrue("Bar should have one target but has " + matches.size(),matchesTargets.size() == 1); >+ target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0)); >+ assertEquals("target of relationship should be the itd Bar.getFirst() but is IPE with label " >+ + target.toLabelString(),itd,target); >+ >+ } >+ > /* > * @AspectJ bugs and enhancements > */ >Index: src/org/aspectj/systemtest/ajc151/ajc151.xml >=================================================================== >RCS file: /home/technology/org.aspectj/modules/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml,v >retrieving revision 1.28 >diff -u -r1.28 ajc151.xml >--- src/org/aspectj/systemtest/ajc151/ajc151.xml 16 Mar 2006 11:01:55 -0000 1.28 >+++ src/org/aspectj/systemtest/ajc151/ajc151.xml 16 Mar 2006 11:39:02 -0000 >@@ -252,6 +252,9 @@ > </compile> > </ajc-test> > >+ <ajc-test dir="bugs151" title="structure model for generic itd"> >+ <compile files="pr131932.aj" options="-1.5 -emacssym"/> >+ </ajc-test> > > <!-- New features down here... when they arent big enough to have their own test file --> > >Index: bugs151/pr131932.aj >=================================================================== >RCS file: bugs151/pr131932.aj >diff -N bugs151/pr131932.aj >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ bugs151/pr131932.aj 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,12 @@ >+import java.util.List; >+ >+aspect Slide74 { >+ >+ public X Bar<X>.getFirst() { >+ return lts.get(0); >+ } >+ >+ static class Bar<T> { >+ List<T> lts; >+ } >+}
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 131932
:
36400
|
36401
|
36404
|
36405