]> source.dussan.org Git - aspectj.git/commitdiff
336471: makeEJSP
authoraclement <aclement>
Tue, 8 Feb 2011 16:22:42 +0000 (16:22 +0000)
committeraclement <aclement>
Tue, 8 Feb 2011 16:22:42 +0000 (16:22 +0000)
tests/bugs1611/pr336471/Tester.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc1611/Ajc1611Tests.java
tests/src/org/aspectj/systemtest/ajc1611/ajc1611.xml

diff --git a/tests/bugs1611/pr336471/Tester.aj b/tests/bugs1611/pr336471/Tester.aj
new file mode 100644 (file)
index 0000000..4603a4d
--- /dev/null
@@ -0,0 +1,25 @@
+
+aspect Tester {
+       before(): call(* Foo.*(..)) {
+               System.out.println(thisEnclosingJoinPointStaticPart);
+       }
+       public static void main(String[] args) {
+               new Foo().run();
+       }
+}
+
+class Foo {
+       int i = 5;
+       public void run() {
+               bar("abc");
+       }
+       
+       public void bar(String s) {
+               System.out.println("hello");
+               i = 4;
+       }
+}
+
+class MyException extends Exception {
+       
+}
index 064220b4672762324ecffd79d2659621f0cd9db0..5c8149090d94564969098533f7bf748ad9ec23f1 100644 (file)
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Ajc1611Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testESJP_336471() {
+               runTest("esjp");
+       }
+
        public void testITIT_336136() {
                runTest("itit");
        }
index 97c68923fd922d6a54e705c4387d3aa4bfa40049..c5c51012b43535a5f989ffc40aa3c88d4f88426d 100644 (file)
@@ -2,6 +2,17 @@
 
 <suite>
 
+  <ajc-test dir="bugs1611/pr336471" title="esjp">
+       <compile files="Tester.aj" options="-1.5 -Xset:targetRuntime1_6_10=true"/>
+       <run class="Tester">
+               <stdout>
+                       <line text="execution(void Tester.main(String[]))"/>
+                       <line text="execution(void Foo.run())"/>
+                       <line text="hello"/>
+               </stdout>
+       </run>
+  </ajc-test>
+  
   <ajc-test dir="bugs1611/pr336136" title="itit">
     <compile files="Country_Roo_Op4j.java">
     <message kind="error" text="The import com.foo cannot be resolved" line="1"/>