From 293a0756b25fd1e9c7cd2623d2e28e78aa797f06 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 1 Apr 2011 03:46:11 +0000 Subject: 341446: adjust test structure to avoid inclusion of incorrect (level50) classes in packaged jars --- .../matcher/tools/CommonAdvancedPointcutExpressionTests.java | 8 -------- org.aspectj.matcher/testsrc/testdata/AnnotatedClass.java | 11 +++++++++++ .../testsrc/testdata/MethodLevelAnnotation.java | 5 +++++ org.aspectj.matcher/testsrc/testdata/SomeAnnotation.java | 6 ++++++ 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 org.aspectj.matcher/testsrc/testdata/AnnotatedClass.java create mode 100644 org.aspectj.matcher/testsrc/testdata/MethodLevelAnnotation.java create mode 100644 org.aspectj.matcher/testsrc/testdata/SomeAnnotation.java (limited to 'org.aspectj.matcher/testsrc') diff --git a/org.aspectj.matcher/testsrc/org/aspectj/matcher/tools/CommonAdvancedPointcutExpressionTests.java b/org.aspectj.matcher/testsrc/org/aspectj/matcher/tools/CommonAdvancedPointcutExpressionTests.java index e5fa8b0c0..2d3669748 100644 --- a/org.aspectj.matcher/testsrc/org/aspectj/matcher/tools/CommonAdvancedPointcutExpressionTests.java +++ b/org.aspectj.matcher/testsrc/org/aspectj/matcher/tools/CommonAdvancedPointcutExpressionTests.java @@ -25,14 +25,6 @@ import org.aspectj.weaver.tools.StandardPointcutParser; * * This is based on the Reflection oriented PointcutExpressionTest in the weaver project. * - * TESTDATA. The testdata for these tests is kept in org.aspectj.matcher/testdata. It is a series of .java files that need to be - * compiled and available at runtime. Since they are java5 (they include annotations) they cannot be in a source folder for the - * project, so they are compiled separately and then jar'd into a testdata.jar file in that folder. This folder is defined to be on - * the classpath for org.aspectj.matcher, this enables them to be seen by a simple world that uses the classpath of the matcher - * project as the definition of what it can see. Other worlds, for example JDT World, will need to have those types defined in a - * project that is accessible in the JDT World instance. Because these tests exercise Java5 matching, the concrete ReflectionWorld - * subtype is not defined in here, it is defined in weaver5 (messy, but works well). - * * @author Andy Clement */ public abstract class CommonAdvancedPointcutExpressionTests extends TestCase { diff --git a/org.aspectj.matcher/testsrc/testdata/AnnotatedClass.java b/org.aspectj.matcher/testsrc/testdata/AnnotatedClass.java new file mode 100644 index 000000000..80dbda413 --- /dev/null +++ b/org.aspectj.matcher/testsrc/testdata/AnnotatedClass.java @@ -0,0 +1,11 @@ +package testdata; + +@SomeAnnotation +public class AnnotatedClass { + + @MethodLevelAnnotation + public void annotatedMethod() { } + + public void nonAnnotatedMethod() { + } +} diff --git a/org.aspectj.matcher/testsrc/testdata/MethodLevelAnnotation.java b/org.aspectj.matcher/testsrc/testdata/MethodLevelAnnotation.java new file mode 100644 index 000000000..2f46dd8ab --- /dev/null +++ b/org.aspectj.matcher/testsrc/testdata/MethodLevelAnnotation.java @@ -0,0 +1,5 @@ +package testdata; +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@interface MethodLevelAnnotation {} diff --git a/org.aspectj.matcher/testsrc/testdata/SomeAnnotation.java b/org.aspectj.matcher/testsrc/testdata/SomeAnnotation.java new file mode 100644 index 000000000..25a4991d6 --- /dev/null +++ b/org.aspectj.matcher/testsrc/testdata/SomeAnnotation.java @@ -0,0 +1,6 @@ +package testdata; + +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@interface SomeAnnotation {} -- cgit v1.2.3