From: mwebster Date: Fri, 7 Jul 2006 13:42:43 +0000 (+0000) Subject: Testcase for Bug 149322 "Change Xlint cantFindType default to warning" X-Git-Tag: PRE_PIPELINE~55 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5c20db9edf8ecda77db8ad56288f615b11db1385;p=aspectj.git Testcase for Bug 149322 "Change Xlint cantFindType default to warning" --- 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 @@ + + + + + + \ 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 @@ + + + + + + + + + + + + \ No newline at end of file