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.

intertype.xml 9.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <ajc-test dir="features169/itdInnerTypes/separate" title="separate compilation">
  4. <compile files="Basic.java" options="-1.5"/>
  5. <compile files="Basic2.java"/>
  6. <run class="Basic2">
  7. <stdout>
  8. <line text="done"/>
  9. </stdout>
  10. </run>
  11. </ajc-test>
  12. <ajc-test dir="features169/itdInnerTypes/separate2" title="separate compilation - 2">
  13. <compile files="Basic.java" options="-1.5"/>
  14. <compile files="Basic2.java"/>
  15. <run class="Basic2">
  16. <stdout>
  17. <line text="done"/>
  18. </stdout>
  19. </run>
  20. </ajc-test>
  21. <ajc-test dir="features169/itdInnerTypes/eleven" title="already has it">
  22. <compile files="Target.java Aspect1.java" options="-1.5">
  23. <message kind="error" text="Duplicate nested type Inner"/>
  24. <message kind="error" text="target type already declares a "/>
  25. </compile>
  26. </ajc-test>
  27. <ajc-test dir="features169/itdInnerTypes" title="construction4">
  28. <compile files="Construction4.java" options="-1.5"/>
  29. <run class="Construction4">
  30. <stdout>
  31. <line text="abc"/>
  32. </stdout>
  33. </run>
  34. </ajc-test>
  35. <ajc-test dir="features169/itdInnerTypes" title="construction3">
  36. <compile files="Construction3.java" options="-1.5"/>
  37. <run class="Construction3">
  38. <stdout>
  39. <line text="abc"/>
  40. </stdout>
  41. </run>
  42. </ajc-test>
  43. <ajc-test dir="features169/itdInnerTypes/ten" title="construction2">
  44. <compile files="Construction.java Aspect1.java Aspect2.java" options="-1.5"/>
  45. <run class="Construction">
  46. <stdout>
  47. <line text="abcde"/>
  48. </stdout>
  49. </run>
  50. </ajc-test>
  51. <ajc-test dir="features169/itdInnerTypes" title="construction">
  52. <compile files="Construction.java" options="-1.5"/>
  53. <run class="Construction">
  54. <stdout>
  55. <line text="done"/>
  56. </stdout>
  57. </run>
  58. </ajc-test>
  59. <ajc-test dir="features169/itdInnerTypes/nine" title="vote - itd mixture 2">
  60. <compile files="Underscorer.aj Vote.java Runner.java RelatedType.java" options="-1.5"/>
  61. <run class="a.b.c.Runner">
  62. <stdout>
  63. <line text="wibble"/>
  64. <line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  65. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
  66. <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
  67. </stdout>
  68. </run>
  69. </ajc-test>
  70. <ajc-test dir="features169/itdInnerTypes/eight" title="vote - itd mixture">
  71. <compile files="Underscorer.aj Vote.java Runner.java RelatedType.java" options="-1.5"/>
  72. <run class="a.b.c.Runner">
  73. <stdout>
  74. <line text="wibble"/>
  75. <line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  76. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
  77. <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
  78. </stdout>
  79. </run>
  80. </ajc-test>
  81. <ajc-test dir="features169/itdInnerTypes/seven" title="vote - method reference">
  82. <compile files="Underscorer.aj Vote.java Runner.java RelatedType.java" options="-1.5"/>
  83. <run class="a.b.c.Runner">
  84. <stdout>
  85. <line text="wibble"/>
  86. <line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  87. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
  88. <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
  89. </stdout>
  90. </run>
  91. </ajc-test>
  92. <ajc-test dir="features169/itdInnerTypes/six" title="vote - field reference">
  93. <compile files="Vote.java Vote_Amender.aj Runner.java RelatedType.java" options="-1.5"/>
  94. <run class="a.b.c.Runner">
  95. <stdout>
  96. <line text="wibble"/>
  97. <line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  98. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
  99. <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
  100. </stdout>
  101. </run>
  102. </ajc-test>
  103. <ajc-test dir="features169/itdInnerTypes/five" title="vote - inner inner">
  104. <compile files="Vote.java Vote_Amender.aj Runner.java RelatedType.java" options="-1.5"/>
  105. <run class="a.b.c.Runner">
  106. <stdout>
  107. <line text="wibble"/>
  108. <line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  109. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
  110. <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
  111. </stdout>
  112. </run>
  113. </ajc-test>
  114. <ajc-test dir="features169/itdInnerTypes/four" title="vote - reference via annotation - two">
  115. <compile files="Vote.java Vote_Amender.aj Runner.java RelatedType.java" options="-1.5"/>
  116. <run class="a.b.c.Runner">
  117. <stdout>
  118. <line text="wibble"/>
  119. <line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  120. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
  121. <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
  122. </stdout>
  123. </run>
  124. </ajc-test>
  125. <ajc-test dir="features169/itdInnerTypes/three" title="vote - reference via annotation">
  126. <compile files="Vote.java Vote_Amender.aj Runner.java RelatedType.java" options="-1.5"/>
  127. <run class="a.b.c.Runner">
  128. <stdout>
  129. <line text="wibble"/>
  130. <line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  131. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_.class)" vm="9,10,11,12,13"/>
  132. <line text="@a.b.c.RelatedType(a.b.c.Vote$_.class)" vm="14+"/>
  133. </stdout>
  134. </run>
  135. </ajc-test>
  136. <ajc-test dir="features169/itdInnerTypes/two" title="vote - construction">
  137. <compile files="Vote.java Vote_Amender.aj Runner.java" options="-1.5"/>
  138. <run class="a.b.c.Runner">
  139. <stdout>
  140. <line text="wibble"/>
  141. </stdout>
  142. </run>
  143. </ajc-test>
  144. <ajc-test dir="features169/itdInnerTypes/one" title="vote - basic">
  145. <compile files="Vote.java Vote_Amender.aj Runner.java" options="-1.5"/>
  146. <run class="a.b.c.Runner"/>
  147. </ajc-test>
  148. <ajc-test dir="features169/itdInnerTypes" title="choice - generics 1">
  149. <compile files="ChoiceGenerics1.java" options="-1.5"/>
  150. </ajc-test>
  151. <ajc-test dir="features169/itdInnerTypes" title="choice - generics 2">
  152. <compile files="ChoiceGenerics2.java" options="-1.5">
  153. <message kind="error" text="Type mismatch: cannot convert from String to Integer"/>
  154. </compile>
  155. </ajc-test>
  156. <ajc-test dir="features169/itdInnerTypes" title="choice">
  157. <compile files="Choice.java" options="-1.5"/>
  158. <run class="Choice">
  159. <stdout>
  160. <line text="null"/>
  161. </stdout></run>
  162. </ajc-test>
  163. <ajc-test dir="features169/itdInnerTypes" title="choice - weaveinfo">
  164. <compile files="Choice.java" options="-1.5 -showWeaveInfo">
  165. <message kind="weave" text="Type 'Choice' (Choice.java) has intertyped member class from 'X' (Choice.java)"/>
  166. </compile>
  167. </ajc-test>
  168. <ajc-test dir="features169/itdInnerTypes" title="choice - model">
  169. <compile files="Choice.java" options="-1.5 -emacssym"/>
  170. </ajc-test>
  171. <ajc-test dir="features169/itdInnerTypes" title="choice2">
  172. <compile files="Choice2.java" options="-1.5"/>
  173. <run class="Choice2">
  174. <stdout>
  175. <line text="null"/>
  176. </stdout></run>
  177. </ajc-test>
  178. <ajc-test dir="features169/itdInnerTypes" title="field access">
  179. <compile files="FieldAccess.java" options="-1.5"/>
  180. <run class="FieldAccess">
  181. <stdout>
  182. <line text="42"/>
  183. </stdout></run>
  184. </ajc-test>
  185. <ajc-test dir="features169/itdInnerTypes" title="method access">
  186. <compile files="MethodCall.java" options="-1.5"/>
  187. <run class="MethodCall">
  188. <stdout>
  189. <line text="42"/>
  190. </stdout></run>
  191. </ajc-test>
  192. <ajc-test dir="features169/itdInnerTypes" title="only static">
  193. <compile files="OnlyStatic.java" options="-1.5">
  194. <message kind="error" line="5" text="Intertype declared member types can only be static (compiler limitation)"/>
  195. </compile>
  196. </ajc-test>
  197. <ajc-test dir="features169/itdInnerTypes" title="on interface">
  198. <compile files="OnInterface.java" options="-1.5">
  199. <message kind="error" line="5" text="Cannot declare new member type on 'OnInterface'. New member types can only be specified on classes (compiler limitation)"/>
  200. </compile>
  201. </ajc-test>
  202. <ajc-test dir="features169/itdInnerTypes" title="on enum">
  203. <compile files="OnEnum.java" options="-1.5">
  204. <message kind="error" line="6" text="Cannot declare new member type on 'EEE'. New member types can only be specified on classes (compiler limitation)"/>
  205. </compile>
  206. </ajc-test>
  207. <ajc-test dir="features169/itdInnerTypes" title="on annotation">
  208. <compile files="OnAnnotation.java" options="-1.5">
  209. <message kind="error" line="8" text="Cannot declare new member type on 'Anno'. New member types can only be specified on classes (compiler limitation)"/>
  210. </compile>
  211. </ajc-test>
  212. <!--
  213. <ajc-test dir="features169/itdInnerTypes" title="simplest 3">
  214. <compile files="Simplest3.java" options="-1.5"/>
  215. </ajc-test>
  216. <ajc-test dir="features169/itdInnerTypes" title="simplest 2">
  217. <compile files="Simplest2.java" options="-1.5"/>
  218. </ajc-test>
  219. <ajc-test dir="features169/itdInnerTypes" title="simplest">
  220. <compile files="Simplest.java" options="-1.5"/>
  221. </ajc-test>
  222. -->
  223. </suite>