summaryrefslogtreecommitdiffstats
path: root/bcel-builder/testsrc/org/aspectj
diff options
context:
space:
mode:
Diffstat (limited to 'bcel-builder/testsrc/org/aspectj')
-rw-r--r--bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/AllTests.java1
-rw-r--r--bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/MethodAnnotationsTest.java1
-rw-r--r--bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/TypeAnnotationsTest.java35
3 files changed, 36 insertions, 1 deletions
diff --git a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/AllTests.java b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/AllTests.java
index 69d41d6b8..c2a087166 100644
--- a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/AllTests.java
+++ b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/AllTests.java
@@ -48,6 +48,7 @@ public class AllTests {
suite.addTestSuite(AnnotationGenTest.class);
suite.addTestSuite(ParameterAnnotationsTest.class);
suite.addTestSuite(GeneratingAnnotatedClassesTest.class);
+ suite.addTestSuite(TypeAnnotationsTest.class);
//$JUnit-END$
return suite;
}
diff --git a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/MethodAnnotationsTest.java b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/MethodAnnotationsTest.java
index 5740add02..dab8e7cf3 100644
--- a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/MethodAnnotationsTest.java
+++ b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/MethodAnnotationsTest.java
@@ -30,7 +30,6 @@ public class MethodAnnotationsTest extends BcelTestCase {
super.setUp();
}
-
public void testMethodAnnotations() throws ClassNotFoundException {
JavaClass clazz = getClassFromJar("AnnotatedMethods");
diff --git a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/TypeAnnotationsTest.java b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/TypeAnnotationsTest.java
new file mode 100644
index 000000000..88313faf3
--- /dev/null
+++ b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/TypeAnnotationsTest.java
@@ -0,0 +1,35 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial implementation
+ * ******************************************************************/
+
+package org.aspectj.apache.bcel.classfile.tests;
+
+import org.aspectj.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.generic.ClassGen;
+import org.aspectj.apache.bcel.generic.annotation.AnnotationGen;
+
+
+public class TypeAnnotationsTest extends BcelTestCase {
+
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ public void testMarkerAnnotationsOnTypes() throws ClassNotFoundException {
+ JavaClass clazz = getClassFromJar("MarkedType");
+ ClassGen cg = new ClassGen(clazz);
+ AnnotationGen[] annotations = cg.getAnnotations();
+ assertTrue("Should be a MarkerAnnotation and a MarkerAnnotationInvisible - but found: "+annotations.length,annotations.length==2);
+ }
+
+
+}