From: aclement Date: Thu, 31 Jul 2008 19:17:00 +0000 (+0000) Subject: 238992: test and fix: string anno values X-Git-Tag: V162DEV_M1~154 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=34bdf6532e15767c950f15108e1ed3c39a1caae3;p=aspectj.git 238992: test and fix: string anno values --- diff --git a/tests/bugs162/pr238992/Foo5.java b/tests/bugs162/pr238992/Foo5.java new file mode 100644 index 000000000..78a5d51fb --- /dev/null +++ b/tests/bugs162/pr238992/Foo5.java @@ -0,0 +1,36 @@ +import java.lang.annotation.*; +import java.io.*; + +@Entity(s="xxx") +public class Foo5 { + public static void main(String []argv) { + Foo5 f = new Foo5(); + Goo g = new Goo(); + if (f instanceof Serializable) { + throw new RuntimeException("Foo5 should not implement it"); + } + if (!(g instanceof Serializable)) { + throw new RuntimeException("Goo should implement it"); + } + if (!(new Hoo() instanceof Serializable)) { + throw new RuntimeException("Hoo should implement it"); + } + } +} + +@Entity(s="yyy") +class Goo { +} + +@Entity // default is "yyy" +class Hoo { +} + +@Retention(RetentionPolicy.RUNTIME) +@interface Entity { + String s() default "yyy"; +} + +aspect X { + declare parents: (@Entity(s="yyy") *) implements java.io.Serializable; +} diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java index 6fd46344a..1b278cb6c 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java @@ -23,10 +23,11 @@ public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testParamAnnoInner_pr241861() { runTest("param annotation inner class"); } public void testAnnotationDecp_pr239441() { runTest("annotation decp"); } public void testAtAspectJPerTarget_pr198181() { runTest("ataspectj ltw pertarget"); } -// public void testAnnotationValueDecp_pr238992() { runTest("annotation value decp"); } -// public void testAnnotationValueDecp_pr238992_2() { runTest("annotation value decp - 2"); } -// public void testAnnotationValueDecp_pr238992_3() { runTest("annotation value decp - 3"); } -// public void testAnnotationValueDecp_pr238992_4() { runTest("annotation value decp - 4"); } + public void testAnnotationValueDecp_pr238992() { runTest("annotation value decp"); } + public void testAnnotationValueDecp_pr238992_2() { runTest("annotation value decp - 2"); } + public void testAnnotationValueDecp_pr238992_3() { runTest("annotation value decp - 3"); } + public void testAnnotationValueDecp_pr238992_4() { runTest("annotation value decp - 4"); } + public void testAnnotationValueDecp_pr238992_5() { runTest("annotation value decp - 5"); } /* * test plan diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml index d0ce9c69d..dc9d4bf8c 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml +++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml @@ -50,6 +50,14 @@ + + + + + + + +