changeset 24399 | af1a0220d0fa |
parent 24072 | e7549dcbc4af |
child 30730 | d3ce7619db2c |
--- a/langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Fri May 09 23:31:05 2014 +0200 +++ b/langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Fri May 09 15:37:12 2014 -0700 @@ -26,7 +26,7 @@ * @bug 4652655 4857717 8025633 8026567 * @summary This test verifies that class cross references work properly. * @author jamieh - * @library ../lib/ + * @library ../lib * @build JavadocTester * @build TestClassCrossReferences * @run main TestClassCrossReferences @@ -34,37 +34,34 @@ public class TestClassCrossReferences extends JavadocTester { - private static final String[][] TEST = { - { "C.html", - "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/package-summary.html?is-external=true\"><code>Link to math package</code></a>"}, - { "C.html", - "<a href=\"http://java.sun.com/j2se/1.4/docs/api/javax/swing/text/AbstractDocument.AttributeContext.html?is-external=true\" " + - "title=\"class or interface in javax.swing.text\"><code>Link to AttributeContext innerclass</code></a>"}, - { "C.html", - "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigDecimal.html?is-external=true\" " + - "title=\"class or interface in java.math\"><code>Link to external class BigDecimal</code></a>"}, - { "C.html", - "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" " + - "title=\"class or interface in java.math\"><code>Link to external member gcd</code></a>"}, - { "C.html", - "<dl>\n" + - "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" + - "<dd><code>toString</code> in class <code>java.lang.Object</code></dd>\n" + - "</dl>"} - }; - private static final String[] ARGS = - new String[] { - "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, - "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api/", - SRC_DIR, SRC_DIR + "/C.java"}; + public static void main(String... args) throws Exception { + TestClassCrossReferences tester = new TestClassCrossReferences(); + tester.runTests(); + } + + @Test + void test() { + final String uri = "http://java.sun.com/j2se/1.4/docs/api/"; + + javadoc("-d", "out", + "-sourcepath", testSrc, + "-linkoffline", uri, testSrc, + testSrc("C.java")); + checkExit(Exit.OK); - /** - * The entry point of the test. - * @param args the array of command line arguments. - */ - public static void main(String[] args) { - TestClassCrossReferences tester = new TestClassCrossReferences(); - tester.run(ARGS, TEST, NO_TEST); - tester.printSummary(); + checkOutput("C.html", true, + "<a href=\"" + uri + "java/math/package-summary.html?is-external=true\">" + + "<code>Link to math package</code></a>", + "<a href=\"" + uri + "javax/swing/text/AbstractDocument.AttributeContext.html?is-external=true\" " + + "title=\"class or interface in javax.swing.text\"><code>Link to AttributeContext innerclass</code></a>", + "<a href=\"" + uri + "java/math/BigDecimal.html?is-external=true\" " + + "title=\"class or interface in java.math\"><code>Link to external class BigDecimal</code></a>", + "<a href=\"" + uri + "java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" " + + "title=\"class or interface in java.math\"><code>Link to external member gcd</code></a>", + "<dl>\n" + + "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" + + "<dd><code>toString</code> in class <code>java.lang.Object</code></dd>\n" + + "</dl>"); } + }