]> source.dussan.org Git - aspectj.git/commitdiff
tests for pr84260: static imports
authoraclement <aclement>
Wed, 8 Jun 2005 10:48:50 +0000 (10:48 +0000)
committeraclement <aclement>
Wed, 8 Jun 2005 10:48:50 +0000 (10:48 +0000)
tests/bugs150/pr84260/A.java [new file with mode: 0644]
tests/bugs150/pr84260/I1.java [new file with mode: 0644]
tests/bugs150/pr84260/I2.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml

diff --git a/tests/bugs150/pr84260/A.java b/tests/bugs150/pr84260/A.java
new file mode 100644 (file)
index 0000000..32062ff
--- /dev/null
@@ -0,0 +1,6 @@
+package a.b.c;
+
+public class A {
+
+  public static void m() {System.err.println("static method running");}
+}
diff --git a/tests/bugs150/pr84260/I1.java b/tests/bugs150/pr84260/I1.java
new file mode 100644 (file)
index 0000000..5ddcac9
--- /dev/null
@@ -0,0 +1,6 @@
+import static a.b.c.A.m;
+public class I1 {
+  public static void main(String []argv) {
+    m();
+  }
+}
diff --git a/tests/bugs150/pr84260/I2.java b/tests/bugs150/pr84260/I2.java
new file mode 100644 (file)
index 0000000..6e36b2d
--- /dev/null
@@ -0,0 +1,9 @@
+import static a.b.c.A.*;
+
+public class I2 {
+
+  public static void main(String []argv) {
+    m();
+  }
+
+}
index 7ee575f190aa7677ae7a18908292e19595b0fa0e..5e27fc0a3f9aaa6fba8df50a52784a630729605f 100644 (file)
@@ -178,6 +178,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
          runTest("NPE in reflect implementation");
   }
   
+  public void testStaticImports_pr84260() {
+         runTest("static import failures");
+  } 
+  
   // helper methods.....
   
   public SyntheticRepository createRepos(File cpentry) {
index 863c39daed18e3b37153d15cffd08033be601e32..41b2a77806dbb3ed93b99463e359321eee5bbbdb 100644 (file)
         </compile>
     </ajc-test>
     
+    <ajc-test dir="bugs150/pr84260" vm="1.5" title="static import failures">
+        <compile files="A.java,I1.java,I2.java" options="-1.5"/>
+        <run class="I1">
+          <stderr>
+            <line text="static method running"/>
+          </stderr>
+        </run>
+        <run class="I2">
+          <stderr>
+            <line text="static method running"/>
+          </stderr>
+        </run>
+    </ajc-test>
+    
     <ajc-test dir="decp" pr="80249" title="Order of types passed to compiler determines weaving behavior">
         <compile files="A.java,B.java,AspectX.java"/>
         <run class="B"/>