]> source.dussan.org Git - aspectj.git/commitdiff
359159
authoraclement <aclement>
Wed, 28 Sep 2011 01:16:10 +0000 (01:16 +0000)
committeraclement <aclement>
Wed, 28 Sep 2011 01:16:10 +0000 (01:16 +0000)
tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
tests/src/org/aspectj/systemtest/tracing/tracing.xml

index 2e6ed3ecc7645deba1bafe3c0300219839133745..5b04210f0f4f415f927d10dab626bea53949ecb5 100644 (file)
@@ -36,6 +36,69 @@ public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        // runTest("itd split compilation");
        // }
 
+       public void testXmlDefs() {
+               runTest("xml defined advice");
+       }
+
+       public void testXmlDefs2() {
+               runTest("xml defined advice 2");
+       }
+
+       // using a parameter
+       public void testXmlDefs3() {
+               runTest("xml defined advice 3");
+       }
+
+       // using bad parameters
+       public void testXmlDefs4() {
+               runTest("xml defined advice 4");
+       }
+
+       // binding
+       public void testXmlDefs5() {
+               runTest("xml defined advice 5");
+       }
+
+       // before and after advice
+       public void testXmlDefs6() {
+               runTest("xml defined advice 6");
+       }
+
+       // thisJoinPoint
+       public void testXmlDefs7() {
+               runTest("xml defined advice 7");
+       }
+
+       // thisJoinPointStaticPart
+       public void testXmlDefs8() {
+               runTest("xml defined advice 8");
+       }
+
+       // void around advice
+       public void testXmlDefs9() {
+               runTest("xml defined advice 9");
+       }
+
+       // non-void around advice
+       public void testXmlDefs10() {
+               runTest("xml defined advice 10");
+       }
+
+       // non-void around advice with proceed
+       public void testXmlDefs11() {
+               runTest("xml defined advice 11");
+       }
+
+       // non primitive return (that is actually used) and proceed
+       public void testXmlDefs12() {
+               runTest("xml defined advice 12");
+       }
+
+       // delegate type in package
+       public void testXmlDefs13() {
+               runTest("xml defined advice 13");
+       }
+
        public void testCorrespondingType_357582() {
                for (int i = 0; i < 100000; i++) {
                        assertEquals("AAA", convert("AAA"));
index f37b8834eadd57a178c7e361f9958beaebb0b13d..fd57e555d9a394bb47eb1418e30895156c503139 100644 (file)
@@ -2,6 +2,173 @@
 
 <suite>
 
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice">
+     <compile files="Hello.java JavaHelper.java"/>
+     <run class="Hello" ltw="aop.xml">
+       <stdout>
+           <line text="Hello"/>
+           <line text="in advice"/>
+           <line text="World"/>
+       </stdout>
+     </run>
+   </ajc-test>
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 2">
+     <compile files="Hello.java JavaHelper.java"/>
+     <run class="Hello" ltw="aop2.xml">
+       <stdout>
+           <line text="Hello"/>
+           <line text="World"/>
+       </stdout>
+       <stderr>
+       <line text="info AspectJ Weaver"/>
+       <line text="info register classloader"/>
+       <line text="info using config"/>
+       <line text="info define aspect"/>
+       <line text="error Class to invoke cannot be found: 'com.DoesNotExist'"/>
+       <line text="info weaver operating"/>
+       </stderr>
+     </run>
+   </ajc-test>
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 3">
+     <compile files="Hello.java JavaHelper.java"/>
+     <run class="Hello" ltw="aop3.xml">
+       <stdout>
+           <line text="Hello"/>
+           <line text="World"/>
+       </stdout>
+       <stderr>
+       <line text="info AspectJ Weaver"/>
+       <line text="info register classloader"/>
+       <line text="info using config"/>
+       <line text="info define aspect"/>
+       <line text="error Cannot find type specified as parameter: 'String' from signature '(String)'"/>
+       <line text="info weaver operating"/>
+       </stderr>
+     </run>
+   </ajc-test>
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 4">
+     <compile files="Hello.java JavaHelper.java"/>
+     <run class="Hello" ltw="aop4.xml">
+       <stdout>
+           <line text="Hello"/>
+           <line text="World"/>
+       </stdout>
+       <stderr>
+       <line text="info AspectJ Weaver"/>
+       <line text="info register classloader"/>
+       <line text="info using config"/>
+       <line text="info define aspect"/>
+       <line text="error Cannot find type specified as parameter: 'java.lang.String:List' from signature '(java.lang.String:List)'"/>
+       <line text="info weaver operating"/>
+       </stderr>
+     </run>
+   </ajc-test>
+   
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 5">
+     <compile files="Hello2.java JavaHelper.java"/>
+     <run class="Hello2" ltw="aop5.xml">
+       <stdout>
+           <line text="hello"/>
+           <line text="in advice: s=world"/>
+           <line text="world"/>
+       </stdout>
+     </run>
+   </ajc-test>
+   
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 6">
+     <compile files="Hello2.java JavaHelper.java"/>
+     <run class="Hello2" ltw="aop6.xml">
+       <stdout>
+           <line text="hello"/>
+           <line text="in advice: s=world"/>
+           <line text="world"/>
+           <line text="in advice3: s=world"/>
+       </stdout>
+     </run>
+   </ajc-test>
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 7">
+     <compile files="Hello2.java JavaHelper.java"/>
+     <run class="Hello2" ltw="aop7.xml">
+       <stdout>
+           <line text="hello"/>
+           <line text="in advice4: s=world at execution(int Hello2.say2(String))"/>
+           <line text="world"/>
+           <line text="in advice5: s=world at execution(int Hello2.say2(String))"/>
+       </stdout>
+     </run>
+   </ajc-test>
+
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 8">
+     <compile files="Hello2.java JavaHelper.java"/>
+     <run class="Hello2" ltw="aop8.xml">
+       <stdout>
+           <line text="hello"/>
+           <line text="in advice6: s=world at execution(int Hello2.say2(String))"/>
+           <line text="world"/>
+           <line text="in advice7: s=world at execution(int Hello2.say2(String))"/>
+       </stdout>
+     </run>
+   </ajc-test>
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 9">
+     <compile files="Hello2.java JavaHelper.java"/>
+     <run class="Hello2" ltw="aop9.xml">
+       <stdout>
+           <line text="in around advice: s=hello at execution(void Hello2.say1(String))"/>
+       </stdout>
+     </run>
+   </ajc-test>
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 10">
+     <compile files="Hello2.java JavaHelper.java"/>
+     <run class="Hello2" ltw="aop10.xml">
+       <stdout>
+           <line text="hello"/>
+           <line text="in around2 advice: s=world at execution(int Hello2.say2(String))"/>
+       </stdout>
+     </run>
+   </ajc-test>
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 11">
+     <compile files="Hello2.java JavaHelper.java"/>
+     <run class="Hello2" ltw="aop11.xml">
+       <stdout>
+           <line text="hello"/>
+           <line text="abcde"/>
+       </stdout>
+     </run>
+   </ajc-test>
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 12">
+     <compile files="Hello3.java JavaHelper.java"/>
+     <run class="Hello3" ltw="aop12.xml">
+       <stdout>
+           <line text="hello"/>
+           <line text="around4 running"/>
+           <line text="abcde"/>
+           <line text="from say2=xyz"/>
+       </stdout>
+     </run>
+   </ajc-test>
+   
+ <ajc-test dir="bugs1612/xmldefs" title="xml defined advice 13">
+     <compile files="Hello2.java JavaHelper2.java"/>
+     <run class="Hello2" ltw="aop13.xml">
+       <stdout>
+           <line text="in advice"/>
+           <line text="hello"/>
+           <line text="in advice"/>
+           <line text="world"/>
+       </stdout>
+     </run>
+   </ajc-test>
+
 <ajc-test dir="bugs1612/pr354470" title="perthis too pervasive">
 <compile files="Code.java" options="-1.5"/>
 <run class="Code">
index 122dbe28ac97ff9715f797fd8384c7103ab9292e..42b61823cdcbeedb093a7a3bf7457aa052cbee13 100644 (file)
@@ -51,8 +51,8 @@
                        <line text="warning aspect ExcludedAspect exluded"/>
                        <line text="warning aspect ExcludedAspect exluded"/>
                        <line text="info define aspect IncludedMissingAspect"/>
-                       <line text="error Cannot find m_parent aspect"/>
-                       <line text="error Cannot find m_parent aspect"/>
+                       <line text="error Cannot find parent aspect"/>
+                       <line text="error Cannot find parent aspect"/>
                        <line text="error Concrete-aspect 'IncludedMissingAspect' could not be registered"/>
                        <line text="error Concrete-aspect 'IncludedMissingAspect' could not be registered"/>
                        <line text="warning failure(s) registering aspects. Disabling weaver for class loader"/>