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.

Ajc120Tests.java 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. /* *******************************************************************
  2. * Copyright (c) 2004 IBM Corporation
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://www.eclipse.org/legal/epl-v10.html
  8. *
  9. * ******************************************************************/
  10. package org.aspectj.systemtest.ajc120;
  11. import org.aspectj.testing.XMLBasedAjcTestCase;
  12. import junit.framework.Test;
  13. public class Ajc120Tests extends XMLBasedAjcTestCase {
  14. public static Test suite() {
  15. return XMLBasedAjcTestCase.loadSuite(Ajc120Tests.class);
  16. }
  17. protected java.net.URL getSpecFile() {
  18. return getClassResource("ajc120.xml");
  19. }
  20. public void test001(){
  21. runTest("NPE in concretization error path");
  22. }
  23. public void test002(){
  24. runTest("priviledged aspects calling methods from advice");
  25. }
  26. public void test003(){
  27. runTest("No error on overloaded pointcuts in class");
  28. }
  29. public void test004(){
  30. runTest("No error on overloaded pointcuts unless binding variables");
  31. }
  32. public void test005(){
  33. runTest("Declare soft softening other exception types");
  34. }
  35. public void test006(){
  36. runTest("static method introduction on interfaces, should not be allowed");
  37. }
  38. public void test007(){
  39. runTest("External pointcut refs not resolved if named pointcut used by declare");
  40. }
  41. public void test008(){
  42. runTest("Appropriate message for 'after() thowing(Throwable th)' syntax error");
  43. }
  44. public void test009(){
  45. runTest("Ensure we don't look for source on the classpath when binary not found");
  46. }
  47. public void test010(){
  48. runTest("inner aspect containing declare soft");
  49. }
  50. public void test011(){
  51. runTest("Bad parser error recovery in advice");
  52. }
  53. public void test012(){
  54. runTest("Bad parser error recovery in java source");
  55. }
  56. public void test013(){
  57. runTest("compiler issues error on inner aspects when privilieged");
  58. }
  59. public void test014(){
  60. runTest("After throwing advice on ctors doesn't execute for inter-type decl field inits");
  61. }
  62. public void test015(){
  63. runTest("Introduced abstract method on abstract class not implemented by subtype (single source file)");
  64. }
  65. public void test016(){
  66. runTest("Introduced abstract method on abstract class with introduced concrete method (single source file)");
  67. }
  68. public void test017(){
  69. runTest("Introduced abstract method on abstract class with existing concrete method (single source file)");
  70. }
  71. public void test018(){
  72. runTest("aspect declares interface method (no modifiers)");
  73. }
  74. public void test019(){
  75. runTest("aspect declares interface method (abstract)");
  76. }
  77. public void test020(){
  78. runTest("aspect declares interface method (public abstract)");
  79. }
  80. public void test021(){
  81. runTest("Use class implementing interface via aspect (not woven together)");
  82. }
  83. public void test022(){
  84. runTest("Use class implementing interface via aspect (weave all together)");
  85. }
  86. public void test023(){
  87. runTest("Use class implementing interface via aspect (only one implementer)");
  88. }
  89. public void test024(){
  90. runTest("Erroneous exception conversion");
  91. }
  92. public void test025(){
  93. runTest("before():execution(new(..)) does not throw NoAspectBoundException");
  94. }
  95. public void test026(){
  96. runTest("Anomalous handling of inter-type declarations to abstract base classes in aspectj 1.1");
  97. }
  98. public void test027(){
  99. runTest("NPE When compiling intertype declaration");
  100. }
  101. public void test028(){
  102. runTest("declare warning on subtype constructor");
  103. }
  104. public void test029(){
  105. runTest("CatchClauseSignature has broken operation");
  106. }
  107. public void test030(){
  108. runTest("after returning with parameter: matching rules");
  109. }
  110. public void test031(){
  111. runTest("binary compatibility of advice method names - expect no error");
  112. }
  113. public void test032(){
  114. runTest("binary compatibility of advice method names - expect error");
  115. }
  116. public void test033(){
  117. runTest("binary compatibility of advice method names - expect no error");
  118. }
  119. public void test034(){
  120. runTest("mail list VerifyError with protected access");
  121. }
  122. public void test035(){
  123. runTest("Polymorphic ITD fails in CVS HEAD (From ajdt 1.1.6)");
  124. }
  125. public void test036(){
  126. runTest("ClasscastException on concretization of if(false)");
  127. }
  128. public void test037(){
  129. runTest("ClasscastException on concretization of if(false)");
  130. }
  131. public void test038(){
  132. runTest("Introduced abstract method on interface not implemented by subtype (weave altogether)");
  133. }
  134. public void test039(){
  135. runTest("declare String field on interface");
  136. }
  137. public void test040(){
  138. runTest("declare int field on interface");
  139. }
  140. public void test041(){
  141. runTest("declare Object field on interface");
  142. }
  143. public void test042(){
  144. runTest("fail in compiling aspect with overriding method introduction with different throws clause ");
  145. }
  146. public void test043(){
  147. runTest("super call in anonymous class created in around advice");
  148. }
  149. public void test044(){
  150. runTest("retitle warning to circular {advice} dependency at ...");
  151. }
  152. public void test045(){
  153. runTest("Introduce Unknown Type to class causes Null pointer exception");
  154. }
  155. public void test046(){
  156. runTest("Private members introduced via an interface are visible to the class");
  157. }
  158. public void test047(){
  159. runTest("declare precedence on a class should be a compile-time error");
  160. }
  161. public void test048(){
  162. runTest("declare precedence on a class should be a compile-time error");
  163. }
  164. public void test049(){
  165. runTest("NPE when binary weaving a ctor ITD");
  166. }
  167. public void test050(){
  168. runTest("NPE in compiler when using (an unusual) declare warning against a ctor ITD");
  169. }
  170. public void test051(){
  171. runTest("InterTypeMethodDeclaration.java:104");
  172. }
  173. public void test052(){
  174. runTest("nested uses of this() inside constructors not handled properly for initialization and preinitialization pointcuts");
  175. }
  176. public void test053(){
  177. runTest("wrong variable binding in || pointcuts");
  178. }
  179. public void test054(){
  180. runTest("error message for constructor-execution pcd");
  181. }
  182. public void test055(){
  183. runTest("weaving using an empty jar in -injars");
  184. }
  185. public void test056(){
  186. runTest("weaving using an empty jar in -aspectpath");
  187. }
  188. }