aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ajcTests10.xml
blob: 8a493e4867d0bc98e744d8ee1a53366ebeb02a06 (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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">


<suite>
    <ajc-test dir="jacks"
      title="14.20-label-11  The break is interrupted by the try-finally"
      keywords="from-stricttests">
        <compile options="-strict" files="FinallyReturns.java">
            <message kind="error" line="11"/>
        </compile>
    </ajc-test>

    <ajc-test dir="jacks"
      title="14.20-catch-14  The throw is interrupted by the inner finally"
      keywords="from-stricttests">
        <compile options="-strict" files="FinallyReturnsThrows.java">
            <message kind="error" line="10"/>
        </compile>
    </ajc-test>

    <ajc-test dir="jacks"
      title="14.20-label-12  The break is interrupted by the try-finally"
      keywords="from-stricttests">
        <compile options="-strict" files="FinallyReturnsBreakInCatch.java">
            <message kind="error" line="10"/>
        </compile>
    </ajc-test>
    
    <!-- strict-only tests treated as 1.0 tests -->

    <!-- ajc-only tests treated as 1.0 tests -->
    <ajc-test dir="new" pr="567"
      title="cyclic interface inheritance not detected if no classes implement the interfaces"
      keywords="from-java,purejava,messages-vary">
        <compile files="CyclicInterfaceInheritance.java" 
               options="!ajc">
            <message kind="error" line="14"/>
        </compile>
    </ajc-test>

    <ajc-test dir="new/packagePrefix" pr="574"
      title="classes that are package prefixes are illegal"
      keywords="from-java,purejava,messages-vary">
        <compile files="p/prefix.java,p/prefix/SomeClass.java"
               options="!ajc">
            <message kind="error" line="3"/>
        </compile>
    </ajc-test>

    <ajc-test dir="pureJava"
      title="suggested by Jacks 15.28-qualified-namestr tests"
      keywords="from-java,purejava,messages-vary">
        <compile files="NonConstants.java" 
               options="!ajc">
            <message kind="error" line="14"/>
            <message kind="error" line="15"/>
            <message kind="error" line="16"/>
        </compile>
    </ajc-test>

    <ajc-test dir="new" pr="643" title="try without catch or finally"
      keywords="from-java,purejava,message-vary">
        <compile files="TryNoCatchCE.java"
               options="!ajc">
            <message kind="error" line="5"/>
        </compile>
    </ajc-test>

    <ajc-test dir="new" pr="642" title="invalid floating-point constant"
      keywords="from-java,purejava,messages-vary">
        <compile files="ParsingFloatCE.java"
               options="!ajc">
            <message kind="error" line="5"/>
            <message kind="error" line="6"/>
        </compile>
    </ajc-test>

    <ajc-test dir="new/subaspects" pr="647"
      title="concrete aspect unable to access abstract package-private method in parent for overriding"
      keywords="from-java,purejava,messages-vary">
        <compile files="parent/ParentMethodCE.java,child/ChildMethodCE.java"
               options="!ajc">
            <message kind="error" line="27"/>
        </compile>
    </ajc-test>

    <ajc-test dir="new" pr="701"
      title="CE for ambiguous type reference (two type declarations)"
      keywords="from-java,purejava,messages-vary">
        <compile files="AmbiguousClassReference3CE.java"
               options="!ajc">
            <message kind="error" line="9"/>
            <message kind="error" line="10"/>
        </compile>
    </ajc-test>

    <ajc-test dir="new" pr="701"
      title="CE for ambiguous type reference (two inner types)"
      keywords="from-java,purejava,messages-vary">
        <compile files="AmbiguousClassReference4CE.java"
               options="!ajc">
            <message kind="error" line="9"/>
            <message kind="error" line="10"/>
        </compile>
    </ajc-test>

    <ajc-test dir="errors" title="Crashes when a cast of the form )int) appears"
      keywords="from-errors,purejava,messages-vary">
        <compile files="BadCast.java"
               options="!ajc">
            <message kind="error" line="9"/>
        </compile>
    </ajc-test>

    <ajc-test dir="errors" title="Crashes when the closing brace is reversed"
      keywords="from-errors,purejava,messages-vary">
        <compile files="ClosingBrace.java"
               options="!ajc">
            <message kind="error" line="14"/>
        </compile>
    </ajc-test>

    <ajc-test dir="errors" title="class and interface extension"
      keywords="from-errors,purejava,messages-vary">
        <compile files="BadExtension.java"
               options="!ajc">
            <message kind="error" line="9"/>
            <message kind="error" line="16"/>
            <message kind="error" line="17"/>
            <message kind="error" line="18"/>
            <message kind="error" line="19"/>
            <message kind="error" line="21"/>
            <message kind="error" line="35"/>
            <message kind="error" line="38"/>
        </compile>
    </ajc-test>

    <ajc-test dir="errors" title="illegal synchronized stmts"
      keywords="from-errors,purejava,messages-vary">
        <compile files="BadSynchronized.java"
               options="!ajc">
            <message kind="error" line="3"/>
            <message kind="error" line="4"/>
            <message kind="error" line="5"/>
            <message kind="error" line="6"/>
        </compile>
    </ajc-test>

    <ajc-test dir="new" pr="715" title="incrementing objects, arrays CE"
      keywords="from-resolved_104,purejava,messages-vary">
        <compile files="ArrayIncCE.java"
               options="!ajc">
            <message kind="error" line="15"/>
            <message kind="error" line="16"/>
            <message kind="error" line="17"/>
            <message kind="error" line="18"/>
            <message kind="error" line="19"/>
            <message kind="error" line="20"/>
            <message kind="error" line="21"/>
        </compile>
    </ajc-test>

    <ajc-test dir="pureJava" pr="737"
      title="should have circular inheritance errors (1)"
      keywords="from-resolved_105,purejava,messages-vary">
        <compile files="circle/Test1CF.java"
               options="!ajc">
            <message kind="error" line="7"/>
        </compile>
    </ajc-test>

    <ajc-test dir="pureJava" pr="737"
      title="should have circular inheritance errors (2)"
      keywords="from-resolved_105,purejava,messages-vary">
        <compile files="circle/Test2CF.java"
               options="!ajc">
            <message kind="error" line="6"/>
        </compile>
    </ajc-test>

    <ajc-test dir="pureJava" title="try requires block JLS 14.19"
      keywords="from-resolved_105,purejava,messages-vary">
        <compile files="TryBlockRequiredCE.java"
               options="!ajc">
            <message kind="error" line="6"/>
            <message kind="error" line="7"/>
            <message kind="error" line="8"/>
        </compile>
    </ajc-test>

    <ajc-test dir="pureJava" pr="722" title="loop expressions not declarations"
      keywords="from-resolved_105,purejava,messages-vary">
        <compile files="DeclarationsInLoopsCE.java"
                options="!ajc">
            <message kind="error" line="7"/>
            <message kind="error" line="8"/>
            <message kind="error" line="9"/>
        </compile>
    </ajc-test>

    <ajc-test dir="ng"
      title="array initializers can't have random commas"
      keywords="from-resolved_105,purejava,messages-vary">
        <compile files="ArrayInitError.java"
               options="!ajc,^lenient">
            <message kind="error" line="6"/>
            <message kind="error" line="7"/>
        </compile>
    </ajc-test>

    <ajc-test dir="ng"
      title="array initializers can't have random commas"
      keywords="from-resolved_105,purejava,messages-vary">
        <compile files="ArrayInitError.java"
               options="!ajc,!lenient">
            <message kind="error" line="6"/>
        </compile>
    </ajc-test>

    <ajc-test dir="ng"
      title="try stmt must be block [parser, different lines from javac]"
      keywords="from-resolved_105,purejava,messages-vary">
        <compile files="NonBlockTryStmt.java"
               options="!ajc">
            <message kind="error" line="8"/>
            <message kind="error" line="10"/>
            <message kind="error" line="12"/>
            <message kind="error" line="14"/>
        </compile>
    </ajc-test>

    <ajc-test dir="pureJava"
      title="initializers must be able to complete normally (found by jacks)"
      keywords="from-resolved_105,purejava,messages-vary">
        <compile files="InitializerFlowCf.java"
               options="!ajc">
            <message kind="error" line="1"/>
        </compile>
    </ajc-test>

    <ajc-test dir="new" pr="884" keywords="v1.0"
      title="declare constructor on interface subclasses" >
        <compile options="!ajc" files="DeclareInterfaceConstructor.java"/>
        <run class="DeclareInterfaceConstructor"/>
    </ajc-test>

</suite>