aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/testsrc
diff options
context:
space:
mode:
authoraclement <aclement>2005-11-10 11:06:07 +0000
committeraclement <aclement>2005-11-10 11:06:07 +0000
commite433d6704633b9c3293f1b4c8507592ad987f2b8 (patch)
tree63c3505bdc2ed83f8da1e556314d28f4e05502b0 /org.aspectj.ajdt.core/testsrc
parent0f7cb310b399fe3ab9b9ed4fb228752beba00975 (diff)
downloadaspectj-e433d6704633b9c3293f1b4c8507592ad987f2b8.tar.gz
aspectj-e433d6704633b9c3293f1b4c8507592ad987f2b8.zip
fixes from AST bug: 110465.
Diffstat (limited to 'org.aspectj.ajdt.core/testsrc')
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java24
1 files changed, 16 insertions, 8 deletions
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java
index ea0fc5872..339b30db3 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java
@@ -25,6 +25,7 @@ import org.aspectj.org.eclipse.jdt.core.dom.AroundAdviceDeclaration;
import org.aspectj.org.eclipse.jdt.core.dom.Assignment;
import org.aspectj.org.eclipse.jdt.core.dom.BeforeAdviceDeclaration;
import org.aspectj.org.eclipse.jdt.core.dom.Block;
+import org.aspectj.org.eclipse.jdt.core.dom.BlockComment;
import org.aspectj.org.eclipse.jdt.core.dom.BodyDeclaration;
import org.aspectj.org.eclipse.jdt.core.dom.CompilationUnit;
import org.aspectj.org.eclipse.jdt.core.dom.DeclareDeclaration;
@@ -55,15 +56,15 @@ import org.aspectj.weaver.patterns.DeclareSoft;
public class ASTVisitorTest extends TestCase {
// from bug 110465 - will currently break because of casts
-// public void testAspectWithITD() {
-// check("aspect A{ public void B.x(){} }",
-// "(compilationUnit(aspect(simpleName)(methodITD(primitiveType)(simpleName)(block))))");
-// }
-//
-// public void testAspectWithCommentThenITD() {
-// check("aspect A{ /** */ public void B.x(){} }","yyy");
-// }
+ public void testAspectWithITD() {
+ check("aspect A{ public void B.x(){} }",
+ "(compilationUnit(aspect(simpleName)(methodITD(primitiveType)(simpleName)(block))))");
+ }
+ public void testAspectWithCommentThenITD() {
+ check("aspect A{ /** */ public void B.x(){} }",
+ "(compilationUnit(aspect(simpleName)(methodITD(primitiveType)(simpleName)(block))))");
+ }
// original tests
public void testAnInterface() {
@@ -514,6 +515,13 @@ class TestVisitor extends AjASTVisitor {
b.append("(variableDeclaration"); //$NON-NLS-1$
return isVisitingChildren();
}
+ public boolean visit(BlockComment bc) {
+ b.append("(blockcomment");
+ return isVisitingChildren();
+ }
+ public void endVisit(BlockComment bc) {
+ b.append(")");
+ }
public void endVisit(VariableDeclaration node) {
b.append(")"); //$NON-NLS-1$
}