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
|
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
<!-- AspectJ v1.6.0 Annotation Value Matching Tests -->
<suite>
<ajc-test dir="features160/annotationValueMatching" title="enum references - 1">
<compile options="-1.8 -showWeaveInfo" files="Color.java,TrafficLight.java,Fruit.java,Fruity.java,EnumTest1.java">
<message kind="weave" text="Join point 'method-execution(void a.EnumTest1.m())' in Type 'a.EnumTest1' (EnumTest1.java:9) advised by before advice from 'a.EnumTest1' (EnumTest1.java:13)"/>
<message kind="weave" text="Join point 'method-execution(void a.EnumTest1.o())' in Type 'a.EnumTest1' (EnumTest1.java:11) advised by before advice from 'a.EnumTest1' (EnumTest1.java:13)"/>
</compile>
<run class="a.EnumTest1"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="enum references - 2">
<compile options="-1.8 -showWeaveInfo" files="Color.java,TrafficLight.java,Fruit.java,Fruity.java,EnumTest2.java">
<message kind="weave" text="Join point 'method-execution(void a.EnumTest2.m())' in Type 'a.EnumTest2' (EnumTest2.java:9) advised by before advice from 'a.EnumTest2' (EnumTest2.java:13)"/>
<message kind="weave" text="Join point 'method-execution(void a.EnumTest2.o())' in Type 'a.EnumTest2' (EnumTest2.java:11) advised by before advice from 'a.EnumTest2' (EnumTest2.java:13)"/>
</compile>
<run class="a.EnumTest2"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="enum references - 3">
<compile options="-1.8 -showWeaveInfo" files="Color.java,TrafficLight.java,Fruit.java,Fruity.java,EnumTest3.java">
<message kind="weave" text="Join point 'method-execution(void a.EnumTest3.m())' in Type 'a.EnumTest3' (EnumTest3.java:9) advised by before advice from 'a.EnumTest3' (EnumTest3.java:13)"/>
</compile>
<run class="a.EnumTest3"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="broken - 1">
<compile options="-1.8 -showWeaveInfo" files="Broken1.java">
<message kind="error" line="28" text="Invalid annotation value 'a', expected enum value"/>
</compile>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="allkinds">
<compile options="-1.8 -showWeaveInfo" files="AllKinds.java">
</compile>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="int value matching">
<compile options="-1.8 -showWeaveInfo" files="IntValueMatching.java">
<message kind="weave" text="Join point 'method-execution(void IntValueMatching.b())' in Type 'IntValueMatching' (IntValueMatching.java:9) advised by before advice from 'X' (IntValueMatching.java:21)"/>
</compile>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="float value matching">
<compile options="-1.8 -showWeaveInfo" files="FloatValueMatching.java">
<message kind="weave" text="methodTwo"/>
</compile>
<run class="FloatValueMatching"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="double value matching">
<compile options="-1.8 -showWeaveInfo" files="DoubleValueMatching.java">
<message kind="weave" text="methodOne"/>
</compile>
<run class="DoubleValueMatching"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="char value matching">
<compile options="-1.8 -showWeaveInfo" files="CharValueMatching.java">
<message kind="weave" text="methodTwo"/>
</compile>
<run class="CharValueMatching"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="long value matching">
<compile options="-1.8 -showWeaveInfo" files="LongValueMatching.java">
<message kind="weave" text="methodOne"/>
</compile>
<run class="LongValueMatching"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="string value matching">
<compile options="-1.8 -showWeaveInfo" files="StringValueMatching.java">
<message kind="weave" text="methodOne"/>
</compile>
<run class="StringValueMatching"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="boolean value matching">
<compile options="-1.8 -showWeaveInfo" files="BooleanValueMatching.java">
<message kind="weave" text="methodOne"/>
</compile>
<run class="BooleanValueMatching"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="byte value matching">
<compile options="-1.8 -showWeaveInfo" files="ByteValueMatching.java">
<message kind="weave" text="methodOne"/>
</compile>
<run class="ByteValueMatching"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="short value matching">
<compile options="-1.8 -showWeaveInfo" files="ShortValueMatching.java">
<message kind="weave" text="methodOne"/>
</compile>
<run class="ShortValueMatching"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="parsing">
<compile options="-1.8 -showWeaveInfo Parsing.java"/>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="simple">
<compile options="-1.8 -showWeaveInfo Simple.java">
<message kind="weave" text="Join point 'method-execution(void Marked.b())' in Type 'Marked' (Simple.java:18) advised by before advice from 'X' (Simple.java:28)"/>
<message kind="weave" text="Join point 'method-execution(void Marked.c())' in Type 'Marked' (Simple.java:21) advised by before advice from 'X' (Simple.java:28)"/>
</compile>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="example one">
<compile options="-1.8 -showWeaveInfo ExampleOne.java">
<message kind="weave" text="m002"/>
<message kind="weave" text="m003"/>
<message kind="weave" text="m005"/>
</compile>
<run class="ExampleOne">
<stderr>
<line text="tracing execution(void ExampleOne.m002())"/>
<line text="tracing execution(void ExampleOne.m003())"/>
<line text="tracing execution(void ExampleOne.m005())"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="error case">
<compile options="-1.8 Error.java">
<message kind="error" text="Invalid annotation value 'Color.GREEN', expected int value"/>
<message kind="error" text="Invalid annotation value 'hello', expected float value"/>
<message kind="error" text="Invalid annotation value 'foo', expected byte value"/>
<message kind="error" text="Invalid annotation value '123', expected boolean value"/>
<message kind="error" text="Invalid annotation value '12', expected enum value"/>
<message kind="error" text="Invalid annotation value '4212312312', expected short value"/>
<message kind="error" text="Invalid annotation value 'no', expected char value"/>
<message kind="error" text="Invalid annotation value '30.0f', expected long value"/>
<message kind="error" text="Invalid annotation value 'foo', expected double value"/>
</compile>
</ajc-test>
<ajc-test dir="features160/annotationValueMatching" title="error - non existing value">
<compile options="-1.8 ErrorOne.java">
<message kind="error" text="The annotation 'Anno' does not define a value named 'ival'"/>
</compile>
</ajc-test>
</suite>
|