diff options
author | aclement <aclement> | 2004-12-08 14:34:33 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-12-08 14:34:33 +0000 |
commit | ae085e2a79e3d8a71b03f422db8292d1007e04c1 (patch) | |
tree | 5a27c8f7dc4d95f9359b9c2371839319c65769ca /weaver/testsrc/org | |
parent | 6e6d34c79638763ab180578dd169147fda5011cc (diff) | |
download | aspectj-ae085e2a79e3d8a71b03f422db8292d1007e04c1.tar.gz aspectj-ae085e2a79e3d8a71b03f422db8292d1007e04c1.zip |
Annotation matching.
Diffstat (limited to 'weaver/testsrc/org')
-rw-r--r-- | weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java | 2 | ||||
-rw-r--r-- | weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java index 52b6b98a6..c3ea08e4d 100644 --- a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java @@ -327,7 +327,7 @@ public class AnnotationPatternTestCase extends TestCase { this.annotationTypes = annotationTypes; } - public boolean hasAnnotation(ResolvedTypeX ofType) { + public boolean hasAnnotation(TypeX ofType) { for (int i = 0; i < annotationTypes.length; i++) { if (annotationTypes[i].equals(ofType.getName())) return true; } diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java index bf1471667..1be581690 100644 --- a/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java @@ -63,18 +63,20 @@ public class ParserTestCase extends TestCase { } public void testParseWithAnnotation() { - PatternParser parser = new PatternParser("execution(@p.SimpleAnnotation void Hello.*(..))"); + PatternParser parser = new PatternParser("execution(@SimpleAnnotation void Hello.*(..))"); KindedPointcut p = (KindedPointcut) parser.parsePointcut(); // XXX - needs finishing... - // p.resolveBindings(makeSimpleScope(),new Bindings(3)); -// System.err.println(p); + p.resolveBindings(makeSimpleScope(),new Bindings(3)); + System.err.println(p); // assertEquals(p.kind, BcelShadow.MethodExecution); // assertTrue(p.signature.getName().matches("foobar")); // p.signature.resolveBindings(makeSimpleScope(),new Bindings(3)); } public TestScope makeSimpleScope() { - return new TestScope(new String[] {"int", "java.lang.String"}, new String[] {"a", "b"}, world); + TestScope s = new TestScope(new String[] {"int", "java.lang.String"}, new String[] {"a", "b"}, world); + s.setImportedPrefixes(new String[]{"p."}); + return s; } } |