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.

Ajc162Tests.java 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. /*******************************************************************************
  2. * Copyright (c) 2008 Contributors
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors:
  9. * Andy Clement - initial API and implementation
  10. *******************************************************************************/
  11. package org.aspectj.systemtest.ajc162;
  12. import org.aspectj.testing.XMLBasedAjcTestCase;
  13. import junit.framework.Test;
  14. public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
  15. // AspectJ1.6.2
  16. // When faulting in the binary hierarchy:
  17. // <root> [java source file]
  18. // Clazz.java [java source file] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\Clazz.java:1::0
  19. // import declarations [import reference]
  20. // Clazz [class] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\Clazz.java:1::13
  21. // foo() [method] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\Clazz.java:2::36
  22. // Asp.class (binary) [class] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\binaryaspect.jar!Asp.class:1::0
  23. // import declarations [import reference]
  24. // Asp [aspect] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\binaryaspect.jar!Asp.class:1::0
  25. // before(): <anonymous pointcut> [advice] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\binaryaspect.jar!Asp.class:2::0
  26. // Hid:1:(targets=1) [Asp.class (binary)}Asp&before (advises) {Clazz.java[Clazz~foo
  27. // Hid:2:(targets=1) {Clazz.java[Clazz~foo (advised by) [Asp.class (binary)}Asp&before
  28. // without faulting in the model they stop at the top level (the class level)
  29. // Hid:1:(targets=1) "{Clazz.java[Clazz~foo" (advised by) "{Asp.class"
  30. // Hid:2:(targets=1) "{Asp.class" (advises) "{Clazz.java[Clazz~foo"
  31. // what I want for the hid is:
  32. // <somethingIndicatingBinary>"[Asp.class}Asp&before"
  33. /*
  34. * public void testBinaryAspectModeling() throws Exception { runTest("binary aspects model");
  35. * AsmManager.dumptree(AsmManager.getDefault().getHierarchy().getRoot(), 0); PrintWriter pw = new PrintWriter(System.out);
  36. * AsmManager.getDefault().dumprels(pw); pw.flush(); }
  37. */
  38. public void testPerClause() {
  39. runTest("ltw perclause");
  40. }
  41. public void testNullDelegateForArray_pr247683() {
  42. runTest("null delegate for array");
  43. }
  44. public void testPerClause2() {
  45. runTest("ltw perclause - 2");
  46. }
  47. public void testPerClause3() {
  48. runTest("ltw perclause - 3");
  49. }
  50. public void testPerClause4_IncorrectPerClause() {
  51. runTest("ltw perclause - 4");
  52. }
  53. public void testAnnoValueBinding_pr246264() {
  54. runTest("anno value binding");
  55. }
  56. public void testAroundAdviceProceed_pr211607() {
  57. runTest("around advice proceed");
  58. }
  59. // public void testAdvisingInterfaces_pr163005() { runTest("advising joinpoints in interfaces"); }
  60. public void testChainedItds_pr176905() {
  61. runTest("chained itds");
  62. }
  63. public void testDecAtAnnoDecP_pr198341() {
  64. runTest("dec atanno and decp");
  65. }
  66. public void testMissingMarkers_pr197720() {
  67. runTest("missing markers on inherited annotated method");
  68. }
  69. public void testLostGenericsSigOnItd_pr211146() {
  70. runTest("lost generic sig on itd");
  71. }
  72. public void testLostGenericsSigOnItd_pr211146_2() {
  73. runTest("lost generic sig on itd - 2");
  74. }
  75. public void testLostGenericsSigOnItd_pr211146_3() {
  76. runTest("lost generic sig on itd - 3");
  77. }
  78. public void testLostGenericsSigOnItd_pr211146_4() {
  79. runTest("lost generic sig on itd - 4");
  80. }
  81. public void testLostGenericsSigOnItd_pr211146_5() {
  82. runTest("lost generic sig on itd - 5");
  83. }
  84. public void testMissingContext_pr194429() {
  85. runTest("missing context");
  86. }
  87. public void testWarningsForLimitations_pr210114() {
  88. runTest("warnings for limitations");
  89. }
  90. public void testPTW_pr244830() {
  91. runTest("ptw initFailureCause");
  92. }
  93. public void testGenericItdsOverrides_pr222648() {
  94. runTest("generic itds - overrides");
  95. }
  96. public void testGenericItdsOverrides_pr222648_2() {
  97. runTest("generic itds - overrides - 2");
  98. }
  99. public void testItdCallingGenericMethod_pr145391() {
  100. runTest("itd calling generic method");
  101. }
  102. public void testItdCallingGenericMethod_pr145391_2() {
  103. runTest("itd calling generic method - 2");
  104. }
  105. public void testPublicPointcut_pr239539() {
  106. runTest("public pointcut");
  107. }
  108. public void testGenericDecp_pr241047() {
  109. runTest("generic decp");
  110. }
  111. public void testGenericDecp_pr241047_2() {
  112. runTest("generic decp - 2");
  113. }
  114. public void testGenericItds_pr242797_1() {
  115. runTest("generic itds - 1");
  116. }
  117. public void testGenericItds_pr242797_2() {
  118. runTest("generic itds - 2");
  119. }
  120. public void testGenericItds_pr242797_3() {
  121. runTest("generic itds - 3");
  122. }
  123. public void testPrivilegedGenerics_pr240693() {
  124. runTest("privileged generics");
  125. }
  126. // public void testParamAnnosPipelining_pr241847() { runTest("param annos pipelining");}
  127. // public void testParamAnnoInner_pr241861() {
  128. // runTest("param annotation inner class");
  129. // }
  130. // public void testParamAnnoInner_pr241861_2() {
  131. // runTest("param annotation inner class - 2");
  132. // }
  133. // public void testParamAnnoInner_pr241861_3() {
  134. // runTest("param annotation inner class - 3");
  135. // }
  136. public void testAnnotationDecp_pr239441() {
  137. runTest("annotation decp");
  138. }
  139. public void testAtAspectJPerTarget_pr198181() {
  140. runTest("ataspectj ltw pertarget");
  141. }
  142. public void testAnnotationValueDecp_pr238992() {
  143. runTest("annotation value decp");
  144. }
  145. public void testAnnotationValueDecp_pr238992_2() {
  146. runTest("annotation value decp - 2");
  147. }
  148. public void testAnnotationValueDecp_pr238992_3() {
  149. runTest("annotation value decp - 3");
  150. }
  151. public void testAnnotationValueDecp_pr238992_4() {
  152. runTest("annotation value decp - 4");
  153. }
  154. public void testAnnotationValueDecp_pr238992_5() {
  155. runTest("annotation value decp - 5");
  156. }
  157. /*
  158. * test plan execution((..,String,..)) args(..,String,..)
  159. *
  160. * @args(..,Foo,..)
  161. */
  162. // public void testParameterSubsettingMatching_pr233718_Matching() { runTest("parameter subsetting - matching");}
  163. // public void testParameterSubsettingMatching_pr233718_ArgsMatching() { runTest("parameter subsetting - args matching");}
  164. // public void testParameterSubsettingMatching_pr233718_ArgsBinding() { runTest("parameter subsetting - args binding");}
  165. public static Test suite() {
  166. return XMLBasedAjcTestCase.loadSuite(Ajc162Tests.class);
  167. }
  168. protected java.net.URL getSpecFile() {
  169. return getClassResource("ajc162.xml");
  170. }
  171. }