diff options
author | aclement <aclement> | 2006-12-16 16:12:14 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-12-16 16:12:14 +0000 |
commit | 8ee3d8eeae145e60e42eaeb039fc9054d727246e (patch) | |
tree | b9a615060ee2064930d7972553ac45b9f31f2552 /org.aspectj.ajdt.core/testsrc | |
parent | c2abdf7c6f1e64e53632a8873e9c5b26c995aa01 (diff) | |
download | aspectj-8ee3d8eeae145e60e42eaeb039fc9054d727246e.tar.gz aspectj-8ee3d8eeae145e60e42eaeb039fc9054d727246e.zip |
AST contributions: bug 110465
Diffstat (limited to 'org.aspectj.ajdt.core/testsrc')
-rw-r--r-- | org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjNaiveASTFlattenerTest.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjNaiveASTFlattenerTest.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjNaiveASTFlattenerTest.java index 709e2582a..1b1035cfc 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjNaiveASTFlattenerTest.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjNaiveASTFlattenerTest.java @@ -61,6 +61,31 @@ public class AjNaiveASTFlattenerTest extends TestCase { check("public aspect A { pointcut y(int a, double b, Y c): call(* *.*(..));}", "public aspect A {\n pointcut y(int a, double b, Y c):call(* *.*(..));\n}\n"); } + + public void testDeclareParentsDeclaration() throws Exception { + check("public aspect A { declare parents: X extends Y; }", + "public aspect A {\n declare parents: X extends Y;\n}\n"); + } + + public void testDeclareWarning() throws Exception { + check("public aspect A { declare warning: call(* *.*(..)) : \"warning!\"; }", + "public aspect A {\n declare warning: call(* *.*(..)) : \"warning!\" ;\n}\n"); + } + + public void testDeclareErrorDeclaration() throws Exception { + check("public aspect A { declare error: call(* *.*(..)) : \"error!\"; }", + "public aspect A {\n declare error: call(* *.*(..)) : \"error!\" ;\n}\n"); + } + + public void testDeclareSoftDeclaration() throws Exception { + check("public aspect A { declare soft: X : call(* *.*(..)); }", + "public aspect A {\n declare soft: X : call(* *.*(..)) ;\n}\n"); + } + + public void testDeclarePrecedenceDeclaration() throws Exception { + check("public aspect A { declare precedence: X, Y, Z; }", + "public aspect A {\n declare precedence: X, Y, Z;\n}\n"); + } private void check(String source, String expectedOutput) { ASTParser parser = ASTParser.newParser(AST.JLS2); |