blob: a6ce6f6b463296ff7690d562e80cf2ca1dc999c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/*******************************************************************************
* Copyright (c) 2013 Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Andy Clement - initial API and implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc173;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
import org.aspectj.testing.XMLBasedAjcTestCase;
import junit.framework.Test;
/**
* @author Andy Clement
*/
public class Ajc173Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testAddRemoveAnnos_407739() throws Exception {
runTest("add remove annos");
}
// public void testOrdering_407966() throws Exception {
// runTest("ordering");
// }
//
// public void testInnerInterfaceMixin_408014() throws Exception {
// runTest("inner interface mixin");
// }
public void testClassAnnoValue_405016_1() throws Exception {
// test that class literals allowed
runTest("class anno value 1");
}
public void testInnerNames_407494() throws Exception {
runTest("inner names");
}
public void testInnerNames_407494_2() throws Exception {
runTest("inner names 2");
}
// public void testClassAnnoValue_405016() throws Exception {
// runTest("class anno value");
// }
public void testAbstractMethodError_404601() throws Exception {
runTest("abstract method error");
}
public void testDeclareAnnoOnItd() throws Exception {
runTest("declare anno on itd");
JavaClass jc = getClassFrom(ajc.getSandboxDirectory(),"C");
Method m = getMethodStartsWith(jc, "getName");
assertNotNull(m);
AnnotationGen[] ags = m.getAnnotations();
for (AnnotationGen ag : ags) {
System.out.println(ag);
}
assertEquals(1,ags.length);
assertEquals("LFoo;",ags[0].getTypeSignature());
}
// ---
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc173Tests.class);
}
@Override
protected java.net.URL getSpecFile() {
return getClassResource("ajc173.xml");
}
}
|