]> source.dussan.org Git - aspectj.git/commitdiff
292262: testcode
authoraclement <aclement>
Mon, 22 Mar 2010 19:16:34 +0000 (19:16 +0000)
committeraclement <aclement>
Mon, 22 Mar 2010 19:16:34 +0000 (19:16 +0000)
tests/bugs169/pr292262/A.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
tests/src/org/aspectj/systemtest/ajc169/ajc169.xml

diff --git a/tests/bugs169/pr292262/A.java b/tests/bugs169/pr292262/A.java
new file mode 100644 (file)
index 0000000..4c7b1fd
--- /dev/null
@@ -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}";
+}
index bf5bbfcdf07cc79724be052c6a0672d134037cd3..640a2b56a173d62d3f194a449534e0ddfac8e60c 100644 (file)
@@ -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");
        }
index 308b273b717e5f96ebf06cb37cbbb9396fa89ede..caf0e8ec33c7e04dc86d77302e6cb261fa37f42c 100644 (file)
@@ -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'"/>