diff options
author | aclement <aclement> | 2005-03-11 09:42:49 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-03-11 09:42:49 +0000 |
commit | fa54cd96661ca2b2fa6c0289bd6b90bc38fa5e47 (patch) | |
tree | 168f2fbd31cdc1c4fefda8f26eb4f279ad581223 /tests | |
parent | e743d8b92075dbd8944b723dc6b231825d2e0137 (diff) | |
download | aspectj-fa54cd96661ca2b2fa6c0289bd6b90bc38fa5e47.tar.gz aspectj-fa54cd96661ca2b2fa6c0289bd6b90bc38fa5e47.zip |
Guard test execution on 1.5 vm level.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/DeclareAnnotationTests.java | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/DeclareAnnotationTests.java b/tests/src/org/aspectj/systemtest/ajc150/DeclareAnnotationTests.java index e87e45fa9..856dfad31 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/DeclareAnnotationTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/DeclareAnnotationTests.java @@ -287,36 +287,39 @@ public class DeclareAnnotationTests extends XMLBasedAjcTestCase { public void testStructureModel() { // AsmManager.setReporting("c:/debug.txt",true,true,true,true); runTest("declare all annotations on one class - source weaving"); - IHierarchy top = AsmManager.getDefault().getHierarchy(); - IProgramElement ipe = top.findElementForLabel(top.getRoot(), - IProgramElement.Kind.DECLARE_ANNOTATION_AT_TYPE, - "declare at_type: p.q.DeathByAnnotations : @Colored(\"red\")"); - assertTrue("Couldn't find 'declare @type' element in the tree",ipe!=null); - - List l = AsmManager.getDefault().getRelationshipMap().get(ipe); - assertTrue("Should have a relationship but does not ",l.size()>0); - - ipe = top.findElementForLabel(top.getRoot(), - IProgramElement.Kind.DECLARE_ANNOTATION_AT_METHOD, - "declare at_method: * m*(..) : @Fruit(\"tomato\")"); - assertTrue("Couldn't find 'declare @method element in the tree",ipe!=null); - - l = AsmManager.getDefault().getRelationshipMap().get(ipe); - assertTrue("Should have a relationship but does not ",l.size()>0); - - ipe = top.findElementForLabel(top.getRoot(), - IProgramElement.Kind.DECLARE_ANNOTATION_AT_CONSTRUCTOR, - "declare at_constructor: p.q.DeathByAnnotations.new(..) : @Fruit(\"tomato\")"); - assertTrue("Couldn't find 'declare @constructor element in the tree",ipe!=null); - l = AsmManager.getDefault().getRelationshipMap().get(ipe); - assertTrue("Should have a relationship but does not ",l.size()>0); - - ipe = top.findElementForLabel(top.getRoot(), - IProgramElement.Kind.DECLARE_ANNOTATION_AT_FIELD, - "declare at_field: * p.q.DeathByAnnotations.* : @Material(\"wood\")"); - assertTrue("Couldn't find 'declare @field element in the tree",ipe!=null); - l = AsmManager.getDefault().getRelationshipMap().get(ipe); - assertTrue("Should have a relationship but does not ",l.size()>0); + if (getCurrentTest().canRunOnThisVM()) { + IHierarchy top = AsmManager.getDefault().getHierarchy(); + + IProgramElement ipe = top.findElementForLabel(top.getRoot(), + IProgramElement.Kind.DECLARE_ANNOTATION_AT_TYPE, + "declare at_type: p.q.DeathByAnnotations : @Colored(\"red\")"); + assertTrue("Couldn't find 'declare @type' element in the tree",ipe!=null); + + List l = AsmManager.getDefault().getRelationshipMap().get(ipe); + assertTrue("Should have a relationship but does not ",l.size()>0); + + ipe = top.findElementForLabel(top.getRoot(), + IProgramElement.Kind.DECLARE_ANNOTATION_AT_METHOD, + "declare at_method: * m*(..) : @Fruit(\"tomato\")"); + assertTrue("Couldn't find 'declare @method element in the tree",ipe!=null); + + l = AsmManager.getDefault().getRelationshipMap().get(ipe); + assertTrue("Should have a relationship but does not ",l.size()>0); + + ipe = top.findElementForLabel(top.getRoot(), + IProgramElement.Kind.DECLARE_ANNOTATION_AT_CONSTRUCTOR, + "declare at_constructor: p.q.DeathByAnnotations.new(..) : @Fruit(\"tomato\")"); + assertTrue("Couldn't find 'declare @constructor element in the tree",ipe!=null); + l = AsmManager.getDefault().getRelationshipMap().get(ipe); + assertTrue("Should have a relationship but does not ",l.size()>0); + + ipe = top.findElementForLabel(top.getRoot(), + IProgramElement.Kind.DECLARE_ANNOTATION_AT_FIELD, + "declare at_field: * p.q.DeathByAnnotations.* : @Material(\"wood\")"); + assertTrue("Couldn't find 'declare @field element in the tree",ipe!=null); + l = AsmManager.getDefault().getRelationshipMap().get(ipe); + assertTrue("Should have a relationship but does not ",l.size()>0); + } } }
\ No newline at end of file |