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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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.io.File;
  13. import java.util.Iterator;
  14. import java.util.Set;
  15. import junit.framework.Test;
  16. import org.aspectj.asm.AsmManager;
  17. import org.aspectj.asm.IRelationshipMap;
  18. import org.aspectj.testing.XMLBasedAjcTestCase;
  19. public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
  20. // AspectJ1.6.1
  21. public void testGenericMarkerMatch_pr203367() { runTest("generic marker match");}
  22. // public void testSuperItds_pr134425() { runTest("super itds"); }
  23. public void testSuperItds_pr198196_1() { runTest("super itds - 2"); }
  24. public void testSuperItds_pr198196_2() { runTest("super itds - 3"); }
  25. public void testSuperItds_pr198196_3() { runTest("super itds - 4"); }
  26. // public void testDeow_pr237381_1() { runTest("ataspectj deow - 1"); }
  27. // public void testDeow_pr237381_2() { runTest("ataspectj deow - 2"); }
  28. public void testRunningBrokenCode_pr102733_2() { runTest("running broken code - 2"); }
  29. public void testRunningBrokenCode_pr102733() { runTest("running broken code"); }
  30. public void testErrorOnNonabstractGenericAtAspectJAspect_pr168982() { runTest("error on non-abstract generic ataspectj aspect");}
  31. public void testIgnoringTypeLevelSuppression_pr234933() { runTest("ignoring type level suppress");}
  32. public void testDuplicateMethodSignature_pr223226_2() { runTest("duplicate method signature - 2"); }
  33. public void testDuplicateMethodSignature_pr223226() { runTest("duplicate method signature"); }
  34. public void testProtectedMethodsAroundAdvice_pr197719_2() { runTest("protected methods and around advice - again - 2");}
  35. public void testProtectedMethodsAroundAdvice_pr197719() { runTest("protected methods and around advice - again");}
  36. public void testProtectedMethodsAroundAdvice_pr230075() { runTest("protected methods and around advice");}
  37. public void testFinalStringsAnnotationPointcut_pr174385() { runTest("static strings in annotation pointcuts");}
  38. public void testComplexBoundsGenericAspect_pr199130_1() { runTest("complex bounds on generic aspect - 1");}
  39. public void testComplexBoundsGenericAspect_pr199130_2() { runTest("complex bounds on generic aspect - 2");}
  40. public void testComplexBoundsGenericAspect_pr199130_3() { runTest("complex bounds on generic aspect - 3");}
  41. public void testPrivilegedGenericAspect_pr235505() { runTest("privileged generic aspect");}
  42. public void testPrivilegedGenericAspect_pr235505_2() { runTest("privileged generic aspect - 2");}
  43. public void testParsingAroundNoReturn_pr64222() { runTest("parsing around advice no return");}
  44. public void testParsingBeforeArrayRef_pr159268() { runTest("before array name");}
  45. public void testGenericAspectAroundAdvice_pr226201() { runTest("generic aspect around advice");}
  46. public void testCrazyGenericsInnerTypes_pr235829() { runTest("crazy generics and inner types");}
  47. public void testAnnotationExposureGenerics_pr235597() { runTest("annotation exposure and generics");}
  48. public void testIncorrectRelationship_pr235204() {
  49. runTest("incorrect call relationship");
  50. IRelationshipMap irm = AsmManager.getDefault().getRelationshipMap();
  51. Set entries = irm.getEntries();
  52. boolean gotSomethingValid = false;
  53. String expected = "<recursivepackage{RecursiveCatcher.java}RecursiveCatcher~recursiveCall~I?method-call(void recursivepackage.RecursiveCatcher.recursiveCall(int))";
  54. for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
  55. String str = (String) iterator.next();
  56. if (str.indexOf(expected)!=-1) gotSomethingValid = true;
  57. }
  58. if (!gotSomethingValid) {
  59. fail("Did not find a relationship with the expected data in '"+expected+"'");
  60. }
  61. }
  62. public void testITDPrecedence_pr233838_1() { runTest("itd precedence - 1"); }
  63. public void testITDPrecedence_pr233838_2() { runTest("itd precedence - 2"); }
  64. public void testGetFieldGenerics_pr227401() { runTest("getfield problem with generics");}
  65. public void testGenericAbstractAspects_pr231478() { runTest("generic abstract aspects"); }
  66. public void testFieldJoinpointsAndAnnotationValues_pr227993() { runTest("field jp anno value"); }
  67. public void testGenericsBoundsDecp_pr231187() { runTest("generics bounds decp"); }
  68. public void testGenericsBoundsDecp_pr231187_2() { runTest("generics bounds decp - 2"); }
  69. public void testLtwInheritedCflow_pr230134() { runTest("ltw inherited cflow"); }
  70. public void testAroundAdviceOnFieldSet_pr229910() { runTest("around advice on field set"); }
  71. public void testPipelineCompilationGenericReturnType_pr226567() { runTest("pipeline compilation and generic return type"); }
  72. public static Test suite() {
  73. return XMLBasedAjcTestCase.loadSuite(Ajc161Tests.class);
  74. }
  75. protected File getSpecFile() {
  76. return new File("../tests/src/org/aspectj/systemtest/ajc161/ajc161.xml");
  77. }
  78. }