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

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