aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2010-03-22 19:16:34 +0000
committeraclement <aclement>2010-03-22 19:16:34 +0000
commitb95d3f555fc067c62ba763d6d891061e9caa653b (patch)
treebcd84095a87fab076730a79b84766c4ff18f9291 /tests
parent7579d32b26596d041cf58c29203a40fe74aa716f (diff)
downloadaspectj-b95d3f555fc067c62ba763d6d891061e9caa653b.tar.gz
aspectj-b95d3f555fc067c62ba763d6d891061e9caa653b.zip
292262: testcode
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs169/pr292262/A.java11
-rw-r--r--tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc169/ajc169.xml6
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/bugs169/pr292262/A.java b/tests/bugs169/pr292262/A.java
new file mode 100644
index 000000000..4c7b1fd47
--- /dev/null
+++ b/tests/bugs169/pr292262/A.java
@@ -0,0 +1,11 @@
+package pkg;
+
+public class A {
+
+}
+
+aspect X {
+ declare warning: staticinitialization(*) && if(!thisEnclosingJoinPoint.toString().equals("abc")): "Foobar {joinpoint}";
+ // before(): staticinitialization(*) && if(!thisEnclosingJoinPointStaticPart.getPackage().equals(thisJoinPoint.getPackage())) {}
+ //declare warning: staticinitialization(*) && if(true): "Foobar {joinpoint}";
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
index bf5bbfcdf..640a2b56a 100644
--- a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
@@ -18,6 +18,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ //public void testStaticallyAnalyzableIf_292262_1() {
+ // runTest("if with statically recognizable code");
+ //}
+
public void testTypePatternCategories_44365_Class() {
runTest("type category type patterns - class");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
index 308b273b7..caf0e8ec3 100644
--- a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
+++ b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
@@ -2,6 +2,12 @@
<suite>
+ <ajc-test dir="bugs169/pr292262" title="if with statically recognizable code">
+ <compile files="A.java">
+ <message kind="weave" text="Join point 'staticinitialization(void SimpleClass.&lt;clinit&gt;())' in Type 'SimpleClass'"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs169/pr44365" title="type category type patterns - class">
<compile files="SimpleClass.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Join point 'staticinitialization(void SimpleClass.&lt;clinit&gt;())' in Type 'SimpleClass'"/>