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.

FullyQualifiedArgumentTest.java 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /********************************************************************
  2. * Copyright (c) 2005 Contributors. All rights reserved.
  3. * This program and the accompanying materials are made available
  4. * under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution and is available at
  6. * http://eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: IBM Corporation - initial API and implementation
  9. * Helen Hawkins - iniital version
  10. *******************************************************************/
  11. package org.aspectj.tools.ajdoc;
  12. import java.io.File;
  13. import java.util.List;
  14. public class FullyQualifiedArgumentTest extends AjdocTestCase {
  15. /**
  16. * Test for pr58520
  17. */
  18. public void testPr58520() throws Exception {
  19. initialiseProject("pr119453");
  20. File[] files = {
  21. new File(getAbsoluteProjectDir() + File.separatorChar +"src/pack/C.java"),
  22. new File(getAbsoluteProjectDir() + File.separatorChar + "src/pack/A.aj")};
  23. runAjdoc("private",files);
  24. // check the contents of A.html
  25. File htmlA = new File(getAbsolutePathOutdir() + "/pack/A.html");
  26. if (!htmlA.exists()) {
  27. fail("couldn't find " + getAbsolutePathOutdir()
  28. + "/pack/A.html - were there compilation errors?");
  29. }
  30. // check the contents of the declare detail summary
  31. String[] stringsA = { "C.html#method3(java.lang.String)",
  32. "C.html#method3(String)"};
  33. List missing = AjdocOutputChecker.getMissingStringsInSection(
  34. htmlA,stringsA,"ADVICE SUMMARY");
  35. assertEquals("There should be one missing string",1,missing.size());
  36. assertEquals("The fully qualified name should appear in the argument",
  37. "C.html#method3(String)",missing.get(0));
  38. }
  39. }