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.

PerformanceTestCase.java 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 v 2.0
  6. * which accompanies this distribution and is available at
  7. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  8. *
  9. * Contributors:
  10. * PARC initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.ajdt.internal.compiler.batch;
  13. import java.io.IOException;
  14. public class PerformanceTestCase extends CommandTestCase {
  15. public PerformanceTestCase(String name) {
  16. super(name);
  17. }
  18. // this is a nice test, but not strictly needed
  19. public void xxx_testLazyTjpOff() throws IOException {
  20. checkCompile("src1/LazyTjp.aj", NO_ERRORS);
  21. try {
  22. runMain("LazyTjp");
  23. fail("expected an exception when running without -XlazyTjp");
  24. } catch (IllegalStateException e) {
  25. // expected exception thrown when no -XlazyTjp
  26. }
  27. }
  28. public void xtestLazyTjp() throws IOException {
  29. // Pass -Xlint:error to promote the 'can not implement lazyTjp on this
  30. // joinpoint method-execution(int LazyTjp.doit3(int)) because around advice is used [Xlint:canNotImplementLazyTjp]'
  31. // into an error so that we can use checkCompiles() ability to check errors occur.
  32. // Pass -proceedOnError to ensure even though we get that message, we still get the class file on disk
  33. String sandboxName = getSandboxName();
  34. checkCompile("src1/LazyTjp.aj", new String[] {"-Xlint:error","-proceedOnError", "-1.4"}, new int[] {96}, sandboxName);
  35. runMain("LazyTjp");
  36. }
  37. }