Browse Source

tests for pr153572

tags/V_1_5_2a
acolyer 17 years ago
parent
commit
fd3a8eca25

+ 4
- 0
tests/bugs153/pr153572/Annotated.java View File

@@ -0,0 +1,4 @@
@Configurable
public class Annotated {
}

+ 8
- 0
tests/bugs153/pr153572/AnnotationMatcher.aj View File

@@ -0,0 +1,8 @@
public aspect AnnotationMatcher {
after() returning : initialization(*.new(..)) && @this(Configurable) {
System.out.println("annotated type initialized");
}
}

+ 6
- 0
tests/bugs153/pr153572/Configurable.java View File

@@ -0,0 +1,6 @@
import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
public @interface Configurable {
}

+ 7
- 0
tests/bugs153/pr153572/Main.java View File

@@ -0,0 +1,7 @@
public class Main {
public static void main(String[] args) {
new Annotated();
}
}

+ 2
- 1
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java View File

@@ -62,7 +62,8 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
}
public void testMatchVolatileField_pr150671() {runTest("match volatile field");};
public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");};

public void testLTWWorldWithAnnotationMatching_pr153572() { runTest("LTWWorld with annotation matching");}
/////////////////////////////////////////
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);

+ 14
- 0
tests/src/org/aspectj/systemtest/ajc153/ajc153.xml View File

@@ -291,4 +291,18 @@
<compile files="EMA.java" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs153/pr153572" title="LTWWorld with annotation matching">
<compile
files="Configurable.java, AnnotationMatcher.aj"
options="-1.5"
outjar="aspectlib.jar"
outxmlfile="META-INF/aop.xml"/>
<compile files="Configurable.java,Annotated.java,Main.java" options="-1.5" outjar="myapp.jar"/>
<run class="Main" ltw="">
<stdout>
<line text="annotated type initialized"/>
</stdout>
</run>
</ajc-test>
</suite>

Loading…
Cancel
Save