aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/resources/org/aspectj/systemtest/aspectpath/aspectpath.xml
blob: 92be7503c184e82d9c8becaf1ecd01b117d27a66 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>

<suite>

    <!-- .................................... aspectpath tests -->
	<!-- The jars used by this test can be regenerated with
	     org.aspectj.ajdt.core/testsrc/org.aspectj.ajdt.internal.compiler.batch.BcweaverJarMaker
	-->
    <ajc-test dir="new/options11" 
      comment="XXX not validated correct yet"
      title="testing new options">
        <compile files="Main.java,injar.jar,Aspect.java" 
            aspectpath="aspectlib1.jar,aspectlib2.jar"/>
        <!-- can't run until we support classpath including the above jars
        <run class="Main"/>
        -->
    </ajc-test>
    
	<ajc-test dir="new/interfaceLibrary"
		title="aspect-declared interface members in libraries - baseline">
		<compile files="lib/LibraryInterface.java,
						Client.java,
						LibraryAspect.java"/>
		<run class="Client"/>
		</ajc-test>
		
	<ajc-test dir="new/interfaceLibrary"
		comment="prove that LibraryAspect is required"
		title="aspect-declared interface members in libraries - interfaceOnly.jar">
		<compile 
			files="Client.java" 
			aspectpath="interfaceOnly.jar">
			<message kind="error" line="5"/>
			</compile>
		</ajc-test>

	<ajc-test dir="new/interfaceLibrary"
		title="aspect-declared interface members in libraries - aspectOnly.jar">
		<compile 
			files="lib/LibraryInterface.java,
					Client.java" 
			aspectpath="aspectOnly.jar"/>
		<run class="Client"/>
		</ajc-test>
		
	<ajc-test dir="new/interfaceLibrary"
		title="aspect-declared interface members in libraries - aspectedInterfaceOnly.jar"
		comment="prove aspect is required even if interface is woven"
		>
		<compile 
			files="Client.java" 
			classpath="aspectedInterfaceOnly.jar">
			<message kind="error" line="0" text="LibraryAspect"/>
			<message kind="error" line="9" text="LibraryInterface"/>
			</compile>
		</ajc-test>

	<ajc-test dir="new/interfaceLibrary"
		title="aspect-declared interface members in libraries - aspectedInterfaceOnly.jar,aspectOnly.jar"
		comment="weaving required for implementations of interface? 
		         XXX Would prefer to support javac compiles of Client here, mimicked with classpath only"
		>
		<compile 
			files="Client.java" 
			classpath="aspectedInterfaceOnly.jar,aspectOnly.jar">
			<message kind="error" line="9"/>
			</compile>
		</ajc-test>

	<ajc-test dir="new/interfaceLibrary"
		title="aspect-declared interface members in libraries - aspectedInterfaceOnlyBinary.jar,aspectOnly.jar"
		comment="works if aspect is only on the classpath?, i.e., no weaving XXX need javac run"
		>
		<compile 
			files="Client.java" 
			classpath="aspectedInterfaceOnlyBinary.jar,aspectOnly.jar">
			<message kind="error" line="9"/>
			</compile>
		</ajc-test>

	<ajc-test dir="new/interfaceLibrary"
		title="aspect-declared interface members in libraries - aspectedInterfaceOnly.jar,aspectpath=aspectOnly.jar"
		comment="can weave to create library, and then weave clients"
		>
		<compile 
			files="Client.java" 
			classpath="aspectedInterfaceOnly.jar"
			aspectpath="aspectOnly.jar"/>
		<run class="Client"/>
		</ajc-test>

	<ajc-test dir="new/interfaceLibrary"
		title="aspect-declared interface members in libraries - aspectedInterfaceOnly.jar,aspectpath=aspectOnly.jar"
		comment="works if source aspect and binary classpath woven with aspect? 
		         should NOT warn about affected type not since affected type is already woven?"
		>
		<compile 
			files="Client.java,LibraryAspect.java" 
			classpath="aspectedInterfaceOnly.jar"/>
			
		<run class="Client"/>
		</ajc-test>

	<ajc-test 
		dir="bugs/interfaceLibrary"
		title="exception clause for aspect-declared interface methods - positive">
		<compile files="Client.java,LibraryAspect.java,lib/LibraryInterface.java" options="-Xlint:ignore"/>
		<run class="Client"/>
		</ajc-test>

	<ajc-test 
		dir="bugs/interfaceLibrary"
		title="exception clause for aspect-declared interface methods - negative">
		<compile files="ClientCE.java,LibraryAspect.java,lib/LibraryInterface.java">
			<message kind="error" file="ClientCE.java" line="5"/>
		</compile>
		</ajc-test>

	<ajc-test 
		dir="bugs/interfaceLibrary"
		title="exception clause for aspect-declared class methods - positive">
		<compile files="ClassClient.java,LibraryClassAspect.java,lib/LibraryClass.java" options="-Xlint:ignore"/>
		<run class="ClassClient"/>
		</ajc-test>

	<ajc-test 
		dir="bugs/interfaceLibrary"
		title="exception clause for aspect-declared class methods - negative">
		<compile files="ClassClientCE.java,LibraryClassAspect.java,lib/LibraryClass.java">
			<message kind="error" file="ClassClientCE.java" line="5"/>
			</compile>
		</ajc-test>
		
	<ajc-test dir="bugs/interfaceLibrary"
		pr="41175"
		title="exception clause for aspect-declared interface methods - positive binary">
		<compile files="Client.java" aspectpath="lib.jar" options="-Xlint:ignore"/>
		<run class="Client"/>
		</ajc-test>

	<ajc-test dir="bugs/interfaceLibrary"
		pr="41175"
		title="exception clause for aspect-declared interface methods - negative binary">
		<compile files="ClientCE.java" aspectpath="lib.jar">
			<message kind="error" file="ClientCE.java" line="5"/>
			</compile>
		</ajc-test>

	<ajc-test dir="bugs/interfaceLibrary"
		pr="41175"
		title="exception clause for aspect-declared class methods - positive binary">
		<compile files="ClassClient.java" aspectpath="libClass.jar" options="-Xlint:ignore"/>
		<run class="ClassClient"/>
		</ajc-test>

	<ajc-test dir="bugs/interfaceLibrary"
		pr="41175"
		title="exception clause for aspect-declared class methods - negative binary">
		<compile files="ClassClientCE.java" aspectpath="libClass.jar">
			<message kind="error" file="ClassClientCE.java" line="5"/>
			</compile>
	</ajc-test>
	
		<ajc-test dir="bugs/perCflowAndJar"
		pr="41359"
		title="percflow aspects compiled from jars share one instance for all entry points">
		<compile files="PerCFlowCompileFromJar.java,PerCFlowCompileFromJarTest.java"/>
		<run class="PerCFlowCompileFromJarTest"/>
	</ajc-test>
	
	<ajc-test dir="bugs/perCflowAndJar"
		pr="41359"
		title="(using aspectpath) percflow aspects compiled from jars share one instance for all entry points">
		<compile files="PerCFlowCompileFromJarTest.java"
				aspectpath="lib.jar"/>
		<run class="PerCFlowCompileFromJarTest"/>
	</ajc-test>
	
	<ajc-test dir="bugs/abstractMethods" pr="49784"
   	 title="Introduced abstract method on abstract class not implemented by subtype">
        <compile files="abstractClass/C.java"
        		 aspectpath="abstractClass/jars/AandB.jar">
            <message kind="error" line="1"/>
        </compile>
    </ajc-test>

	<ajc-test dir="bugs/abstractMethods" pr="49784"
   	 title="Introduced abstract method on interface not implemented by subtype (aspectpath)">
        <compile files="interface/C.java"
        		 aspectpath="interface/jars/AandB.jar" />
        <run class="C"/>
    </ajc-test>
    
	


</suite>