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.

Ajc161Tests.java 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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.ajc161;
  12. import java.util.Iterator;
  13. import java.util.Set;
  14. import org.aspectj.asm.AsmManager;
  15. import org.aspectj.asm.IRelationshipMap;
  16. import org.aspectj.testing.XMLBasedAjcTestCase;
  17. import junit.framework.Test;
  18. public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
  19. // AspectJ1.6.1
  20. public void testSignatureProcessing_pr237447() {
  21. runTest("signature processing");
  22. }
  23. public void testGenericAtAround_pr237419() {
  24. runTest("generics ataround");
  25. }
  26. public void testGenericMarkerMatch_pr203367() {
  27. runTest("generic marker match");
  28. }
  29. // public void testSuperItds_pr134425() { runTest("super itds"); }
  30. public void testSuperItds_pr198196_1() {
  31. runTest("super itds - 2");
  32. }
  33. public void testSuperItds_pr198196_2() {
  34. runTest("super itds - 3");
  35. }
  36. public void testSuperItds_pr198196_3() {
  37. runTest("super itds - 4");
  38. }
  39. public void testDeow_pr237381_1() {
  40. runTest("ataspectj deow - 1");
  41. }
  42. public void testDeow_pr237381_2() {
  43. runTest("ataspectj deow - 2");
  44. }
  45. public void testRunningBrokenCode_pr102733_2() {
  46. runTest("running broken code - 2");
  47. }
  48. public void testRunningBrokenCode_pr102733() {
  49. runTest("running broken code");
  50. }
  51. public void testErrorOnNonabstractGenericAtAspectJAspect_pr168982() {
  52. runTest("error on non-abstract generic ataspectj aspect");
  53. }
  54. public void testIgnoringTypeLevelSuppression_pr234933() {
  55. runTest("ignoring type level suppress");
  56. }
  57. public void testDuplicateMethodSignature_pr223226_2() {
  58. runTest("duplicate method signature - 2");
  59. }
  60. public void testDuplicateMethodSignature_pr223226() {
  61. runTest("duplicate method signature");
  62. }
  63. public void testProtectedMethodsAroundAdvice_pr197719_2() {
  64. runTest("protected methods and around advice - again - 2");
  65. }
  66. public void testProtectedMethodsAroundAdvice_pr197719() {
  67. runTest("protected methods and around advice - again");
  68. }
  69. public void testProtectedMethodsAroundAdvice_pr230075() {
  70. runTest("protected methods and around advice");
  71. }
  72. public void testFinalStringsAnnotationPointcut_pr174385() {
  73. runTest("static strings in annotation pointcuts");
  74. }
  75. public void testComplexBoundsGenericAspect_pr199130_1() {
  76. runTest("complex bounds on generic aspect - 1");
  77. }
  78. public void testComplexBoundsGenericAspect_pr199130_2() {
  79. runTest("complex bounds on generic aspect - 2");
  80. }
  81. public void testComplexBoundsGenericAspect_pr199130_3() {
  82. runTest("complex bounds on generic aspect - 3");
  83. }
  84. public void testPrivilegedGenericAspect_pr235505() {
  85. runTest("privileged generic aspect");
  86. }
  87. public void testPrivilegedGenericAspect_pr235505_2() {
  88. runTest("privileged generic aspect - 2");
  89. }
  90. public void testParsingAroundNoReturn_pr64222() {
  91. runTest("parsing around advice no return");
  92. }
  93. public void testParsingBeforeArrayRef_pr159268() {
  94. runTest("before array name");
  95. }
  96. public void testGenericAspectAroundAdvice_pr226201() {
  97. runTest("generic aspect around advice");
  98. }
  99. public void testCrazyGenericsInnerTypes_pr235829() {
  100. runTest("crazy generics and inner types");
  101. }
  102. public void testAnnotationExposureGenerics_pr235597() {
  103. runTest("annotation exposure and generics");
  104. }
  105. public void testIncorrectRelationship_pr235204() {
  106. runTest("incorrect call relationship");
  107. IRelationshipMap irm = AsmManager.lastActiveStructureModel.getRelationshipMap();
  108. Set entries = irm.getEntries();
  109. boolean gotSomethingValid = false;
  110. String expected = "<recursivepackage{RecursiveCatcher.java'RecursiveCatcher~recursiveCall~I?method-call(void recursivepackage.RecursiveCatcher.recursiveCall(int))";
  111. for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
  112. String str = (String) iterator.next();
  113. if (str.indexOf(expected) != -1) {
  114. gotSomethingValid = true;
  115. }
  116. }
  117. if (!gotSomethingValid) {
  118. fail("Did not find a relationship with the expected data in '" + expected + "'");
  119. }
  120. }
  121. public void testITDPrecedence_pr233838_1() {
  122. runTest("itd precedence - 1");
  123. }
  124. public void testITDPrecedence_pr233838_2() {
  125. runTest("itd precedence - 2");
  126. }
  127. public void testGetFieldGenerics_pr227401() {
  128. runTest("getfield problem with generics");
  129. }
  130. public void testGenericAbstractAspects_pr231478() {
  131. runTest("generic abstract aspects");
  132. }
  133. public void testFieldJoinpointsAndAnnotationValues_pr227993() {
  134. runTest("field jp anno value");
  135. }
  136. public void testGenericsBoundsDecp_pr231187() {
  137. runTest("generics bounds decp");
  138. }
  139. public void testGenericsBoundsDecp_pr231187_2() {
  140. runTest("generics bounds decp - 2");
  141. }
  142. public void testLtwInheritedCflow_pr230134() {
  143. runTest("ltw inherited cflow");
  144. }
  145. public void testAroundAdviceOnFieldSet_pr229910() {
  146. runTest("around advice on field set");
  147. }
  148. public void testPipelineCompilationGenericReturnType_pr226567() {
  149. runTest("pipeline compilation and generic return type");
  150. }
  151. public static Test suite() {
  152. return XMLBasedAjcTestCase.loadSuite(Ajc161Tests.class);
  153. }
  154. protected java.net.URL getSpecFile() {
  155. return getClassResource("ajc161.xml");
  156. }
  157. }