diff options
author | acolyer <acolyer> | 2005-12-14 00:53:28 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-12-14 00:53:28 +0000 |
commit | 9825192b0f54682faa39b7467b55372b679db544 (patch) | |
tree | 26fe549e83746b4d2a5eefd11a7505a0c8f02114 /tests/java5 | |
parent | 7de52b422183b16f37dafa025c6307d503cf233f (diff) | |
download | aspectj-9825192b0f54682faa39b7467b55372b679db544.tar.gz aspectj-9825192b0f54682faa39b7467b55372b679db544.zip |
fixes inefficient ordering of tests in SignaturePattern (that I inadvertantly introduced earlier), and corrects @DeclareParents impl in AJTypeSystem :- fields should NOT be shown, and nor should non-interface members.
Diffstat (limited to 'tests/java5')
-rw-r--r-- | tests/java5/reflection/AtAspectJDeclareParents.aj | 8 | ||||
-rw-r--r-- | tests/java5/reflection/ReflectOnAtAspectJDeclareParents.java | 16 |
2 files changed, 8 insertions, 16 deletions
diff --git a/tests/java5/reflection/AtAspectJDeclareParents.aj b/tests/java5/reflection/AtAspectJDeclareParents.aj index 2882c8734..d60f6a3c6 100644 --- a/tests/java5/reflection/AtAspectJDeclareParents.aj +++ b/tests/java5/reflection/AtAspectJDeclareParents.aj @@ -9,7 +9,13 @@ public aspect AtAspectJDeclareParents { class C {} -interface I{} +interface I{ + + int getX(); + + void setX(int x); + +} class Impl implements I { diff --git a/tests/java5/reflection/ReflectOnAtAspectJDeclareParents.java b/tests/java5/reflection/ReflectOnAtAspectJDeclareParents.java index efd482820..8f01325af 100644 --- a/tests/java5/reflection/ReflectOnAtAspectJDeclareParents.java +++ b/tests/java5/reflection/ReflectOnAtAspectJDeclareParents.java @@ -101,21 +101,7 @@ public class ReflectOnAtAspectJDeclareParents { private void testDeclaredInterTypeFields(AjType<AtAspectJDeclareParents> ajType) { InterTypeFieldDeclaration[] itdfs = ajType.getDeclaredITDFields(); - assertEquals(1,itdfs.length,"number of declared ITD fields"); - System.out.println(itdfs[0]); - try { - InterTypeFieldDeclaration shouldFind = ajType.getDeclaredITDField("x",AjTypeSystem.getAjType(I.class)); - System.out.println(shouldFind); - } catch (NoSuchFieldException ex) { - throw new RuntimeException("getITDField failed"); - } - try { - ajType.getDeclaredITDField("p",AjTypeSystem.getAjType(C.class)); - throw new RuntimeException("failed to fail in getting ITDField"); - } catch (NoSuchFieldException ex) { - // good! - } - + assertEquals(0,itdfs.length,"number of declared ITD fields"); } private void testInterTypeFields(AjType<AtAspectJDeclareParents> ajType) { |