langtools/test/com/sun/javadoc/testHeadings/TestHeadings.java
changeset 24072 e7549dcbc4af
parent 24071 b0845717434e
child 24399 af1a0220d0fa
equal deleted inserted replaced
24071:b0845717434e 24072:e7549dcbc4af
    32  * @run main TestHeadings
    32  * @run main TestHeadings
    33  */
    33  */
    34 
    34 
    35 public class TestHeadings extends JavadocTester {
    35 public class TestHeadings extends JavadocTester {
    36 
    36 
    37     //Test information.
       
    38     private static final String BUG_ID = "4905786-6259611";
       
    39 
       
    40     //Javadoc arguments.
    37     //Javadoc arguments.
    41     private static final String[] ARGS = new String[] {
    38     private static final String[] ARGS = new String[] {
    42         "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "-header", "Test Files",
    39         "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-use", "-header", "Test Files",
    43         "pkg1", "pkg2"
    40         "pkg1", "pkg2"
    44     };
    41     };
    45 
    42 
    46     //Input for string search tests.
    43     //Input for string search tests.
    47     private static final String[][] TEST = {
    44     private static final String[][] TEST = {
    48         //Package summary
    45         //Package summary
    49         {BUG_ID + "/pkg1/package-summary.html",
    46         { "pkg1/package-summary.html",
    50             "<th class=\"colFirst\" scope=\"col\">" +
    47             "<th class=\"colFirst\" scope=\"col\">" +
    51             "Class</th>\n" +
    48             "Class</th>\n" +
    52             "<th class=\"colLast\" scope=\"col\"" +
    49             "<th class=\"colLast\" scope=\"col\"" +
    53             ">Description</th>"
    50             ">Description</th>"
    54         },
    51         },
    55 
    52 
    56         // Class documentation
    53         // Class documentation
    57         {BUG_ID + "/pkg1/C1.html",
    54         { "pkg1/C1.html",
    58             "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n" +
    55             "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n" +
    59             "<th class=\"colLast\" scope=\"col\">Field and Description</th>"
    56             "<th class=\"colLast\" scope=\"col\">Field and Description</th>"
    60         },
    57         },
    61         {BUG_ID + "/pkg1/C1.html",
    58         { "pkg1/C1.html",
    62             "<h3>Methods inherited from class&nbsp;java.lang.Object</h3>"
    59             "<h3>Methods inherited from class&nbsp;java.lang.Object</h3>"
    63         },
    60         },
    64 
    61 
    65         // Class use documentation
    62         // Class use documentation
    66         {BUG_ID + "/pkg1/class-use/C1.html",
    63         { "pkg1/class-use/C1.html",
    67             "<th class=\"colFirst\" scope=\"col\">Package</th>\n" +
    64             "<th class=\"colFirst\" scope=\"col\">Package</th>\n" +
    68             "<th class=\"colLast\" scope=\"col\">Description</th>"
    65             "<th class=\"colLast\" scope=\"col\">Description</th>"
    69         },
    66         },
    70         {BUG_ID + "/pkg1/class-use/C1.html",
    67         { "pkg1/class-use/C1.html",
    71             "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n" +
    68             "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n" +
    72             "<th class=\"colLast\" scope=\"col\">Field and Description</th>"
    69             "<th class=\"colLast\" scope=\"col\">Field and Description</th>"
    73         },
    70         },
    74 
    71 
    75         // Deprecated
    72         // Deprecated
    76         {BUG_ID + "/deprecated-list.html",
    73         { "deprecated-list.html",
    77             "<th class=\"colOne\" scope=\"col\">Method and Description</th>"
    74             "<th class=\"colOne\" scope=\"col\">Method and Description</th>"
    78         },
    75         },
    79 
    76 
    80         // Constant values
    77         // Constant values
    81         {BUG_ID + "/constant-values.html",
    78         { "constant-values.html",
    82             "<th class=\"colFirst\" scope=\"col\">" +
    79             "<th class=\"colFirst\" scope=\"col\">" +
    83             "Modifier and Type</th>\n" +
    80             "Modifier and Type</th>\n" +
    84             "<th scope=\"col\">Constant Field</th>\n" +
    81             "<th scope=\"col\">Constant Field</th>\n" +
    85             "<th class=\"colLast\" scope=\"col\">Value</th>"
    82             "<th class=\"colLast\" scope=\"col\">Value</th>"
    86         },
    83         },
    87 
    84 
    88         // Serialized Form
    85         // Serialized Form
    89         {BUG_ID + "/serialized-form.html",
    86         { "serialized-form.html",
    90             "<h2 title=\"Package\">Package&nbsp;pkg1</h2>"
    87             "<h2 title=\"Package\">Package&nbsp;pkg1</h2>"
    91         },
    88         },
    92         {BUG_ID + "/serialized-form.html",
    89         { "serialized-form.html",
    93             "<h3>Class <a href=\"pkg1/C1.html\" title=\"class in pkg1\">" +
    90             "<h3>Class <a href=\"pkg1/C1.html\" title=\"class in pkg1\">" +
    94             "pkg1.C1</a> extends java.lang.Object implements Serializable</h3>"
    91             "pkg1.C1</a> extends java.lang.Object implements Serializable</h3>"
    95         },
    92         },
    96         {BUG_ID + "/serialized-form.html",
    93         { "serialized-form.html",
    97             "<h3>Serialized Fields</h3>"
    94             "<h3>Serialized Fields</h3>"
    98         },
    95         },
    99 
    96 
   100         // Overview Frame
    97         // Overview Frame
   101         {BUG_ID + "/overview-frame.html",
    98         { "overview-frame.html",
   102             "<h1 title=\"Test Files\" class=\"bar\">Test Files</h1>"
    99             "<h1 title=\"Test Files\" class=\"bar\">Test Files</h1>"
   103         },
   100         },
   104         {BUG_ID + "/overview-frame.html",
   101         { "overview-frame.html",
   105             "<title>Overview List</title>"
   102             "<title>Overview List</title>"
   106         },
   103         },
   107 
   104 
   108         // Overview Summary
   105         // Overview Summary
   109         {BUG_ID + "/overview-summary.html",
   106         { "overview-summary.html",
   110             "<title>Overview</title>"
   107             "<title>Overview</title>"
   111         }
   108         }
   112     };
   109     };
   113 
   110 
   114     /**
   111     /**
   118     public static void main(String[] args) {
   115     public static void main(String[] args) {
   119         TestHeadings tester = new TestHeadings();
   116         TestHeadings tester = new TestHeadings();
   120         tester.run(ARGS, TEST, NO_TEST);
   117         tester.run(ARGS, TEST, NO_TEST);
   121         tester.printSummary();
   118         tester.printSummary();
   122     }
   119     }
   123 
       
   124     /**
       
   125      * {@inheritDoc}
       
   126      */
       
   127     public String getBugId() {
       
   128         return BUG_ID;
       
   129     }
       
   130 
       
   131     /**
       
   132      * {@inheritDoc}
       
   133      */
       
   134     public String getBugName() {
       
   135         return getClass().getName();
       
   136     }
       
   137 }
   120 }