ソースを参照

some useful AST tests

tags/V1_5_0RC1
aclement 18年前
コミット
891dc1b950
1個のファイルの変更13行の追加0行の削除
  1. 13
    0
      org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java

+ 13
- 0
org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java ファイルの表示

@@ -54,6 +54,18 @@ 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");
// }
// original tests
public void testAnInterface() {
check("interface AnInterface{}","(compilationUnit(interface(simpleName)))");
}
@@ -364,6 +376,7 @@ class TestVisitor extends AjASTVisitor {
}
public boolean visit(MethodDeclaration node) {
if (node instanceof InterTypeMethodDeclaration) return visit((InterTypeMethodDeclaration)node);
if (node.isConstructor()){
b.append("(constructor");
} else {

読み込み中…
キャンセル
保存