summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authormwebster <mwebster>2006-07-07 13:42:43 +0000
committermwebster <mwebster>2006-07-07 13:42:43 +0000
commit5c20db9edf8ecda77db8ad56288f615b11db1385 (patch)
tree7d606e7bd910e34394b59b2b1a0df158ad669667 /tests
parent58bbbe871e85fa2dfc92587b0715e0b04dab190c (diff)
downloadaspectj-5c20db9edf8ecda77db8ad56288f615b11db1385.tar.gz
aspectj-5c20db9edf8ecda77db8ad56288f615b11db1385.zip
Testcase for Bug 149322 "Change Xlint cantFindType default to warning"
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs153/pr149322/Aspect.aj7
-rw-r--r--tests/bugs153/pr149322/Interface.java5
-rw-r--r--tests/bugs153/pr149322/Missing.java8
-rw-r--r--tests/bugs153/pr149322/TestFail.java14
-rw-r--r--tests/bugs153/pr149322/TestPass.java13
-rw-r--r--tests/bugs153/pr149322/aop.xml6
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/ajc153.xml26
8 files changed, 83 insertions, 0 deletions
diff --git a/tests/bugs153/pr149322/Aspect.aj b/tests/bugs153/pr149322/Aspect.aj
new file mode 100644
index 000000000..80b75e925
--- /dev/null
+++ b/tests/bugs153/pr149322/Aspect.aj
@@ -0,0 +1,7 @@
+
+public aspect Aspect {
+
+ before () : call(public * method(..)) && target(Interface) {
+ System.out.println("Aspect.before()");
+ }
+}
diff --git a/tests/bugs153/pr149322/Interface.java b/tests/bugs153/pr149322/Interface.java
new file mode 100644
index 000000000..8b6b247f0
--- /dev/null
+++ b/tests/bugs153/pr149322/Interface.java
@@ -0,0 +1,5 @@
+
+public interface Interface {
+
+ public void method ();
+}
diff --git a/tests/bugs153/pr149322/Missing.java b/tests/bugs153/pr149322/Missing.java
new file mode 100644
index 000000000..51d8dc42e
--- /dev/null
+++ b/tests/bugs153/pr149322/Missing.java
@@ -0,0 +1,8 @@
+
+public class Missing implements Interface {
+
+ public void method () {
+ System.out.println("Missing.method()");
+ }
+
+}
diff --git a/tests/bugs153/pr149322/TestFail.java b/tests/bugs153/pr149322/TestFail.java
new file mode 100644
index 000000000..549a48b3b
--- /dev/null
+++ b/tests/bugs153/pr149322/TestFail.java
@@ -0,0 +1,14 @@
+public class TestFail {
+
+ public void invoke () {
+ Interface i = new Missing();
+ i.method();
+ Missing cf = new Missing();
+ cf.method();
+ }
+
+ public static void main(String[] args) {
+ new TestFail().invoke();
+ }
+
+}
diff --git a/tests/bugs153/pr149322/TestPass.java b/tests/bugs153/pr149322/TestPass.java
new file mode 100644
index 000000000..c7430339d
--- /dev/null
+++ b/tests/bugs153/pr149322/TestPass.java
@@ -0,0 +1,13 @@
+
+public class TestPass {
+
+ public void invoke () {
+ Interface i = new CantFind();
+ i.method();
+ }
+
+ public static void main(String[] args) {
+ new TestFail();
+ }
+
+}
diff --git a/tests/bugs153/pr149322/aop.xml b/tests/bugs153/pr149322/aop.xml
new file mode 100644
index 000000000..ec0fcfb8b
--- /dev/null
+++ b/tests/bugs153/pr149322/aop.xml
@@ -0,0 +1,6 @@
+<aspectj>
+ <aspects>
+ <aspect name="Aspect"/>
+ </aspects>
+ <weaver options="-verbose -showWeaveInfo"/>
+</aspectj> \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
index 6c3b5b0b4..6c844d749 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
@@ -36,6 +36,10 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// public void testVisibilityProblem_pr149071() { runTest("visibility problem");}
// public void testAdviceNotWovenAspectPath_pr147841() { runTest("advice not woven on aspectpath");}
public void testGenericSignatures_pr148409() { runTest("generic signature problem"); }
+
+ public void testCantFindType_pr149322_1() {
+ runTest("can't find type on interface call");
+ }
/////////////////////////////////////////
public static Test suite() {
diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
index 30c4a1a8a..fc8b35470 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
+++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
@@ -98,4 +98,30 @@
</run>
</ajc-test>
+ <ajc-test dir="bugs153/pr149322" title="can't find type on interface call">
+ <compile files="Interface.java"/>
+ <compile
+ files="Missing.java"
+ outjar="missing.jar"
+ />
+ <compile files="TestFail.java" classpath="missing.jar"/>
+<!--
+ <compile files="Aspect.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
+ <message kind="weave" text="void Interface.method()"/>
+ <message kind="weave" text="void Missing.method()"/>
+ </compile>
+ <compile files="Aspect.aj" options="-showWeaveInfo -inpath .">
+ <message kind="weave" text="void Interface.method()"/>
+ <message kind="weave" text="void Missing.method()"/>
+ </compile>
+-->
+ <compile files="Aspect.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
+ <message kind="weave" text="void Interface.method()"/>
+ <message kind="warning" text="Missing"/>
+ </compile>
+<!--
+ <run class="TestFail" ltw="aop.xml"/>
+-->
+ </ajc-test>
+
</suite> \ No newline at end of file