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

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