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.

AfterThrowingWeaveTestCase.java 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  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. * Contributors:
  10. * PARC initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.weaver.bcel;
  13. import java.io.IOException;
  14. import org.aspectj.weaver.Advice;
  15. import org.aspectj.weaver.ResolvedType;
  16. import org.aspectj.weaver.ShadowMunger;
  17. public class AfterThrowingWeaveTestCase extends WeaveTestCase {
  18. {
  19. regenerate = false;
  20. }
  21. public AfterThrowingWeaveTestCase(String name) {
  22. super(name);
  23. }
  24. public void testAfterThrowing() throws IOException {
  25. weaveTest(getStandardTargets(), "AfterThrowing", makeAdviceAll("afterThrowing"));
  26. }
  27. public void testAfterThrowingParam() throws IOException {
  28. BcelWorld world = new BcelWorld();
  29. ShadowMunger myMunger = BcelTestUtils.shadowMunger(world,
  30. "afterThrowing(): get(* *.out) -> static void Aspect.ajc_afterThrowing_field_get(java.lang.Throwable)",
  31. Advice.ExtraArgument);
  32. ShadowMunger cm = myMunger.concretize(ResolvedType.MISSING, world, null);
  33. weaveTest(getStandardTargets(), "AfterThrowingParam", cm);
  34. }
  35. }