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.

ExecutionTestCase.java 1.1KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* *******************************************************************
  2. * Copyright (c) 2003 Contributors.
  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. * Mik Kersten initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.tools.ajdoc;
  13. import java.io.File;
  14. import org.aspectj.bridge.Version;
  15. /**
  16. * @author Mik Kersten
  17. */
  18. public class ExecutionTestCase extends AjdocTestCase {
  19. public void testVersionMatch() {
  20. String ajdocVersion = Main.getVersion();
  21. String compilerVersion = Version.getText();
  22. assertTrue("version check", ajdocVersion.endsWith(compilerVersion));
  23. }
  24. public void testFailingBuild() {
  25. initialiseProject("failing-build");
  26. File file1 = new File(getAbsoluteProjectDir() + File.separatorChar + "Fail.java");
  27. String[] args = { file1.getAbsolutePath() };
  28. org.aspectj.tools.ajdoc.Main.main(args);
  29. assertTrue(Main.hasAborted());
  30. }
  31. }