blob: af9d8af9c7314b365a6ab955c7946154ce5c95fb (
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
|
/*******************************************************************************
* Copyright (c) 2014,2018 Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement - initial API and implementation
*******************************************************************************/
package org.aspectj.systemtest.apt;
import java.io.File;
import org.aspectj.testing.XMLBasedAjcTestCase;
import org.aspectj.util.LangUtil;
import junit.framework.Test;
/**
* Annotation processing tool tests.
*
* @author Sergey Stupin.
*/
public class AptTests extends XMLBasedAjcTestCase {
public void testAptWithSpecifiedProcessor() {
if (LangUtil.is19VMOrGreater()) {
return;
}
runTest("annotation processing with specified processor");
}
/**
* SPI - http://docs.oracle.com/javase/tutorial/sound/SPI-intro.html
*/
public void testAptUsingSPI() {
if (LangUtil.is19VMOrGreater()) {
return;
}
runTest("annotation processing in action using SPI");
}
public void testDisabledApt() {
if (LangUtil.is11VMOrGreater()) {
// javax.annotation.Generated not in Java11
return;
}
runTest("disabled annotation processing");
}
public void testAptWithJavaFilesAsAspects() {
runTest("annotation processing generating java files with aspects");
}
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(AptTests.class);
}
@Override
protected java.net.URL getSpecFile() {
return getClassResource("apt-spec.xml");
}
}
|