blob: 2936888cba233d5863702239d36dcea7fada2c06 (
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
<suite>
<ajc-test dir="bugs190/paramannos" title="param annos negative">
<compile files="Code.java" options="-1.9 -showWeaveInfo">
<message kind="weave" text="Join point 'constructor-execution(void Code.<init>(java.lang.Object))' in Type 'Code' (Code.java:8) advised by before advice from 'X' (Code.java:12)"/>
</compile>
</ajc-test>
<ajc-test dir="bugs190/modules/aaa" title="build a module">
<compile files="module-info.java com/foo1/C1.java" options="-1.9"/>
</ajc-test>
<ajc-test dir="bugs190/modules/bbb" title="run a module - classpath">
<compile files="module-info.java aaa/bbb/A.java" options="-1.9"/>
<run class="aaa.bbb.A">
<stdout>
<line text="A running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/bbb" title="run a module - modulepath">
<compile files="module-info.java aaa/bbb/A.java" options="-1.9"/>
<run modulepath="$sandbox" module="my.module/aaa.bbb.A">
<stdout>
<line text="A running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/bbb" title="package and run a module - modulepath">
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
<file deletefile="module-info.java"/>
<file deletefile="aaa"/>
<run modulepath="my.module.jar" module="my.module/aaa.bbb.A">
<stdout>
<line text="A running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/ccc" title="compile regular code using module code">
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="modules/my.module.jar"/>
<file deletefile="module-info.java"/>
<file deletefile="aaa"/>
<compile files="InvokeA.java" options="-1.9" modulepath="$sandbox/modules/my.module.jar"/>
</ajc-test>
<ajc-test dir="bugs190/modules/ddd" title="compile regular code using module code that isn't visible">
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="modules/my.module.jar"/>
<compile files="InvokeA.java" options="-1.9" modulepath="$sandbox/modules/my.module.jar">
<message kind="error" text="package aaa.bbb is not visible"/>
</compile>
</ajc-test>
<ajc-test dir="bugs190/modules/eee" title="binary weaving module">
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
<file deletefile="module-info.java"/>
<file deletefile="aaa"/>
<compile files="Azpect.java" inpath="my.module.jar" outjar="my.module.woven.jar"/>
<run modulepath="my.module.woven.jar" module="my.module/aaa.bbb.A">
<stdout>
<line text="Azpect running"/>
<line text="A running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/520135" title="funny signature with method reference">
<compile files="FailsApectJ.java" options="-1.8"/>
</ajc-test>
<ajc-test dir="bugs190/modules/fff" title="compile module including aspects">
<compile files="module-info.java pkg/Demo.java otherpkg/Azpect.java" modulepath="$runtimemodule" outjar="demomodule.jar" options="-1.9"/>
<run modulepath="$runtimemodule:demomodule.jar" module="demo/pkg.Demo">
<stdout>
<line text="Azpect running"/>
<line text="Demo running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/eee" title="compile module and apply aspects via aspectpath">
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
<file deletefile="module-info.java"/>
<file deletefile="aaa"/>
<compile files="Azpect.java" outjar="azpects.jar" options="-1.4"/>
<compile options="-showWeaveInfo" inpath="my.module.jar" aspectpath="azpects.jar" outjar="my.module.woven.jar">
<message kind="weave" text="Join point 'method-execution(void aaa.bbb.A.main(java.lang.String[]))' in Type 'aaa.bbb.A' (A.java:4) advised by before advice from 'aspects.Azpect' (azpects.jar!Azpect.class:4(from Azpect.java))"/>
</compile>
<file deletefile="my.module.jar"/>
<run classpath="my.module.woven.jar:azpects.jar" class="aaa.bbb.A">
<stdout>
<line text="Azpect running"/>
<line text="A running"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/ggg" title="module path vs classpath 1">
<!-- build some simple code into a jar we can depend on *not a module* -->
<compile files="ddd/D.java" options="-1.9" outjar="foo.jar"/>
<file deletefile="ddd/D.java"/>
<!-- compile a module that depends on that -->
<!-- this fails because if you start working with modules you commit to the modules story and classpath
becomes irrelevant -->
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="module.jar" classpath="foo.jar">
<message kind="error" text="The import ddd cannot be resolved"/>
<message kind="error" text="D cannot be resolved"/>
</compile>
</ajc-test>
<ajc-test dir="bugs190/modules/hhh" title="module path vs classpath 2">
<!-- build some simple code into a jar we can depend on *not a module* -->
<file renamefrom="module-info-a.java" renameto="module-info.java"/>
<compile files="module-info.java ddd/D.java" options="-1.9" outjar="my.module.a.jar"/>
<!--
<file renamefrom="module-info-b.java" renameto="module-info.java"/>
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.b.jar" modulepath="my.module.a.jar"/>
-->
</ajc-test>
<ajc-test dir="bugs190/modules/iii" title="compile use of java.xml.bind">
<compile files="UsesJAXB.java" options="--add-modules java.xml.bind -1.9"/>
<run class="UsesJAXB" vmargs="--add-modules java.xml.bind">
<stdout>
<line text="UsesJAXB.running..."/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/iii" title="weave use of java.xml.bind">
<compile files="UsesJAXB.java Azpect.java" options="--add-modules java.xml.bind -1.9"/>
<run class="UsesJAXB" vmargs="--add-modules java.xml.bind">
<stdout>
<line text="UsesJAXB.running..."/>
<line text="null"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/iii" title="limit modules 1">
<compile files="UsesJAXB.java Azpect.java" options="--limit-modules java.xml.bind -1.9"/>
<run class="UsesJAXB" vmargs="--limit-modules java.xml.bind">
<stdout>
<line text="UsesJAXB.running..."/>
<line text="null"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/iii" title="add reads 1">
<compile files="UsesJAXB.java Azpect.java" options="--add-reads java.sql=java.xml.bind --add-modules java.sql -1.9"/>
<run class="UsesJAXB" vmargs="--add-modules java.xml.bind ">
<stdout>
<line text="UsesJAXB.running..."/>
<line text="null"/>
</stdout>
</run>
</ajc-test>
<!--
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="module.jar" aspectpath="foo.jar"/>
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
<file deletefile="module-info.java"/>
<file deletefile="aaa"/>
<compile files="Azpect.java" outjar="azpects.jar"/>
<compile options="-showWeaveInfo" inpath="my.module.jar" aspectpath="azpects.jar" outjar="my.module.woven.jar">
<message kind="weave" text="Join point 'method-execution(void aaa.bbb.A.main(java.lang.String[]))' in Type 'aaa.bbb.A' (A.java:4) advised by before advice from 'aspects.Azpect' (azpects.jar!Azpect.class:4(from Azpect.java))"/>
</compile>
<file deletefile="my.module.jar"/>
<run classpath="my.module.woven.jar:azpects.jar" class="aaa.bbb.A">
<stdout>
<line text="Azpect running"/>
<line text="A running"/>
</stdout>
</run>
</ajc-test>
-->
<ajc-test dir="bugs190/modules" title="weave module">
<compile files="aspect1/Azpect1.java" inpath="module1/module-one.jar" outjar="runner.jar" options="-1.8"/>
<java classpath="runner.jar" class="a.b.c.Code"/>
</ajc-test>
<ajc-test dir="bugs190/various" title="setting static final outside clinit">
<compile files="Code.java" options="-1.9"/>
<run class="Code">
<stdout>
<line text="call(void java.io.PrintStream.println(String))"/>
<line text="running"/>
</stdout>
</run>
</ajc-test>
<!-- from ajc153 -->
<ajc-test dir="bugs153/pr156962" title="Test Annot Method Has Member 1">
<compile files="Sample.java, LiftDeprecation.aj" options="-1.9 -XhasMember -showWeaveInfo -Xlint:ignore">
<message kind="weave" text="'Sample' (Sample.java:1) is annotated with @Deprecated type annotation from 'LiftDeprecation' (LiftDeprecation.aj:2)"/>
</compile>
</ajc-test>
<!-- from ajc153 -->
<ajc-test dir="bugs153/pr156962" title="Test Annot Method Has Member 2">
<compile files="Sample.java, LiftDeprecation.aj" options="-1.8 -XhasMember -showWeaveInfo -Xlint:ignore">
<message kind="weave" text="'Sample' (Sample.java:1) is annotated with @Deprecated type annotation from 'LiftDeprecation' (LiftDeprecation.aj:2)"/>
</compile>
</ajc-test>
</suite>
|