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.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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+"/>
  66. </stdout>
  67. </run>
  68. </ajc-test>
  69. <ajc-test dir="features169/itdInnerTypes/eight" title="vote - itd mixture">
  70. <compile files="Underscorer.aj Vote.java Runner.java RelatedType.java" options="-1.5"/>
  71. <run class="a.b.c.Runner">
  72. <stdout>
  73. <line text="wibble"/>
  74. <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"/>
  75. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
  76. </stdout>
  77. </run>
  78. </ajc-test>
  79. <ajc-test dir="features169/itdInnerTypes/seven" title="vote - method reference">
  80. <compile files="Underscorer.aj Vote.java Runner.java RelatedType.java" options="-1.5"/>
  81. <run class="a.b.c.Runner">
  82. <stdout>
  83. <line text="wibble"/>
  84. <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"/>
  85. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
  86. </stdout>
  87. </run>
  88. </ajc-test>
  89. <ajc-test dir="features169/itdInnerTypes/six" title="vote - field reference">
  90. <compile files="Vote.java Vote_Amender.aj Runner.java RelatedType.java" options="-1.5"/>
  91. <run class="a.b.c.Runner">
  92. <stdout>
  93. <line text="wibble"/>
  94. <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"/>
  95. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
  96. </stdout>
  97. </run>
  98. </ajc-test>
  99. <ajc-test dir="features169/itdInnerTypes/five" title="vote - inner inner">
  100. <compile files="Vote.java Vote_Amender.aj Runner.java RelatedType.java" options="-1.5"/>
  101. <run class="a.b.c.Runner">
  102. <stdout>
  103. <line text="wibble"/>
  104. <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"/>
  105. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
  106. </stdout>
  107. </run>
  108. </ajc-test>
  109. <ajc-test dir="features169/itdInnerTypes/four" title="vote - reference via annotation - two">
  110. <compile files="Vote.java Vote_Amender.aj Runner.java RelatedType.java" options="-1.5"/>
  111. <run class="a.b.c.Runner">
  112. <stdout>
  113. <line text="wibble"/>
  114. <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"/>
  115. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
  116. </stdout>
  117. </run>
  118. </ajc-test>
  119. <ajc-test dir="features169/itdInnerTypes/three" title="vote - reference via annotation">
  120. <compile files="Vote.java Vote_Amender.aj Runner.java RelatedType.java" options="-1.5"/>
  121. <run class="a.b.c.Runner">
  122. <stdout>
  123. <line text="wibble"/>
  124. <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"/>
  125. <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_.class)" vm="9+"/>
  126. </stdout>
  127. </run>
  128. </ajc-test>
  129. <ajc-test dir="features169/itdInnerTypes/two" title="vote - construction">
  130. <compile files="Vote.java Vote_Amender.aj Runner.java" options="-1.5"/>
  131. <run class="a.b.c.Runner">
  132. <stdout>
  133. <line text="wibble"/>
  134. </stdout>
  135. </run>
  136. </ajc-test>
  137. <ajc-test dir="features169/itdInnerTypes/one" title="vote - basic">
  138. <compile files="Vote.java Vote_Amender.aj Runner.java" options="-1.5"/>
  139. <run class="a.b.c.Runner"/>
  140. </ajc-test>
  141. <ajc-test dir="features169/itdInnerTypes" title="choice - generics 1">
  142. <compile files="ChoiceGenerics1.java" options="-1.5"/>
  143. </ajc-test>
  144. <ajc-test dir="features169/itdInnerTypes" title="choice - generics 2">
  145. <compile files="ChoiceGenerics2.java" options="-1.5">
  146. <message kind="error" text="Type mismatch: cannot convert from String to Integer"/>
  147. </compile>
  148. </ajc-test>
  149. <ajc-test dir="features169/itdInnerTypes" title="choice">
  150. <compile files="Choice.java" options="-1.5"/>
  151. <run class="Choice">
  152. <stdout>
  153. <line text="null"/>
  154. </stdout></run>
  155. </ajc-test>
  156. <ajc-test dir="features169/itdInnerTypes" title="choice - weaveinfo">
  157. <compile files="Choice.java" options="-1.5 -showWeaveInfo">
  158. <message kind="weave" text="Type 'Choice' (Choice.java) has intertyped member class from 'X' (Choice.java)"/>
  159. </compile>
  160. </ajc-test>
  161. <ajc-test dir="features169/itdInnerTypes" title="choice - model">
  162. <compile files="Choice.java" options="-1.5 -emacssym"/>
  163. </ajc-test>
  164. <ajc-test dir="features169/itdInnerTypes" title="choice2">
  165. <compile files="Choice2.java" options="-1.5"/>
  166. <run class="Choice2">
  167. <stdout>
  168. <line text="null"/>
  169. </stdout></run>
  170. </ajc-test>
  171. <ajc-test dir="features169/itdInnerTypes" title="field access">
  172. <compile files="FieldAccess.java" options="-1.5"/>
  173. <run class="FieldAccess">
  174. <stdout>
  175. <line text="42"/>
  176. </stdout></run>
  177. </ajc-test>
  178. <ajc-test dir="features169/itdInnerTypes" title="method access">
  179. <compile files="MethodCall.java" options="-1.5"/>
  180. <run class="MethodCall">
  181. <stdout>
  182. <line text="42"/>
  183. </stdout></run>
  184. </ajc-test>
  185. <ajc-test dir="features169/itdInnerTypes" title="only static">
  186. <compile files="OnlyStatic.java" options="-1.5">
  187. <message kind="error" line="5" text="Intertype declared member types can only be static (compiler limitation)"/>
  188. </compile>
  189. </ajc-test>
  190. <ajc-test dir="features169/itdInnerTypes" title="on interface">
  191. <compile files="OnInterface.java" options="-1.5">
  192. <message kind="error" line="5" text="Cannot declare new member type on 'OnInterface'. New member types can only be specified on classes (compiler limitation)"/>
  193. </compile>
  194. </ajc-test>
  195. <ajc-test dir="features169/itdInnerTypes" title="on enum">
  196. <compile files="OnEnum.java" options="-1.5">
  197. <message kind="error" line="6" text="Cannot declare new member type on 'EEE'. New member types can only be specified on classes (compiler limitation)"/>
  198. </compile>
  199. </ajc-test>
  200. <ajc-test dir="features169/itdInnerTypes" title="on annotation">
  201. <compile files="OnAnnotation.java" options="-1.5">
  202. <message kind="error" line="8" text="Cannot declare new member type on 'Anno'. New member types can only be specified on classes (compiler limitation)"/>
  203. </compile>
  204. </ajc-test>
  205. <!--
  206. <ajc-test dir="features169/itdInnerTypes" title="simplest 3">
  207. <compile files="Simplest3.java" options="-1.5"/>
  208. </ajc-test>
  209. <ajc-test dir="features169/itdInnerTypes" title="simplest 2">
  210. <compile files="Simplest2.java" options="-1.5"/>
  211. </ajc-test>
  212. <ajc-test dir="features169/itdInnerTypes" title="simplest">
  213. <compile files="Simplest.java" options="-1.5"/>
  214. </ajc-test>
  215. -->
  216. </suite>