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 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 testAnnotationExposureGenerics_pr235597() { runTest("annotation exposure and generics");}
  22. public void testIncorrectRelationship_pr235204() {
  23. runTest("incorrect call relationship");
  24. IRelationshipMap irm = AsmManager.getDefault().getRelationshipMap();
  25. Set entries = irm.getEntries();
  26. String gotit = "";
  27. for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
  28. Object object = (Object) iterator.next();
  29. gotit = (String) object;
  30. break;
  31. }
  32. if (gotit.indexOf("method-call") == -1) {
  33. String expected = "<recursivepackage{RecursiveCatcher.java}RecursiveCatcher~recursiveCall~I?method-call(void recursivepackage.RecursiveCatcher.recursiveCall(int))";
  34. fail("Expected '" + expected + "' but got '" + gotit + "'");
  35. }
  36. }
  37. public void testITDPrecedence_pr233838_1() { runTest("itd precedence - 1"); }
  38. public void testITDPrecedence_pr233838_2() { runTest("itd precedence - 2"); }
  39. public void testGetFieldGenerics_pr227401() { runTest("getfield problem with generics");}
  40. public void testGenericAbstractAspects_pr231478() { runTest("generic abstract aspects"); }
  41. public void testFieldJoinpointsAndAnnotationValues_pr227993() { runTest("field jp anno value"); }
  42. public void testGenericsBoundsDecp_pr231187() { runTest("generics bounds decp"); }
  43. public void testGenericsBoundsDecp_pr231187_2() { runTest("generics bounds decp - 2"); }
  44. public void testLtwInheritedCflow_pr230134() { runTest("ltw inherited cflow"); }
  45. public void testAroundAdviceOnFieldSet_pr229910() { runTest("around advice on field set"); }
  46. public void testPipelineCompilationGenericReturnType_pr226567() { runTest("pipeline compilation and generic return type"); }
  47. public static Test suite() {
  48. return XMLBasedAjcTestCase.loadSuite(Ajc161Tests.class);
  49. }
  50. protected File getSpecFile() {
  51. return new File("../tests/src/org/aspectj/systemtest/ajc161/ajc161.xml");
  52. }
  53. }