]> source.dussan.org Git - aspectj.git/commitdiff
258653: test and fix
authoraclement <aclement>
Fri, 12 Dec 2008 17:13:01 +0000 (17:13 +0000)
committeraclement <aclement>
Fri, 12 Dec 2008 17:13:01 +0000 (17:13 +0000)
tests/bugs163/pr258653/staticinit.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
tests/src/org/aspectj/systemtest/ajc163/ajc163.xml

diff --git a/tests/bugs163/pr258653/staticinit.java b/tests/bugs163/pr258653/staticinit.java
new file mode 100644 (file)
index 0000000..4d45ebe
--- /dev/null
@@ -0,0 +1,19 @@
+import org.aspectj.lang.annotation.After;
+import org.aspectj.lang.annotation.Aspect;
+
+@Aspect
+class staticinit {
+       @After("staticinitialization(MyType)")
+       public void print(){
+               System.out.println("INITIALIZED");              
+       }
+}
+
+//public
+class MyType {
+       public static void main(){
+               new MyType();
+       }
+}
+
+
index 82bc47c822335fa597898fe953859e1cbf738bc4..0ad817a72f268a06193fd6eee4b117931b33ec74 100644 (file)
@@ -27,9 +27,13 @@ import org.aspectj.testing.Utils;
 import org.aspectj.testing.XMLBasedAjcTestCase;
 
 public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
-//     public void testGenericMethodBridging_pr251326() {
-//             runTest("itd anonymous inner class in wrong package");
-//     }
+       // public void testGenericMethodBridging_pr251326() {
+       // runTest("itd anonymous inner class in wrong package");
+       // }
+
+       public void testGetNode_pr258653() {
+               runTest("getNode");
+       }
 
        public void testAtTargetPlus_pr255856() {
                runTest("attarget with plus");
index bdeaeeb0103638193304dbcb89ad56e05b49bef5..9a3ee182daa5bd52a65536b6f290abf569873803 100644 (file)
@@ -1,6 +1,10 @@
 <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
 
 <suite>
+    
+    <ajc-test dir="bugs163/pr258653" title="getNode">
+         <compile files="staticinit.java" options="-1.5 -emacssym"/>
+    </ajc-test>
 
     <ajc-test dir="bugs163/pr154427" title="getMethod returning null">
          <compile files="AuthorizationImpl.java Authorization.java AuthorizationAdmin.java CallAndMethodSignatureAspect.java CallTest.java" options=""/>