diff options
Diffstat (limited to 'bcel-builder/testsrc')
-rw-r--r-- | bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java index 129dbddbe..494bc1239 100644 --- a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java +++ b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java @@ -30,6 +30,8 @@ import org.aspectj.apache.bcel.classfile.annotation.ElementValue; import org.aspectj.apache.bcel.classfile.annotation.EnumElementValue; import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue; import org.aspectj.apache.bcel.classfile.annotation.RuntimeVisibleAnnotations; +import org.aspectj.apache.bcel.generic.ClassGen; +import org.aspectj.apache.bcel.generic.annotation.AnnotationGen; import org.aspectj.apache.bcel.util.SyntheticRepository; @@ -227,6 +229,15 @@ public class RuntimeVisibleAnnotationAttributeTest extends BcelTestCase { verifyClassAnnotation(clazz); } + public void testAnnotationClassElementCopying() throws ClassNotFoundException { + SyntheticRepository repos = createRepos("testcode.jar"); + JavaClass clazz = repos.loadClass("AnnotatedWithClassClass"); + Annotation[] anns = clazz.getAnnotations(); + ClassGen cg = new ClassGen(clazz); + // Checks we can copy class values in an annotation + new AnnotationGen(anns[0],cg.getConstantPool()); + } + public void testAnnotationClassElementReadWrite() throws ClassNotFoundException,IOException { SyntheticRepository repos = createRepos("testcode.jar"); JavaClass clazz = repos.loadClass("AnnotatedWithClassClass"); |