< prev index next >

test/langtools/jdk/javadoc/doclet/testHref/TestHref.java

Print this page




  39         TestHref tester = new TestHref();
  40         tester.runTests();
  41     }
  42 
  43     @Test
  44     public void test() {
  45         javadoc("-Xdoclint:none",
  46                 "-d", "out",
  47                 "-source", "8",
  48                 "-sourcepath", testSrc,
  49                 "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api/", testSrc,
  50                 "pkg");
  51         checkExit(Exit.OK);
  52 
  53         checkOutput("pkg/C1.html", true,
  54                 //External link.
  55                 "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,int)\"",
  56                 //Member summary table link.
  57                 "href=\"#method(int,int,java.util.ArrayList)\"",
  58                 //Anchor test.
  59                 "<a id=\"method(int,int,java.util.ArrayList)\">",
  60                 //Backward compatibility anchor test."pkg/C1.html",
  61                 "<a id=\"method(int,int,java.util.ArrayList)\">");
  62 
  63         checkOutput("pkg/C2.html", true,
  64                 //{@link} test.
  65                 "Link: <a href=\"C1.html#method(int,int,java.util.ArrayList)\">",
  66                 //@see test.
  67                 "See Also:</span></dt>\n"
  68                 + "<dd><a href=\"C1.html#method(int,int,java.util.ArrayList)\">"
  69         );
  70 
  71         checkOutput("pkg/C4.html", true,
  72                 //Header does not link to the page itself.
  73                 "Class C4&lt;E extends C4&lt;E&gt;&gt;</h1>",
  74                 //Signature does not link to the page itself.
  75                 "public abstract class <span class=\"typeNameLabel\">C4&lt;E extends C4&lt;E&gt;&gt;</span>"
  76         );
  77 
  78         checkOutput(Output.OUT, false,
  79                 "<a> tag is malformed");
  80     }
  81 
  82 }


  39         TestHref tester = new TestHref();
  40         tester.runTests();
  41     }
  42 
  43     @Test
  44     public void test() {
  45         javadoc("-Xdoclint:none",
  46                 "-d", "out",
  47                 "-source", "8",
  48                 "-sourcepath", testSrc,
  49                 "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api/", testSrc,
  50                 "pkg");
  51         checkExit(Exit.OK);
  52 
  53         checkOutput("pkg/C1.html", true,
  54                 //External link.
  55                 "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,int)\"",
  56                 //Member summary table link.
  57                 "href=\"#method(int,int,java.util.ArrayList)\"",
  58                 //Anchor test.
  59                 "<section class=\"detail\" id=\"method(int,int,java.util.ArrayList)\">");


  60 
  61         checkOutput("pkg/C2.html", true,
  62                 //{@link} test.
  63                 "Link: <a href=\"C1.html#method(int,int,java.util.ArrayList)\">",
  64                 //@see test.
  65                 "See Also:</span></dt>\n"
  66                 + "<dd><a href=\"C1.html#method(int,int,java.util.ArrayList)\">"
  67         );
  68 
  69         checkOutput("pkg/C4.html", true,
  70                 //Header does not link to the page itself.
  71                 "Class C4&lt;E extends C4&lt;E&gt;&gt;</h1>",
  72                 //Signature does not link to the page itself.
  73                 "public abstract class <span class=\"typeNameLabel\">C4&lt;E extends C4&lt;E&gt;&gt;</span>"
  74         );
  75 
  76         checkOutput(Output.OUT, false,
  77                 "<a> tag is malformed");
  78     }
  79 
  80 }
< prev index next >