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.

TraceJarWeaveTestCase.java 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 Common Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://www.eclipse.org/legal/cpl-v10.html
  8. *
  9. * Contributors:
  10. * Xerox/PARC initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.weaver.bcel;
  13. import java.io.IOException;
  14. public class TraceJarWeaveTestCase extends WeaveTestCase {
  15. {
  16. regenerate = false;
  17. }
  18. public TraceJarWeaveTestCase(String name) {
  19. super(name);
  20. }
  21. public void testTraceJar() throws IOException {
  22. world = new BcelWorld(getTraceJar());
  23. BcelWeaver weaver = new BcelWeaver(world);
  24. weaver.addLibraryAspect("MyTrace");
  25. UnwovenClassFile classFile = makeUnwovenClassFile(classDir, "DynamicHelloWorld", outDir);
  26. weaver.addClassFile(classFile);
  27. weaver.prepareForWeave();
  28. weaveTestInner(weaver, classFile, "DynamicHelloWorld", "TraceJarHello");
  29. }
  30. }