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

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