From fbf1152676969bf0d877542777291567c287b1e8 Mon Sep 17 00:00:00 2001 From: acolyer Date: Thu, 9 Dec 2004 22:14:27 +0000 Subject: [PATCH] more tests --- .../systemtest/ajc150/AnnotationPointcutsTests.java | 7 +++++++ .../aspectj/systemtest/ajc150/AnnotationRuntimeTests.java | 7 ++++++- tests/src/org/aspectj/systemtest/ajc150/Annotations.java | 7 +++++++ tests/src/org/aspectj/systemtest/ajc150/TestUtils.java | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcutsTests.java b/tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcutsTests.java index 517b300ae..54bc08ffc 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcutsTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcutsTests.java @@ -45,4 +45,11 @@ public class AnnotationPointcutsTests extends TestUtils { expectedWarnings.add(new Message("@annotation matched here")); // L 8 assertMessages(cR, new MessageSpec(expectedWarnings, new ArrayList())); } + + + // TODO extra tests + // 1) @within (matches, does not match, matches inherited annotation) + // 2) @withincode (matches, does not match) + // 3) @annotation on the different join point kinds, matches with inherited annotation + } \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/AnnotationRuntimeTests.java b/tests/src/org/aspectj/systemtest/ajc150/AnnotationRuntimeTests.java index 06b54d483..8b5403bc1 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/AnnotationRuntimeTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/AnnotationRuntimeTests.java @@ -43,6 +43,11 @@ public class AnnotationRuntimeTests extends TestUtils { } public void test003_InheritableOrNot() { - CompilationResult cR = binaryWeave("TestingAnnotations.jar","ThisOrTargetTests.aj",0,0); + CompilationResult cR = binaryWeave("TestingAnnotations.jar","ThisOrTargetTests.aj",0,0); + System.out.println(cR); } + + // TODO extra tests + // run the result of test003 and validate matches (needs 1.5 runtime) + // test inheritable annotation not present on type [should generate runtime test] } diff --git a/tests/src/org/aspectj/systemtest/ajc150/Annotations.java b/tests/src/org/aspectj/systemtest/ajc150/Annotations.java index 7255d427b..3a6e2ee5a 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Annotations.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Annotations.java @@ -53,4 +53,11 @@ public class Annotations extends TestUtils { msg3_field.toString().indexOf("can't make inter-type field declarations")!=-1); verifyWeavingMessagesOutput(cR,new String[]{}); } + + // TODO extra tests: + // declare parents with annotation pattern + // declare soft with annotation pattern + // declare warning with annotation pattern + // declare precedence with annotation pattern + } \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/TestUtils.java b/tests/src/org/aspectj/systemtest/ajc150/TestUtils.java index 768bd4171..b62400c7c 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/TestUtils.java +++ b/tests/src/org/aspectj/systemtest/ajc150/TestUtils.java @@ -29,7 +29,7 @@ public abstract class TestUtils extends AjcTestCase { } protected CompilationResult binaryWeave(String inpath, String insource,int expErrors,int expWarnings,boolean xlinterror) { - return binaryWeave(inpath,insource,expErrors,expWarnings,false,""); + return binaryWeave(inpath,insource,expErrors,expWarnings,xlinterror,""); } protected CompilationResult binaryWeave(String inpath, String insource,int expErrors,int expWarnings,String extraOption) { -- 2.39.5