blob: 192a8498616a0f4b6fdd717536d268211bf257dd (
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
|
/*******************************************************************************
* Copyright (c) 2005 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:
* Alexandre Vasseur initial implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc150.ataspectj;
import org.aspectj.testing.XMLBasedAjcTestCase;
import junit.framework.Test;
/**
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
public class AtAjMisuseTests extends XMLBasedAjcTestCase {
protected java.net.URL getSpecFile() {
return getClassResource("misuse.xml");
}
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(AtAjMisuseTests.class);
}
public void testQAspectClassExtendingQAspectClass() {
runTest("@Aspect class extending @Aspect class");
}
// TODO asc commented out for now until Alex manages to get ajdtcore up to date...
// public void testClassWithQBeforeExtendingQAspectClass() {
// runTest("class with @Before extending @Aspect class");
// }
public void testQPointcutNotReturningVoid() {
runTest("@Pointcut not returning void");
}
public void testQPointcutWithGarbageString() {
runTest("@Pointcut with garbage string");
}
public void testQPointcutWithThrowsClause() {
runTest("@Pointcut with throws clause");
}
public void testQAfterReturningWithWrongNumberOfArgs() {
runTest("@AfterReturning with wrong number of args");
}
public void testQBeforeOnNon_publicMethod() {
runTest("@Before on non-public method");
}
public void testQBeforeOnMethodNotReturningVoid() {
runTest("@Before on method not returning void");
}
public void testQBeforeWithPJP() {
runTest("@Before with PJP");
}
}
|