blob: 3010ce1690a9276f484b33aa2ebef2cb8a6e4687 (
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>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 1">
<compile files="One.java" options="-1.8"/>
<run class="One">
<stdout>
<line text="In instance check method doit()"/>
<line text="In advice()"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 2">
<compile files="Two.java" options="-1.8"/>
<run class="Two">
<stdout>
<line text="In instance check method, count=1 so doit returns false"/>
<line text="Method m() running"/>
<line text="In instance check method, count=2 so doit returns true"/>
<line text="In advice()"/>
<line text="Method m() running"/>
<line text="In instance check method, count=3 so doit returns false"/>
<line text="Method m() running"/>
<line text="In instance check method, count=4 so doit returns true"/>
<line text="In advice()"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 3">
<compile files="Three.java" options="-1.8"/>
<run class="Three">
<stdout>
<line text="Method m() running"/>
<line text="In instance check method, count=1 so doit returns false"/>
<line text="Method m() running"/>
<line text="In instance check method, count=2 so doit returns true"/>
<line text="In advice()"/>
<line text="Method m() running"/>
<line text="In instance check method, count=3 so doit returns false"/>
<line text="Method m() running"/>
<line text="In instance check method, count=4 so doit returns true"/>
<line text="In advice()"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 4">
<compile files="Four.java" options="-1.8"/>
<run class="Four">
<stdout>
<line text="In instance check method doit()"/>
<line text="In advice() execution(void Four.m())"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 5">
<compile files="Five.java" options="-1.8"/>
<run class="Five">
<stdout>
<line text="In instance check method doit()"/>
<line text="In advice() arg0=abc"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 6">
<compile files="Six.java" options="-1.8"/>
<run class="Six">
<stdout>
<line text="In instance check method doit()"/>
<line text="In advice() execution(void Six.main(String[]))"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 7">
<compile files="Seven.java" options="-1.8"/>
<run class="Seven">
<stdout>
<line text="In instance check method doit()"/>
<line text="In advice() call(void Seven.m()) execution(void Seven.main(String[]))"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 8">
<compile files="Eight.java" options="-1.8"/>
<run class="Eight">
<stdout>
<line text="in doit(): class=X"/>
<line text="In advice()"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 9">
<compile files="Nine.java" options="-1.8"/>
<run class="Nine">
<stdout>
<line text="in doit(): class=X"/>
<line text="In advice()"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 10">
<compile files="Ten.java" options="-1.8"/>
<run class="com.foo.bar.Ten">
<stdout>
<line text="In instance check method doit() class=com.foo.bar.X"/>
<line text="In advice()"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 11">
<compile files="Eleven.java" options="-1.8">
<message kind="error" text="thisAspectInstance can only be used inside an if() clause for singleton aspects (compiler limitation)"/>
</compile>
</ajc-test>
<ajc-test dir="bugs184/449739" title="is final">
<compile files="Code.java" options="-1.8"/>
<run class="Code">
<stdout>
<line text="execution(void Code.run())"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs184/449739" title="is final - 2">
<compile files="Code2.java" options="-1.8"/>
<run class="Code2">
<stdout>
<line text="execution(void Helper.run())"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 12">
<compile files="Twelve.java" options="-1.8"/>
<run class="Twelve">
<stdout>
<line text="In instance check method doit()"/>
<line text="In advice() arg=abc tjpsp=execution(void Twelve.m(String))"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 13">
<compile files="Thirteen.java" options="-1.8"/>
<run class="Thirteen">
<stdout>
<line text="instance is X"/>
<line text="In advice() arg=abc tjpsp=execution(void Thirteen.m(String))"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 14">
<compile files="Fourteen.java" options="-1.8"/>
<run class="Fourteen">
<stdout>
<line text="instance is X"/>
<line text="In advice()"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 15">
<compile files="Fifteen.java" options="-1.8"/>
<run class="Fifteen">
<stdout>
<line text="in doit(): class=X"/>
<line text="In advice()"/>
<line text="Method m() running"/>
</stdout>
</run>
</ajc-test>
</suite>
|