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

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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.*;
  15. public class AfterThrowingWeaveTestCase extends WeaveTestCase {
  16. {
  17. regenerate = false;
  18. }
  19. public AfterThrowingWeaveTestCase(String name) {
  20. super(name);
  21. }
  22. public void testAfterThrowing() throws IOException {
  23. weaveTest(getStandardTargets(), "AfterThrowing", makeAdviceAll("afterThrowing"));
  24. }
  25. public void testAfterThrowingParam() throws IOException {
  26. BcelWorld world = new BcelWorld();
  27. ShadowMunger myMunger =
  28. TestUtils.shadowMunger(world,"afterThrowing(): get(* *.out) -> static void Aspect.ajc_afterThrowing_field_get(java.lang.Throwable)",
  29. Advice.ExtraArgument);
  30. ShadowMunger cm = myMunger.concretize(ResolvedType.MISSING, world, null);
  31. weaveTest(getStandardTargets(), "AfterThrowingParam", cm);
  32. }
  33. }