Browse Source

more tests

tags/Root_AspectJ5_Development
acolyer 19 years ago
parent
commit
fbf1152676

+ 7
- 0
tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcutsTests.java View File

@@ -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
}

+ 6
- 1
tests/src/org/aspectj/systemtest/ajc150/AnnotationRuntimeTests.java View File

@@ -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]
}

+ 7
- 0
tests/src/org/aspectj/systemtest/ajc150/Annotations.java View File

@@ -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
}

+ 1
- 1
tests/src/org/aspectj/systemtest/ajc150/TestUtils.java View File

@@ -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) {

Loading…
Cancel
Save