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.

Ajc151Tests.java 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. /*******************************************************************************
  2. * Copyright (c) 2006 IBM
  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.ajc151;
  12. import java.io.File;
  13. import java.util.Iterator;
  14. import java.util.List;
  15. import junit.framework.Test;
  16. import org.aspectj.asm.AsmManager;
  17. import org.aspectj.asm.IHierarchy;
  18. import org.aspectj.asm.IProgramElement;
  19. import org.aspectj.asm.internal.Relationship;
  20. import org.aspectj.systemtest.ajc150.GenericsTests;
  21. import org.aspectj.testing.XMLBasedAjcTestCase;
  22. public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
  23. // Some @DeclareParents testing
  24. public void testAtDecp_1() { runTest("atDecp - simple");}
  25. public void testAtDecp_2() { runTest("atDecp - annotation");}
  26. public void testAtDecp_3() { runTest("atDecp - binary interface");}
  27. public void testAtDecp_4() { runTest("atDecp - binary interface - 2");}
  28. public void testAnnotationsAndItds_pr98901() { runTest("annotations and itds");}
  29. public void testAnnotationsAndItds_pr98901_2() { runTest("annotations and itds - 2");}
  30. public void testCircularGenerics_pr133307() { runTest("circular generics");}
  31. public void testDeca() { runTest("doubly annotating a method with declare");}
  32. public void testDeca2() { runTest("doubly annotating a method with declare - 2");}
  33. public void testCrashingWithASM_pr132926_1() { runTest("crashing on annotation type resolving with asm - 1");}
  34. public void testCrashingWithASM_pr132926_2() { runTest("crashing on annotation type resolving with asm - 2");}
  35. public void testCrashingWithASM_pr132926_3() { runTest("crashing on annotation type resolving with asm - 3");}
  36. public void testGenericAdviceParameters_pr123553() { runTest("generic advice parameters");}
  37. public void testMemberTypesInGenericTypes_pr122458() { runTest("member types in generic types");}
  38. public void testMemberTypesInGenericTypes_pr122458_2() { runTest("member types in generic types - 2");}
  39. public void testNPEOnDeclareAnnotation_pr123695() { runTest("Internal nullptr exception with complex declare annotation");}
  40. public void testHasMemberPackageProblem_pr124105() { runTest("hasMember problems with packages");}
  41. public void testDifferentNumbersofTVars_pr124803() { runTest("generics and different numbers of type variables");}
  42. public void testDifferentNumbersofTVars_pr124803_2() { runTest("generics and different numbers of type variables - classes");}
  43. public void testParameterizedCollectionFieldMatching_pr124808() { runTest("parameterized collection fields matched via pointcut");}
  44. public void testGenericAspectsAndAnnotations_pr124654() { runTest("generic aspects and annotations");}
  45. public void testCallInheritedGenericMethod_pr124999() { runTest("calling inherited generic method from around advice");}
  46. public void testIncorrectlyReferencingPointcuts_pr122452() { runTest("incorrectly referencing pointcuts");}
  47. public void testIncorrectlyReferencingPointcuts_pr122452_2() { runTest("incorrectly referencing pointcuts - 2");}
  48. public void testInlinevisitorNPE_pr123901() { runTest("inlinevisitor NPE");}
  49. //public void testExposingWithintype_enh123423() { runTest("exposing withintype");}
  50. //public void testMissingImport_pr127299() { runTest("missing import gives funny message");}
  51. public void testUnusedInterfaceMessage_pr120527() { runTest("incorrect unused interface message");}
  52. public void testAtAspectInheritsAdviceWithTJPAndThis_pr125699 () { runTest("inherit advice with this() and thisJoinPoint"); }
  53. public void testAtAspectInheritsAdviceWithTJPAndThis_pr125699_2 () {runTest("inherit advice with this() and thisJoinPoint - 2"); }
  54. public void testBrokenLTW_pr128744() { runTest("broken ltw"); }
  55. public void testAtAspectNoInvalidAbsoluteTypeName_pr126560() {
  56. runTest("@AJ deow doesn't throw an invalidAbsoluteTypeName when specify type in the same package");
  57. }
  58. public void testAtAspectNoInvalidAbsoluteTypeName_pr126560_2() {
  59. runTest("@AJ deow doesn't throw an invalidAbsoluteTypeName when specify type in the same file");
  60. }
  61. public void testArrayindexoutofbounds_pr129566() {
  62. runTest("arrayindexoutofbounds");
  63. // public class SkipList<T extends Comparable> extends Object implements Set<T>, Iterable<T>
  64. GenericsTests.verifyClassSignature(ajc,"common.SkipList","<T::Ljava/lang/Comparable;>Ljava/lang/Object;Ljava/util/Set<TT;>;Ljava/lang/Iterable<TT;>;");
  65. // protected class SkipListElement<E> extends Object
  66. GenericsTests.verifyClassSignature(ajc,"common.SkipList$SkipListElement","<E:Ljava/lang/Object;>Ljava/lang/Object;");
  67. // protected class SkipListIterator<E> implements Iterator<T>
  68. GenericsTests.verifyClassSignature(ajc,"common.SkipList$SkipListIterator","<E:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/Iterator<TT;>;");
  69. }
  70. public void testMixingNumbersOfTypeParameters_pr125080() {
  71. runTest("mixing numbers of type parameters");
  72. GenericsTests.verifyClassSignature(ajc,"AspectInterface","<T:Ljava/lang/Object;S:Ljava/lang/Object;>Ljava/lang/Object;");
  73. GenericsTests.verifyClassSignature(ajc,"AbstractAspect","<T:Ljava/lang/Object;>Ljava/lang/Object;LAspectInterface<TT;Ljava/lang/Integer;>;");
  74. GenericsTests.verifyClassSignature(ajc,"ConcreteAspect","LAbstractAspect<Ljava/lang/String;>;");
  75. }
  76. public void testMixingNumbersOfTypeParameters_pr125080_2() {
  77. runTest("mixing numbers of type parameters - 2");
  78. GenericsTests.verifyClassSignature(ajc,"AspectInterface","<T:Ljava/lang/Object;S:Ljava/lang/Number;>Ljava/lang/Object;");
  79. GenericsTests.verifyClassSignature(ajc,"AbstractAspect","<T:Ljava/lang/Object;>Ljava/lang/Object;LAspectInterface<TT;Ljava/lang/Integer;>;");
  80. GenericsTests.verifyClassSignature(ajc,"ConcreteAspect","LAbstractAspect<LStudent;>;");
  81. }
  82. public void testIProgramElementMethods_pr125295() {
  83. runTest("new IProgramElement methods");
  84. IHierarchy top = AsmManager.getDefault().getHierarchy();
  85. IProgramElement pe = top.findElementForType("pkg","foo");
  86. assertNotNull("Couldn't find 'foo' element in the tree",pe);
  87. // check that the defaults return the fully qualified arg
  88. assertEquals("foo(int,java.lang.Object)",pe.toLabelString());
  89. assertEquals("C.foo(int,java.lang.Object)",pe.toLinkLabelString());
  90. assertEquals("foo(int,java.lang.Object)",pe.toSignatureString());
  91. // check that can get hold of the non qualified args
  92. assertEquals("foo(int,Object)",pe.toLabelString(false));
  93. assertEquals("C.foo(int,Object)",pe.toLinkLabelString(false));
  94. assertEquals("foo(int,Object)",pe.toSignatureString(false));
  95. IProgramElement pe2 = top.findElementForType("pkg","printParameters");
  96. assertNotNull("Couldn't find 'printParameters' element in the tree",pe2);
  97. // the argument is org.aspectj.lang.JoinPoint, check that this is added
  98. assertFalse("printParameters method should have arguments",pe2.getParameterSignatures().isEmpty());
  99. }
  100. public void testParameterizedEnum_pr126316() {
  101. runTest("E extends Enum(E) again");
  102. }
  103. public void testSwallowedException() {
  104. runTest("swallowed exceptions");
  105. }
  106. public void testAtAspectVerifyErrorWithAfterThrowingAndthisJoinPoint_pr122742() {
  107. runTest("@AJ VerifyError with @AfterThrowing and thisJoinPoint argument");
  108. }
  109. public void testAtAspectVerifyErrorWithAfterReturningAndthisJoinPoint_pr122742() {
  110. runTest("@AJ VerifyError with @AfterReturning and thisJoinPoint argument");
  111. }
  112. public void testSwallowedExceptionIgnored() {
  113. runTest("swallowed exceptions with xlint");
  114. }
  115. public void testGenericAspectWithUnknownType_pr131933() {
  116. runTest("no ClassCastException with generic aspect and unknown type");
  117. }
  118. public void testStructureModelForGenericITD_pr131932() {
  119. //AsmManager.setReporting("c:/debug.txt",true,true,true,true);
  120. runTest("structure model for generic itd");
  121. IHierarchy top = AsmManager.getDefault().getHierarchy();
  122. // get the IProgramElements corresponding to the ITDs and classes
  123. IProgramElement foo = top.findElementForLabel(top.getRoot(),
  124. IProgramElement.Kind.CLASS,"Foo");
  125. assertNotNull("Couldn't find Foo element in the tree",foo);
  126. IProgramElement bar = top.findElementForLabel(top.getRoot(),
  127. IProgramElement.Kind.CLASS,"Bar");
  128. assertNotNull("Couldn't find Bar element in the tree",bar);
  129. IProgramElement method = top.findElementForLabel(top.getRoot(),
  130. IProgramElement.Kind.INTER_TYPE_METHOD,"Bar.getFirst()");
  131. assertNotNull("Couldn't find 'Bar.getFirst()' element in the tree",method);
  132. IProgramElement field = top.findElementForLabel(top.getRoot(),
  133. IProgramElement.Kind.INTER_TYPE_FIELD,"Bar.children");
  134. assertNotNull("Couldn't find 'Bar.children' element in the tree",field);
  135. IProgramElement constructor = top.findElementForLabel(top.getRoot(),
  136. IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR,"Foo.Foo(java.util.List<T>)");
  137. assertNotNull("Couldn't find 'Foo.Foo(java.util.List<T>)' element in the tree",constructor);
  138. // check that the relationship map has 'itd method declared on bar'
  139. List matches = AsmManager.getDefault().getRelationshipMap().get(method);
  140. assertNotNull("itd Bar.getFirst() should have some relationships but does not",matches);
  141. assertTrue("method itd should have one relationship but has " + matches.size(), matches.size() == 1);
  142. List matchesTargets = ((Relationship)matches.get(0)).getTargets();
  143. assertTrue("itd Bar.getFirst() should have one target but has " + matchesTargets.size(),matchesTargets.size() == 1);
  144. IProgramElement target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0));
  145. assertEquals("target of relationship should be the Bar class but is IPE with label "
  146. + target.toLabelString(),bar,target);
  147. // check that the relationship map has 'itd field declared on bar'
  148. matches = AsmManager.getDefault().getRelationshipMap().get(field);
  149. assertNotNull("itd Bar.children should have some relationships but does not",matches);
  150. assertTrue("field itd should have one relationship but has " + matches.size(), matches.size() == 1);
  151. matchesTargets = ((Relationship)matches.get(0)).getTargets();
  152. assertTrue("itd Bar.children should have one target but has " + matchesTargets.size(),matchesTargets.size() == 1);
  153. target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0));
  154. assertEquals("target of relationship should be the Bar class but is IPE with label "
  155. + target.toLabelString(),bar,target);
  156. // check that the relationship map has 'itd constructor declared on foo'
  157. matches = AsmManager.getDefault().getRelationshipMap().get(constructor);
  158. assertNotNull("itd Foo.Foo(List<T>) should have some relationships but does not",matches);
  159. assertTrue("constructor itd should have one relationship but has " + matches.size(), matches.size() == 1);
  160. matchesTargets = ((Relationship)matches.get(0)).getTargets();
  161. assertTrue("itd Foo.Foo(List<T>) should have one target but has " + matchesTargets.size(),matchesTargets.size() == 1);
  162. target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0));
  163. assertEquals("target of relationship should be the Foo class but is IPE with label "
  164. + target.toLabelString(),foo,target);
  165. // check that the relationship map has 'bar aspect declarations method and field itd'
  166. matches = AsmManager.getDefault().getRelationshipMap().get(bar);
  167. assertNotNull("Bar should have some relationships but does not",matches);
  168. assertTrue("Bar should have one relationship but has " + matches.size(), matches.size() == 1);
  169. matchesTargets = ((Relationship)matches.get(0)).getTargets();
  170. assertTrue("Bar should have two targets but has " + matchesTargets.size(),matchesTargets.size() == 2);
  171. for (Iterator iter = matchesTargets.iterator(); iter.hasNext();) {
  172. String element = (String) iter.next();
  173. target = AsmManager.getDefault().getHierarchy().findElementForHandle(element);
  174. if (!target.equals(method) && !target.equals(field)) {
  175. fail("Expected rel target to be " + method.toLabelString() + " or " + field.toLabelString()
  176. + ", found " + target.toLabelString());
  177. }
  178. }
  179. // check that the relationship map has 'foo aspect declarations constructor itd'
  180. matches = AsmManager.getDefault().getRelationshipMap().get(foo);
  181. assertNotNull("Foo should have some relationships but does not",matches);
  182. assertTrue("Foo should have one relationship but has " + matches.size(), matches.size() == 1);
  183. matchesTargets = ((Relationship)matches.get(0)).getTargets();
  184. assertTrue("Foo should have one target but has " + matchesTargets.size(),matchesTargets.size() == 1);
  185. target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0));
  186. assertEquals("target of relationship should be the Foo.Foo(List<T>) itd but is IPE with label "
  187. + target.toLabelString(),constructor,target);
  188. }
  189. public void testDeclareAnnotationAppearsInStructureModel_pr132130() {
  190. //AsmManager.setReporting("c:/debug.txt",true,true,true,true);
  191. runTest("declare annotation appears in structure model when in same file");
  192. IHierarchy top = AsmManager.getDefault().getHierarchy();
  193. // get the IProgramElements corresponding to the different code entries
  194. IProgramElement decam = top.findElementForLabel(top.getRoot(),
  195. IProgramElement.Kind.DECLARE_ANNOTATION_AT_METHOD,"declare @method: * debit(..) : @Secured(role = \"supervisor\")");
  196. assertNotNull("Couldn't find 'declare @method' element in the tree",decam);
  197. IProgramElement method = top.findElementForLabel(top.getRoot(),
  198. IProgramElement.Kind.METHOD,"debit(long,long)");
  199. assertNotNull("Couldn't find the 'debit(long,long)' method element in the tree",method);
  200. IProgramElement decac = top.findElementForLabel(top.getRoot(),
  201. IProgramElement.Kind.DECLARE_ANNOTATION_AT_CONSTRUCTOR,"declare @constructor: BankAccount+.new(..) : @Secured(role = \"supervisor\")");
  202. assertNotNull("Couldn't find 'declare @constructor' element in the tree",decac);
  203. IProgramElement ctr = top.findElementForLabel(top.getRoot(),
  204. IProgramElement.Kind.CONSTRUCTOR,"BankAccount(java.lang.String,int)");
  205. assertNotNull("Couldn't find the 'BankAccount(String,int)' constructor element in the tree",ctr);
  206. // check that decam has a annotates relationship with the debit method
  207. List matches = AsmManager.getDefault().getRelationshipMap().get(decam);
  208. assertNotNull("'declare @method' should have some relationships but does not",matches);
  209. assertTrue("'declare @method' should have one relationships but has " + matches.size(),matches.size()==1);
  210. List matchesTargets = ((Relationship)matches.get(0)).getTargets();
  211. assertTrue("'declare @method' should have one targets but has" + matchesTargets.size(),matchesTargets.size()==1);
  212. IProgramElement target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0));
  213. assertEquals("target of relationship should be the 'debit(long,long)' method but is IPE with label "
  214. + target.toLabelString(),method,target);
  215. // check that the debit method has an annotated by relationship with the declare @method
  216. matches = AsmManager.getDefault().getRelationshipMap().get(method);
  217. assertNotNull("'debit(long,long)' should have some relationships but does not",matches);
  218. assertTrue("'debit(long,long)' should have one relationships but has " + matches.size(),matches.size()==1);
  219. matchesTargets = ((Relationship)matches.get(0)).getTargets();
  220. assertTrue("'debit(long,long)' should have one targets but has" + matchesTargets.size(),matchesTargets.size()==1);
  221. target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0));
  222. assertEquals("target of relationship should be the 'declare @method' ipe but is IPE with label "
  223. + target.toLabelString(),decam,target);
  224. // check that decac has a annotates relationship with the constructor
  225. matches = AsmManager.getDefault().getRelationshipMap().get(decac);
  226. assertNotNull("'declare @method' should have some relationships but does not",matches);
  227. assertTrue("'declare @method' should have one relationships but has " + matches.size(),matches.size()==1);
  228. matchesTargets = ((Relationship)matches.get(0)).getTargets();
  229. assertTrue("'declare @method' should have one targets but has" + matchesTargets.size(),matchesTargets.size()==1);
  230. target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0));
  231. assertEquals("target of relationship should be the 'debit(long, long)' method but is IPE with label "
  232. + target.toLabelString(),ctr,target);
  233. // check that the constructor has an annotated by relationship with the declare @constructor
  234. matches = AsmManager.getDefault().getRelationshipMap().get(ctr);
  235. assertNotNull("'debit(long, long)' should have some relationships but does not",matches);
  236. assertTrue("'debit(long, long)' should have one relationships but has " + matches.size(),matches.size()==1);
  237. matchesTargets = ((Relationship)matches.get(0)).getTargets();
  238. assertTrue("'debit(long, long)' should have one targets but has" + matchesTargets.size(),matchesTargets.size()==1);
  239. target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0));
  240. assertEquals("target of relationship should be the 'declare @method' ipe but is IPE with label "
  241. + target.toLabelString(),decac,target);
  242. }
  243. /*
  244. * @AspectJ bugs and enhancements
  245. */
  246. // public void testAtAspectInheritsAdviceWithTJPAndThis_pr125699 () {
  247. // runTest("inherit adivce with this() and thisJoinPoint");
  248. // }
  249. public void testAtAspectInheritsAbstractPointcut_pr125810 () {
  250. runTest("warning when inherited pointcut not made concrete");
  251. }
  252. public void testAtAspectDEOWInStructureModel_pr120356() {
  253. //AsmManager.setReporting("c:/debug.txt",true,true,true,true);
  254. runTest("@AJ deow appear correctly when structure model is generated");
  255. IHierarchy top = AsmManager.getDefault().getHierarchy();
  256. // get the IProgramElements corresponding to the @DeclareWarning statement
  257. // and the method it matches.
  258. IProgramElement warningMethodIPE = top.findElementForLabel(top.getRoot(),
  259. IProgramElement.Kind.METHOD,"warningMethod()");
  260. assertNotNull("Couldn't find 'warningMethod()' element in the tree",warningMethodIPE);
  261. IProgramElement atDeclareWarningIPE = top.findElementForLabel(top.getRoot(),
  262. IProgramElement.Kind.FIELD,"warning");
  263. assertNotNull("Couldn't find @DeclareWarning element in the tree",atDeclareWarningIPE);
  264. // check that the method has a matches declare relationship with @DeclareWarning
  265. List matches = AsmManager.getDefault().getRelationshipMap().get(warningMethodIPE);
  266. assertNotNull("warningMethod should have some relationships but does not",matches);
  267. assertTrue("warningMethod should have one relationships but has " + matches.size(),matches.size()==1);
  268. List matchesTargets = ((Relationship)matches.get(0)).getTargets();
  269. assertTrue("warningMethod should have one targets but has" + matchesTargets.size(),matchesTargets.size()==1);
  270. IProgramElement target = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchesTargets.get(0));
  271. assertEquals("target of relationship should be the @DeclareWarning 'warning' but is IPE with label "
  272. + target.toLabelString(),atDeclareWarningIPE,target);
  273. // check that the @DeclareWarning has a matches relationship with the warningMethod
  274. List matchedBy = AsmManager.getDefault().getRelationshipMap().get(atDeclareWarningIPE);
  275. assertNotNull("@DeclareWarning should have some relationships but does not",matchedBy);
  276. assertTrue("@DeclareWarning should have one relationship but has " + matchedBy.size(), matchedBy.size() == 1);
  277. List matchedByTargets = ((Relationship)matchedBy.get(0)).getTargets();
  278. assertTrue("@DeclareWarning 'matched by' relationship should have one target " +
  279. "but has " + matchedByTargets.size(), matchedByTargets.size() == 1);
  280. IProgramElement matchedByTarget = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchedByTargets.get(0));
  281. assertEquals("target of relationship should be the warningMethod but is IPE with label "
  282. + matchedByTarget.toLabelString(),warningMethodIPE,matchedByTarget);
  283. // get the IProgramElements corresponding to the @DeclareError statement
  284. // and the method it matches.
  285. IProgramElement errorMethodIPE = top.findElementForLabel(top.getRoot(),
  286. IProgramElement.Kind.METHOD,"badMethod()");
  287. assertNotNull("Couldn't find 'badMethod()' element in the tree",errorMethodIPE);
  288. IProgramElement atDeclarErrorIPE = top.findElementForLabel(top.getRoot(),
  289. IProgramElement.Kind.FIELD,"error");
  290. assertNotNull("Couldn't find @DeclareError element in the tree",atDeclarErrorIPE);
  291. // check that the @DeclareError has a matches relationship with the badMethod
  292. List matchedByE = AsmManager.getDefault().getRelationshipMap().get(atDeclarErrorIPE);
  293. assertNotNull("@DeclareError should have some relationships but does not",matchedByE);
  294. assertTrue("@DeclareError should have one relationship but has " + matchedByE.size(), matchedByE.size() == 1);
  295. List matchedByTargetsE = ((Relationship)matchedByE.get(0)).getTargets();
  296. assertTrue("@DeclareError 'matched by' relationship should have one target " +
  297. "but has " + matchedByTargetsE.size(), matchedByTargetsE.size() == 1);
  298. IProgramElement matchedByTargetE = AsmManager.getDefault().getHierarchy().findElementForHandle((String)matchedByTargetsE.get(0));
  299. assertEquals("target of relationship should be the badMethod but is IPE with label "
  300. + matchedByTargetE.toLabelString(),errorMethodIPE,matchedByTargetE);
  301. }
  302. public void testAtAspectNoNPEWithDEOWWithoutStructureModel_pr120356() {
  303. runTest("@AJ no NPE with deow when structure model isn't generated");
  304. }
  305. public void testAtAspectWithoutJoinPointImport_pr121616() {
  306. runTest("@AJ without JoinPoint import");
  307. }
  308. public void testAtAspectDeclareParentsRetainsFieldState_pr122370() {
  309. runTest("@AJ declare parents retains field state");
  310. }
  311. public void testAtAspectNoNPEWithPcdContainingOrThisAndWildcard_pr128237() {
  312. runTest("@AJ no npe with pointcut containing or, this and a wildcard");
  313. }
  314. /*
  315. * Load-time weaving bugs and enhancements
  316. */
  317. public void testEmptyPointcutInAtAspectJ_pr125475 () {
  318. runTest("define empty pointcut using an annotation");
  319. }
  320. public void testEmptyPointcutInAtAspectJ_pr125475_2() {
  321. runTest("define empty pointcut using an annotation - 2");
  322. }
  323. public void testEmptyPointcutInAtAspectJWithLTW_pr125475 () {
  324. runTest("define empty pointcut using aop.xml");
  325. }
  326. public void testGenericAspectsWithAnnotationTypeParameters() {
  327. runTest("Generic aspects with annotation type parameters");
  328. }
  329. public void testPointcutInterfaces_pr130869() {
  330. runTest("Pointcut interfaces");
  331. }
  332. /////////////////////////////////////////
  333. public static Test suite() {
  334. return XMLBasedAjcTestCase.loadSuite(Ajc151Tests.class);
  335. }
  336. protected File getSpecFile() {
  337. return new File("../tests/src/org/aspectj/systemtest/ajc151/ajc151.xml");
  338. }
  339. }