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.

ajc184.xml 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 1">
  4. <compile files="One.java" options="-1.8"/>
  5. <run class="One">
  6. <stdout>
  7. <line text="In instance check method doit()"/>
  8. <line text="In advice()"/>
  9. <line text="Method m() running"/>
  10. </stdout>
  11. </run>
  12. </ajc-test>
  13. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 2">
  14. <compile files="Two.java" options="-1.8"/>
  15. <run class="Two">
  16. <stdout>
  17. <line text="In instance check method, count=1 so doit returns false"/>
  18. <line text="Method m() running"/>
  19. <line text="In instance check method, count=2 so doit returns true"/>
  20. <line text="In advice()"/>
  21. <line text="Method m() running"/>
  22. <line text="In instance check method, count=3 so doit returns false"/>
  23. <line text="Method m() running"/>
  24. <line text="In instance check method, count=4 so doit returns true"/>
  25. <line text="In advice()"/>
  26. <line text="Method m() running"/>
  27. </stdout>
  28. </run>
  29. </ajc-test>
  30. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 3">
  31. <compile files="Three.java" options="-1.8"/>
  32. <run class="Three">
  33. <stdout>
  34. <line text="Method m() running"/>
  35. <line text="In instance check method, count=1 so doit returns false"/>
  36. <line text="Method m() running"/>
  37. <line text="In instance check method, count=2 so doit returns true"/>
  38. <line text="In advice()"/>
  39. <line text="Method m() running"/>
  40. <line text="In instance check method, count=3 so doit returns false"/>
  41. <line text="Method m() running"/>
  42. <line text="In instance check method, count=4 so doit returns true"/>
  43. <line text="In advice()"/>
  44. </stdout>
  45. </run>
  46. </ajc-test>
  47. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 4">
  48. <compile files="Four.java" options="-1.8"/>
  49. <run class="Four">
  50. <stdout>
  51. <line text="In instance check method doit()"/>
  52. <line text="In advice() execution(void Four.m())"/>
  53. <line text="Method m() running"/>
  54. </stdout>
  55. </run>
  56. </ajc-test>
  57. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 5">
  58. <compile files="Five.java" options="-1.8"/>
  59. <run class="Five">
  60. <stdout>
  61. <line text="In instance check method doit()"/>
  62. <line text="In advice() arg0=abc"/>
  63. <line text="Method m() running"/>
  64. </stdout>
  65. </run>
  66. </ajc-test>
  67. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 6">
  68. <compile files="Six.java" options="-1.8"/>
  69. <run class="Six">
  70. <stdout>
  71. <line text="In instance check method doit()"/>
  72. <line text="In advice() execution(void Six.main(String[]))"/>
  73. <line text="Method m() running"/>
  74. </stdout>
  75. </run>
  76. </ajc-test>
  77. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 7">
  78. <compile files="Seven.java" options="-1.8"/>
  79. <run class="Seven">
  80. <stdout>
  81. <line text="In instance check method doit()"/>
  82. <line text="In advice() call(void Seven.m()) execution(void Seven.main(String[]))"/>
  83. <line text="Method m() running"/>
  84. </stdout>
  85. </run>
  86. </ajc-test>
  87. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 8">
  88. <compile files="Eight.java" options="-1.8"/>
  89. <run class="Eight">
  90. <stdout>
  91. <line text="in doit(): class=X"/>
  92. <line text="In advice()"/>
  93. <line text="Method m() running"/>
  94. </stdout>
  95. </run>
  96. </ajc-test>
  97. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 9">
  98. <compile files="Nine.java" options="-1.8"/>
  99. <run class="Nine">
  100. <stdout>
  101. <line text="in doit(): class=X"/>
  102. <line text="In advice()"/>
  103. <line text="Method m() running"/>
  104. </stdout>
  105. </run>
  106. </ajc-test>
  107. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 10">
  108. <compile files="Ten.java" options="-1.8"/>
  109. <run class="com.foo.bar.Ten">
  110. <stdout>
  111. <line text="In instance check method doit() class=com.foo.bar.X"/>
  112. <line text="In advice()"/>
  113. <line text="Method m() running"/>
  114. </stdout>
  115. </run>
  116. </ajc-test>
  117. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 11">
  118. <compile files="Eleven.java" options="-1.8">
  119. <message kind="error" text="thisAspectInstance can only be used inside an if() clause for singleton aspects (compiler limitation)"/>
  120. </compile>
  121. </ajc-test>
  122. <ajc-test dir="bugs184/449739" title="is final">
  123. <compile files="Code.java" options="-1.8"/>
  124. <run class="Code">
  125. <stdout>
  126. <line text="execution(void Code.run())"/>
  127. </stdout>
  128. </run>
  129. </ajc-test>
  130. <ajc-test dir="bugs184/449739" title="is final - 2">
  131. <compile files="Code2.java" options="-1.8"/>
  132. <run class="Code2">
  133. <stdout>
  134. <line text="execution(void Helper.run())"/>
  135. </stdout>
  136. </run>
  137. </ajc-test>
  138. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 12">
  139. <compile files="Twelve.java" options="-1.8"/>
  140. <run class="Twelve">
  141. <stdout>
  142. <line text="In instance check method doit()"/>
  143. <line text="In advice() arg=abc tjpsp=execution(void Twelve.m(String))"/>
  144. <line text="Method m() running"/>
  145. </stdout>
  146. </run>
  147. </ajc-test>
  148. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 13">
  149. <compile files="Thirteen.java" options="-1.8"/>
  150. <run class="Thirteen">
  151. <stdout>
  152. <line text="instance is X"/>
  153. <line text="In advice() arg=abc tjpsp=execution(void Thirteen.m(String))"/>
  154. <line text="Method m() running"/>
  155. </stdout>
  156. </run>
  157. </ajc-test>
  158. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 14">
  159. <compile files="Fourteen.java" options="-1.8"/>
  160. <run class="Fourteen">
  161. <stdout>
  162. <line text="instance is X"/>
  163. <line text="In advice()"/>
  164. <line text="Method m() running"/>
  165. </stdout>
  166. </run>
  167. </ajc-test>
  168. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 15">
  169. <compile files="Fifteen.java" options="-1.8"/>
  170. <run class="Fifteen">
  171. <stdout>
  172. <line text="in doit(): class=X"/>
  173. <line text="In advice()"/>
  174. <line text="Method m() running"/>
  175. </stdout>
  176. </run>
  177. </ajc-test>
  178. </suite>