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.

AjdocTest.java 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* *******************************************************************
  2. * Copyright (c) 1999-2001 Xerox Corporation,
  3. * 2002 Palo Alto Research Center, Incorporated (PARC).
  4. * All rights reserved.
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Eclipse Public License v1.0
  7. * which accompanies this distribution and is available at
  8. * http://www.eclipse.org/legal/epl-v10.html
  9. *
  10. * Contributors:
  11. * Xerox/PARC initial implementation
  12. * ******************************************************************/
  13. package org.aspectj.tools.ant.taskdefs;
  14. import org.apache.tools.ant.Project;
  15. import org.apache.tools.ant.types.Path;
  16. import java.io.File;
  17. import junit.framework.TestCase;
  18. /**
  19. *
  20. */
  21. public class AjdocTest extends TestCase {
  22. public AjdocTest(String name) {
  23. super(name);
  24. }
  25. public void testSource14() {
  26. new File("bin/AjdocTest").mkdirs();
  27. Ajdoc task = new Ajdoc();
  28. Project p = new Project();
  29. task.setProject(p);
  30. task.setSource("1.4");
  31. Path ppath = new Path(p,"../taskdefs/testdata");
  32. task.setSourcepath(ppath);
  33. task.setIncludes("Ajdoc14Source.java");
  34. task.setDestdir("bin/AjdocTest");
  35. task.setClasspath(new Path(p, "../lib/test/aspectjrt.jar"));
  36. task.execute();
  37. }
  38. public void testHelp() {
  39. Ajdoc task = new Ajdoc();
  40. Project p = new Project();
  41. task.setProject(p);
  42. task.setSourcepath(new Path(p, "../taskdefs/testdata"));
  43. task.setIncludes("none");
  44. task.setDestdir("bin/AjdocTest");
  45. task.execute();
  46. }
  47. }