summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2005-06-08 10:48:50 +0000
committeraclement <aclement>2005-06-08 10:48:50 +0000
commitf747b829d02a4b76fc44da2a0eb1940c3e9cd593 (patch)
treedb45b32b96116097737a150736e11abc236eef93
parent36b591b08a5760d6189c9dd467e96f1574be7951 (diff)
downloadaspectj-f747b829d02a4b76fc44da2a0eb1940c3e9cd593.tar.gz
aspectj-f747b829d02a4b76fc44da2a0eb1940c3e9cd593.zip
tests for pr84260: static imports
-rw-r--r--tests/bugs150/pr84260/A.java6
-rw-r--r--tests/bugs150/pr84260/I1.java6
-rw-r--r--tests/bugs150/pr84260/I2.java9
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml14
5 files changed, 39 insertions, 0 deletions
diff --git a/tests/bugs150/pr84260/A.java b/tests/bugs150/pr84260/A.java
new file mode 100644
index 000000000..32062ff34
--- /dev/null
+++ b/tests/bugs150/pr84260/A.java
@@ -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
index 000000000..5ddcac98f
--- /dev/null
+++ b/tests/bugs150/pr84260/I1.java
@@ -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
index 000000000..6e36b2dc7
--- /dev/null
+++ b/tests/bugs150/pr84260/I2.java
@@ -0,0 +1,9 @@
+import static a.b.c.A.*;
+
+public class I2 {
+
+ public static void main(String []argv) {
+ m();
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index 7ee575f19..5e27fc0a3 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -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) {
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 863c39dae..41b2a7780 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -51,6 +51,20 @@
</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"/>