From: mwebster Date: Mon, 10 Jul 2006 15:31:16 +0000 (+0000) Subject: Testcases for Bug 149322 "Change Xlint cantFindType default to warning" X-Git-Tag: PRE_PIPELINE~49 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c38a878e00f5fa4bb51ec68d9cb4c292402aa14e;p=aspectj.git Testcases for Bug 149322 "Change Xlint cantFindType default to warning" --- diff --git a/tests/bugs153/pr149322/Aspect.aj b/tests/bugs153/pr149322/Aspect.aj deleted file mode 100644 index 80b75e925..000000000 --- a/tests/bugs153/pr149322/Aspect.aj +++ /dev/null @@ -1,7 +0,0 @@ - -public aspect Aspect { - - before () : call(public * method(..)) && target(Interface) { - System.out.println("Aspect.before()"); - } -} diff --git a/tests/bugs153/pr149322/Aspect1.aj b/tests/bugs153/pr149322/Aspect1.aj new file mode 100644 index 000000000..13788d27b --- /dev/null +++ b/tests/bugs153/pr149322/Aspect1.aj @@ -0,0 +1,6 @@ +public aspect Aspect1 { + + before () : call(public * interfaceMethod(..)) && target(Interface) { + System.out.println("Aspect1.before() " + thisJoinPoint.getSignature().getName()); + } +} diff --git a/tests/bugs153/pr149322/Aspect2.aj b/tests/bugs153/pr149322/Aspect2.aj new file mode 100644 index 000000000..48a482c87 --- /dev/null +++ b/tests/bugs153/pr149322/Aspect2.aj @@ -0,0 +1,6 @@ +public aspect Aspect2 { + + before () : call(public * Interface.interfaceMethod(..)) { + System.out.println("Aspect2.before() " + thisJoinPoint.getSignature().getName()); + } +} diff --git a/tests/bugs153/pr149322/Aspect3.aj b/tests/bugs153/pr149322/Aspect3.aj new file mode 100644 index 000000000..c7a2383e8 --- /dev/null +++ b/tests/bugs153/pr149322/Aspect3.aj @@ -0,0 +1,6 @@ +public aspect Aspect3 { + + before () : call(public * Interface.*(..)) { + System.out.println("Aspect3.before() " + thisJoinPoint.getSignature().getName()); + } +} diff --git a/tests/bugs153/pr149322/Interface.java b/tests/bugs153/pr149322/Interface.java index 8b6b247f0..c2fb7773a 100644 --- a/tests/bugs153/pr149322/Interface.java +++ b/tests/bugs153/pr149322/Interface.java @@ -1,5 +1,5 @@ public interface Interface { - public void method (); + public void interfaceMethod (); } diff --git a/tests/bugs153/pr149322/Missing.java b/tests/bugs153/pr149322/Missing.java index 51d8dc42e..f70afe09d 100644 --- a/tests/bugs153/pr149322/Missing.java +++ b/tests/bugs153/pr149322/Missing.java @@ -1,8 +1,12 @@ public class Missing implements Interface { + + public void interfaceMethod () { + System.out.println("Missing.interfaceMethod()"); + } - public void method () { - System.out.println("Missing.method()"); + public void missingMethod () { + System.out.println("Missing.missingMethod()"); } } diff --git a/tests/bugs153/pr149322/TestFail.java b/tests/bugs153/pr149322/TestFail.java deleted file mode 100644 index 549a48b3b..000000000 --- a/tests/bugs153/pr149322/TestFail.java +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index c7430339d..000000000 --- a/tests/bugs153/pr149322/TestPass.java +++ /dev/null @@ -1,13 +0,0 @@ - -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/TestWithMissing.java b/tests/bugs153/pr149322/TestWithMissing.java new file mode 100644 index 000000000..4f2e9d63f --- /dev/null +++ b/tests/bugs153/pr149322/TestWithMissing.java @@ -0,0 +1,15 @@ +public class TestWithMissing { + + public void invoke () { + Interface i = new Missing(); + i.interfaceMethod(); + Missing m = new Missing(); + m.interfaceMethod(); + m.missingMethod(); + } + + public static void main(String[] args) { + new TestWithMissing().invoke(); + } + +} diff --git a/tests/bugs153/pr149322/aop.xml b/tests/bugs153/pr149322/aop.xml deleted file mode 100644 index ec0fcfb8b..000000000 --- a/tests/bugs153/pr149322/aop.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ 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 ead8d9d77..1fced4c80 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -38,7 +38,9 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testAdviceNotWovenAspectPath_pr147841() { runTest("advice not woven on aspectpath");} public void testGenericSignatures_pr148409() { runTest("generic signature problem"); } // public void testBrokenIfArgsCflowAtAj_pr145018() { runTest("ataj crashing with cflow, if and args");} - public void testCantFindType_pr149322_1() {runTest("can't find type on interface call");} + public void testCantFindType_pr149322_01() {runTest("can't find type on interface call 1");} + public void testCantFindType_pr149322_02() {runTest("can't find type on interface call 2");} + public void testCantFindType_pr149322_03() {runTest("can't find type on interface call 3");} ///////////////////////////////////////// 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 42657d656..0181bd597 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -111,30 +111,88 @@ - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + \ No newline at end of file