langtools/test/com/sun/javadoc/testTitleInHref/TestTitleInHref.java
changeset 24072 e7549dcbc4af
parent 24071 b0845717434e
child 24399 af1a0220d0fa
equal deleted inserted replaced
24071:b0845717434e 24072:e7549dcbc4af
    32  * @run main TestTitleInHref
    32  * @run main TestTitleInHref
    33  */
    33  */
    34 
    34 
    35 public class TestTitleInHref extends JavadocTester {
    35 public class TestTitleInHref extends JavadocTester {
    36 
    36 
    37     private static final String BUG_ID = "4714257";
       
    38 
       
    39     private static final String[][] TEST = {
    37     private static final String[][] TEST = {
    40         //Test to make sure that the title shows up in a class link.
    38         //Test to make sure that the title shows up in a class link.
    41         {BUG_ID + "/pkg/Links.html",
    39         { "pkg/Links.html",
    42             "<a href=\"../pkg/Class.html\" title=\"class in pkg\">"},
    40             "<a href=\"../pkg/Class.html\" title=\"class in pkg\">"},
    43 
    41 
    44         //Test to make sure that the title shows up in an interface link.
    42         //Test to make sure that the title shows up in an interface link.
    45         {BUG_ID + "/pkg/Links.html",
    43         { "pkg/Links.html",
    46             "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">"},
    44             "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">"},
    47 
    45 
    48         //Test to make sure that the title shows up in cross link shows up
    46         //Test to make sure that the title shows up in cross link shows up
    49         {BUG_ID + "/pkg/Links.html",
    47         { "pkg/Links.html",
    50             "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/io/File.html?is-external=true\" title=\"class or interface in java.io\"><code>This is a cross link to class File</code></a>"},
    48             "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/io/File.html?is-external=true\" title=\"class or interface in java.io\"><code>This is a cross link to class File</code></a>"},
    51 
    49 
    52     };
    50     };
    53 
    51 
    54     private static final String[] ARGS = new String[] {
    52     private static final String[] ARGS = new String[] {
    55         "-d", BUG_ID, "-sourcepath", SRC_DIR,
    53         "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR,
    56         "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api",
    54         "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api",
    57         SRC_DIR, "pkg"
    55         SRC_DIR, "pkg"
    58     };
    56     };
    59 
    57 
    60     /**
    58     /**
    64     public static void main(String[] args) {
    62     public static void main(String[] args) {
    65         TestTitleInHref tester = new TestTitleInHref();
    63         TestTitleInHref tester = new TestTitleInHref();
    66         tester.run(ARGS, TEST, NO_TEST);
    64         tester.run(ARGS, TEST, NO_TEST);
    67         tester.printSummary();
    65         tester.printSummary();
    68     }
    66     }
    69 
       
    70     /**
       
    71      * {@inheritDoc}
       
    72      */
       
    73     public String getBugId() {
       
    74         return BUG_ID;
       
    75     }
       
    76 
       
    77     /**
       
    78      * {@inheritDoc}
       
    79      */
       
    80     public String getBugName() {
       
    81         return getClass().getName();
       
    82     }
       
    83 }
    67 }