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.

CompileAndRunTestCase.java 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.ajdt.internal.compiler.batch;
  13. import java.io.IOException;
  14. public class CompileAndRunTestCase extends CommandTestCase {
  15. public CompileAndRunTestCase(String name) {
  16. super(name);
  17. }
  18. public void testAround() throws IOException {
  19. checkCompile("src1/AroundA.java", NO_ERRORS);
  20. runMain("AroundAMain");
  21. }
  22. public void testInterType() throws IOException {
  23. checkCompile("src1/InterType.java", NO_ERRORS);
  24. runMain("InterType");
  25. }
  26. public void testInterTypeMethods() throws IOException {
  27. checkCompile("src1/InterTypeMethods.java", NO_ERRORS);
  28. runMain("InterTypeMethods");
  29. }
  30. public void testIf() throws IOException {
  31. checkCompile("src1/IfPcd.java", CommandTestCase.NO_ERRORS);
  32. runMain("IfPcd");
  33. }
  34. public void testDeclareParentsFail() throws IOException {
  35. checkCompile("src1/ParentsFail.java", new int[] {3, 11, 19});
  36. }
  37. public void testDeclareParents() throws IOException {
  38. checkCompile("src1/Parents.java", CommandTestCase.NO_ERRORS);
  39. runMain("Parents");
  40. }
  41. public void testPerCflow() throws IOException {
  42. checkCompile("src1/PerCflow.java", CommandTestCase.NO_ERRORS);
  43. runMain("PerCflow");
  44. }
  45. public void testPerObject() throws IOException {
  46. checkCompile("src1/PerObject.java", CommandTestCase.NO_ERRORS);
  47. runMain("PerObject");
  48. }
  49. public void testDeclareSoft() throws IOException {
  50. checkCompile("src1/DeclareSoft.java", CommandTestCase.NO_ERRORS);
  51. runMain("DeclareSoft");
  52. }
  53. public void testPrivileged() throws IOException {
  54. checkCompile("src1/Privileged.java", CommandTestCase.NO_ERRORS);
  55. runMain("Privileged");
  56. }
  57. public void testHandler() throws IOException {
  58. checkCompile("src1/Handler.java", CommandTestCase.NO_ERRORS);
  59. runMain("Handler");
  60. }
  61. public void testInterConstructors() throws IOException {
  62. checkCompile("src1/InterTypeConstructors.java", CommandTestCase.NO_ERRORS);
  63. runMain("InterTypeConstructors");
  64. }
  65. public void testAroundA1() throws IOException {
  66. checkCompile("src1/AroundA1.java", CommandTestCase.NO_ERRORS);
  67. runMain("AroundA1");
  68. }
  69. }