]> source.dussan.org Git - aspectj.git/commitdiff
171042: test and fix
authoraclement <aclement>
Tue, 2 Dec 2008 22:29:49 +0000 (22:29 +0000)
committeraclement <aclement>
Tue, 2 Dec 2008 22:29:49 +0000 (22:29 +0000)
tests/bugs163/pr171042/Executable.java [new file with mode: 0644]
tests/bugs163/pr171042/RunnableAspect.java [new file with mode: 0644]
tests/bugs163/pr171042/TestClass.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/pr171042/Executable.java b/tests/bugs163/pr171042/Executable.java
new file mode 100644 (file)
index 0000000..79fa991
--- /dev/null
@@ -0,0 +1,6 @@
+package test;
+
+public interface Executable {
+
+               void execute();
+}
diff --git a/tests/bugs163/pr171042/RunnableAspect.java b/tests/bugs163/pr171042/RunnableAspect.java
new file mode 100644 (file)
index 0000000..ad172b0
--- /dev/null
@@ -0,0 +1,7 @@
+package test;
+
+public aspect RunnableAspect {
+   public void Executable.run() { execute(); }
+   declare parents: Executable implements Runnable;
+}
+
diff --git a/tests/bugs163/pr171042/TestClass.java b/tests/bugs163/pr171042/TestClass.java
new file mode 100644 (file)
index 0000000..645af79
--- /dev/null
@@ -0,0 +1,13 @@
+package test;
+
+public class TestClass {
+
+  public static void main(String[] args) {
+                Executable executable = new Executable() {
+                       public void execute() {
+
+                       }
+                };
+  }
+}
+
index ade3cc8548826113c485f98353f07b11c3b13301..87ac9b321802363a685887dad4184345b158b93e 100644 (file)
@@ -32,18 +32,20 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                runTest("getMethod returning null");
        }
 
+       public void testItdOnAnonInner_pr171042() {
+               runTest("itd on anonymous inner");
+       }
+
        public void testMixedStyles_pr213751() {
                runTest("mixed styles");
        }
-/*
-       public void testHandles_pr249216c24() {
-               runTest("handles - escaped square brackets");
-               IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy();
-               IProgramElement itd = findElementAtLine(top.getRoot(), 4);
-               // System.out.println(itd.getHandleIdentifier());
-               assertEquals("<{Handles.java}Handles)Ship.i)\\[\\[String;>;", itd.getHandleIdentifier());
-       }
-*/
+
+       /*
+        * public void testHandles_pr249216c24() { runTest("handles - escaped square brackets"); IHierarchy top =
+        * AsmManager.lastActiveStructureModel.getHierarchy(); IProgramElement itd = findElementAtLine(top.getRoot(), 4); //
+        * System.out.println(itd.getHandleIdentifier()); assertEquals("<{Handles.java}Handles)Ship.i)\\[\\[String;>;",
+        * itd.getHandleIdentifier()); }
+        */
        public void testFQType_pr256937() {
                runTest("fully qualified return type");
                IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy();
index 59cff54300d2eb9bb41cde8c8503a6729c11e0a5..b5eb129323f65b5029e5350a06cac3504934cd93 100644 (file)
          <compile files="Handles.java" options="-emacssym -1.5"/>
     </ajc-test>
     
+    <ajc-test dir="bugs163/pr171042" title="itd on anonymous inner">
+         <compile files="TestClass.java Executable.java RunnableAspect.java" options=""/>
+    </ajc-test>
+    
     <ajc-test dir="bugs163/pr254207" title="ordering issue">
       <compile files="Abstract.java Concrete.java" options="-1.5 -proceedOnError -Xset:pipelineCompilation=false">
         <message kind="error" line="1" text="Bound mismatch"/>