aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/resources/org/aspectj/systemtest/ajc161/annotationFieldBinding.xml
blob: f3f21bc9bd134e4be3daa881be16b09431128dd9 (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
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>

<!-- AspectJ v1.6.1 Optimized Annotation Field Binding Tests -->
<suite>

   <ajc-test dir="features161/optimizedAnnotationBinding" title="case one - syntax">
     <compile options="-1.8" files="CaseOne.java"/> 
     <run class="CaseOne">
       <stdout>
         <line text="ONE"/>
         <line text="TWO"/>
         <line text="THREE"/>
       </stdout>
     </run>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case two - no such field">
     <compile options="-1.8" files="CaseTwo.java">
       <message kind="error" line="30" text="No field of type 'Level' exists on annotation type 'Anno'"/>
     </compile>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case three - ambiguous">
     <compile options="-1.8" files="CaseThree.java">
       <message kind="error" line="31" text="The field type 'Level' is ambiguous for annotation type 'Anno'"/>
     </compile>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case four - default value">
     <compile options="-1.8" files="CaseFour.java"/> 
     <run class="CaseFour">
       <stdout>
         <line text="ONE"/>
         <line text="TWO"/>
         <line text="ONE"/>
       </stdout>
     </run>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case five - not an enum - compiler limitation">
     <compile options="-1.8" files="CaseFive.java">
       <message kind="error" line="20" text="The field within the annotation must be an enum, string or int. 'float' is not"/>
     </compile>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case six - not an execution join point - compiler limitation">
     <compile options="-1.8" files="CaseSix.java">
       <message kind="error" line="20" text="Annotation field binding is only supported at method-execution join points"/>
     </compile>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case seven - annos in packages one">
     <compile options="-1.8" files="CaseSeven.java"/> 
     <run class="p.q.r.CaseSeven">
       <stdout>
         <line text="ONE"/>
         <line text="TWO"/>
         <line text="THREE"/>
       </stdout>
     </run>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case eight - annos in packages two">
     <compile options="-1.8" files="CaseEight.java"/> 
     <run class="p.q.r.CaseEight">
       <stdout>
         <line text="ONE"/>
         <line text="TWO"/>
         <line text="THREE"/>
       </stdout>
     </run>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case nine - everything in different packages">
     <compile options="-1.8" files="CaseNine.java Level.java Anno.java"/> 
     <run class="p.q.r.CaseNine">
       <stdout>
         <line text="ONE"/>
         <line text="TWO"/>
         <line text="THREE"/>
       </stdout>
     </run>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case ten - binding multiple things">
     <compile options="-1.8" files="CaseTen.java"/> 
     <run class="CaseTen">
       <stdout>
         <line text="ONE:3"/>
         <line text="TWO:4"/>
         <line text="THREE:5"/>
       </stdout>
     </run>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case eleven - binding multiple annotation fields">
     <compile options="-1.8" files="CaseEleven.java"/> 
     <run class="CaseEleven">
       <stdout>
         <line text="ONE:GREEN"/>
         <line text="TWO:GREEN"/>
         <line text="THREE:BLUE"/>
       </stdout>
     </run>
   </ajc-test>
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case twelve - binding anno and anno value">
     <compile options="-1.8" files="CaseTwelve.java"/> 
     <run class="CaseTwelve">
       <stdout>
         <line text="ONE:GREEN"/>
         <line text="TWO:GREEN"/>
         <line text="THREE:BLUE"/>
       </stdout>
     </run>
   </ajc-test>
   
   
   <ajc-test dir="features161/optimizedAnnotationBinding" title="case thirteen - bug npe">
     <compile options="-1.8" files="CaseThirteen.java">
       <message kind="error" line="31" text="No field of type 'java.lang.String'"/>
       <message kind="error" line="31" text="When using @annotation"/>
       <message kind="error" line="32" text="cannot be resolved"/>
     </compile>
   </ajc-test>
   
</suite>