You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

annotationgen.xml 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <!-- @AspectJ v1.5.0 Tests -->
  4. <!-- ================================================================= -->
  5. <!-- Adrian's tests for generation of @AspectJ annotations from ajc -->
  6. <!-- ================================================================= -->
  7. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for simple aspect">
  8. <compile files="SimpleAspect.aj" options="-1.5"/>
  9. <run class="SimpleAspect"/>
  10. </ajc-test>
  11. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for simple annotated aspect">
  12. <compile files="SimpleAnnotatedAspect.aj" options="-1.5"/>
  13. <run class="SimpleAnnotatedAspect"/>
  14. </ajc-test>
  15. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for simple aspect pre 1.5">
  16. <compile files="Simple14Aspect.aj" options="-1.4"/>
  17. <compile files="Simple14AspectTest.java" options="-1.5"/>
  18. <run class="Simple14AspectTest"/>
  19. </ajc-test>
  20. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for privileged aspect">
  21. <compile files="PrivilegedAspect.aj" options="-1.5"/>
  22. <run class="PrivilegedAspect"/>
  23. </ajc-test>
  24. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for perthis aspect">
  25. <compile files="PerThisAspect.aj" options="-1.5"/>
  26. <run class="PerThisAspect"/>
  27. </ajc-test>
  28. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for pertarget aspect">
  29. <compile files="PerTargetAspect.aj" options="-1.5"/>
  30. <run class="PerTargetAspect"/>
  31. </ajc-test>
  32. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for percflow aspect">
  33. <compile files="PerCflowAspect.aj" options="-1.5"/>
  34. <run class="PerCflowAspect"/>
  35. </ajc-test>
  36. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for percflowbelow aspect">
  37. <compile files="PerCflowbelowAspect.aj" options="-1.5"/>
  38. <run class="PerCflowbelowAspect"/>
  39. </ajc-test>
  40. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for pertypewithin aspect">
  41. <compile files="PerTypeWithinAspect.aj" options="-1.5"/>
  42. <run class="PerTypeWithinAspect"/>
  43. </ajc-test>
  44. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for inner aspect of aspect">
  45. <compile files="InnerAspectAspect.aj" options="-1.5"/>
  46. <run class="InnerAspectAspect"/>
  47. </ajc-test>
  48. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for inner aspect of class">
  49. <compile files="InnerAspectClass.aj" options="-1.5"/>
  50. <run class="InnerAspectClass"/>
  51. </ajc-test>
  52. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for advice declarations">
  53. <compile files="BasicAdvice.aj" options="-1.5"/>
  54. <run class="BasicAdvice"/>
  55. </ajc-test>
  56. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for simple pointcut">
  57. <compile files="SimplePointcut.aj" options="-1.5"/>
  58. <run class="SimplePointcut"/>
  59. </ajc-test>
  60. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for pointcut modifiers">
  61. <compile files="PointcutModifiers.aj" options="-1.5"/>
  62. <run class="PointcutModifiers"/>
  63. </ajc-test>
  64. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for pointcut params">
  65. <compile files="PointcutsWithParams.aj" options="-1.5"/>
  66. <run class="PointcutsWithParams"/>
  67. </ajc-test>
  68. <ajc-test dir="java5/ataspectj/annotationGen" title="annotation gen for pointcut refs">
  69. <compile files="ReferencePointcuts.aj" options="-1.5"/>
  70. <run class="ReferencePointcuts"/>
  71. </ajc-test>
  72. <ajc-test dir="java5/ataspectj/annotationGen" title="before ann with non-void return">
  73. <compile files="BeforeWithBadReturn.java" options="-1.5">
  74. <message kind="error" line="7" text="This advice must return void"/>
  75. <message kind="error" line="7" text="This method must return a result of type String"/>
  76. </compile>
  77. </ajc-test>
  78. <ajc-test dir="java5/ataspectj/annotationGen" title="two anns on same element">
  79. <compile files="TwoForThePriceOfOne.java" options="-1.5">
  80. <message kind="error" line="7" text="The annotation @Pointcut is disallowed for this location"/>
  81. </compile>
  82. </ajc-test>
  83. <ajc-test dir="java5/ataspectj/annotationGen" title="bad pcut in after advice">
  84. <compile files="AfterReturningWithBadPCut.java" options="-1.5">
  85. <message kind="error" line="6" text="Syntax error on token &quot;excution(* *.*(..))&quot;"/>
  86. </compile>
  87. </ajc-test>
  88. <ajc-test dir="java5/ataspectj/annotationGen" title="bad parameter binding in advice">
  89. <compile files="BadParameterBinding.java" options="-1.5">
  90. <message kind="warning" line="11" text="no match for this type name: bpb"/>
  91. <message kind="warning" line="15" text="no match for this type name: TheUnknownType"/>
  92. </compile>
  93. </ajc-test>
  94. <ajc-test dir="java5/ataspectj/annotationGen" title="simple pointcut no params">
  95. <compile files="APointcut.java" options="-1.5"/>
  96. <run class="APointcut"/>
  97. </ajc-test>
  98. <ajc-test dir="java5/ataspectj/annotationGen" title="pointcut medley">
  99. <compile files="PointcutAssortment.java" options="-1.5">
  100. <message kind="error" line="9" text="Methods annotated with @Pointcut must return void"/>
  101. <message kind="error" line="9" text="This method must return a result of type String"/>
  102. <message kind="error" line="15" text="Pointcuts without an if() expression should have an empty method body"/>
  103. <message kind="error" line="28" text="Duplicate annotation @Pointcut"/>
  104. <message kind="error" line="29" text="Duplicate annotation @Pointcut"/>
  105. <message kind="error" line="11" text="can't find referenced pointcut foo"/>
  106. <message kind="warning" line="32" text="no match for this type name: foo [Xlint:invalidAbsoluteTypeName]"/>
  107. </compile>
  108. </ajc-test>
  109. <ajc-test dir="java5/ataspectj/annotationGen" title="advice in a class">
  110. <compile files="AdviceInAClass.java" options="-1.5">
  111. <message kind="error" line="6" text="Advice must be declared inside an aspect type"/>
  112. </compile>
  113. </ajc-test>
  114. <ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for deows">
  115. <compile files="Deow.aj" options="-1.5">
  116. </compile>
  117. <run class="Deow"/>
  118. </ajc-test>
  119. <ajc-test dir="java5/ataspectj/annotationGen" title="runtime pointcut resolution referencing compiled pointcuts">
  120. <compile files="PCLib.aj,RuntimePointcuts.java" options="-1.5">
  121. </compile>
  122. <run class="RuntimePointcuts"/>
  123. </ajc-test>
  124. <ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for decp">
  125. <compile files="DeclareParentsTest.aj" options="-1.5, -outxml">
  126. </compile>
  127. <run class="DeclareParentsTest" ltw=""/>
  128. </ajc-test>
  129. <ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for decp 2">
  130. <compile files="DeclareParentsTestAdvanced.aj" options="-1.5, -outxml">
  131. </compile>
  132. <run class="a.b.c.DeclareParentsTestAdvanced" ltw=""/>
  133. </ajc-test>
  134. <ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for decs">
  135. <compile files="DeclareSoftTest.aj" options="-1.5">
  136. </compile>
  137. <run class="DeclareSoftTest"/>
  138. </ajc-test>
  139. <ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for dec precedence">
  140. <compile files="DeclarePrecedenceTest.aj" options="-1.5">
  141. </compile>
  142. <run class="DeclarePrecedenceTest"/>
  143. </ajc-test>
  144. <ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for dec annotation">
  145. <compile files="DeclareAnnotationTest.aj" options="-1.5">
  146. </compile>
  147. <run class="DeclareAnnotationTest"/>
  148. </ajc-test>
  149. <ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for itds">
  150. <compile files="ITDTest.aj" options="-1.5, -outxml -Xlint:ignore -makeAjReflectable">
  151. </compile>
  152. <run class="a.b.c.ITDTest" ltw=""/>
  153. </ajc-test>
  154. </suite>