langtools/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java
changeset 24399 af1a0220d0fa
parent 24072 e7549dcbc4af
child 30730 d3ce7619db2c
equal deleted inserted replaced
24398:601a611d0aee 24399:af1a0220d0fa
    25  * @test
    25  * @test
    26  * @bug      4904037 8026567
    26  * @bug      4904037 8026567
    27  * @summary  The constructor comments should be surrounded by
    27  * @summary  The constructor comments should be surrounded by
    28  *           <dl></dl>.  Check for this in the output.
    28  *           <dl></dl>.  Check for this in the output.
    29  * @author   jamieh
    29  * @author   jamieh
    30  * @library  ../lib/
    30  * @library  ../lib
    31  * @build    JavadocTester
    31  * @build    JavadocTester
    32  * @build    TestConstructorIndent
       
    33  * @run main TestConstructorIndent
    32  * @run main TestConstructorIndent
    34  */
    33  */
    35 
    34 
    36 public class TestConstructorIndent extends JavadocTester {
    35 public class TestConstructorIndent extends JavadocTester {
    37 
    36 
    38     //Javadoc arguments.
    37     public static void main(String... args) throws Exception {
    39     private static final String[] ARGS = new String[] {
    38         TestConstructorIndent tester = new TestConstructorIndent();
    40         "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, SRC_DIR + "/C.java"
    39         tester.runTests();
    41     };
    40     }
    42 
    41 
    43     //Input for string search tests.
    42     @Test
    44     private static final String[][] TEST = {
    43     void test() {
    45         { "C.html", "<div class=\"block\">" +
    44         javadoc("-d", "out",
    46                  "This is just a simple constructor.</div>\n" +
    45                 "-sourcepath", testSrc,
    47                  "<dl>\n" +
    46                 testSrc("C.java"));
    48                  "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n" +
    47         checkExit(Exit.OK);
    49                  "<dd><code>i</code> - a param.</dd>\n" +
       
    50                  "</dl>"
       
    51         }
       
    52     };
       
    53 
    48 
    54     /**
    49         checkOutput("C.html", true,
    55      * The entry point of the test.
    50                 "<div class=\"block\">"
    56      * @param args the array of command line arguments.
    51                 + "This is just a simple constructor.</div>\n"
    57      */
    52                 + "<dl>\n"
    58     public static void main(String[] args) {
    53                 + "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
    59         TestConstructorIndent tester = new TestConstructorIndent();
    54                 + "<dd><code>i</code> - a param.</dd>\n"
    60         tester.run(ARGS, TEST, NO_TEST);
    55                 + "</dl>");
    61         tester.printSummary();
       
    62     }
    56     }
    63 }
    57 }