langtools/test/com/sun/javadoc/testSimpleTagExclude/TestSimpleTagExclude.java
changeset 24399 af1a0220d0fa
parent 24072 e7549dcbc4af
child 30730 d3ce7619db2c
equal deleted inserted replaced
24398:601a611d0aee 24399:af1a0220d0fa
    25  * @test
    25  * @test
    26  * @bug 4628181
    26  * @bug 4628181
    27  * @summary Test the parsing of the -tag option.  The user should be able to
    27  * @summary Test the parsing of the -tag option.  The user should be able to
    28  * exclude a simple tag by using -tag tagname:X
    28  * exclude a simple tag by using -tag tagname:X
    29  * @author jamieh
    29  * @author jamieh
    30  * @library ../lib/
    30  * @library ../lib
    31  * @build JavadocTester
    31  * @build JavadocTester
    32  * @build TestSimpleTagExclude
       
    33  * @run main TestSimpleTagExclude
    32  * @run main TestSimpleTagExclude
    34  */
    33  */
    35 
    34 
    36 public class TestSimpleTagExclude extends JavadocTester {
    35 public class TestSimpleTagExclude extends JavadocTester {
    37 
    36 
    38     private static final String[][] NEGATED_TEST = {
    37     public static void main(String... args) throws Exception {
    39         { "DummyClass.html", "todo"}
    38         TestSimpleTagExclude tester = new TestSimpleTagExclude();
    40     };
    39         tester.runTests();
    41     private static final String[] ARGS = new String[] {
    40     }
    42         "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-tag", "todo:X",
       
    43         SRC_DIR + "/DummyClass.java"
       
    44     };
       
    45 
    41 
    46     /**
    42     @Test
    47      * The entry point of the test.
    43     void test() {
    48      * @param args the array of command line arguments.
    44         javadoc("-d", "out",
    49      */
    45                 "-sourcepath", testSrc,
    50     public static void main(String[] args) {
    46                 "-tag", "todo:X",
    51         TestSimpleTagExclude tester = new TestSimpleTagExclude();
    47                 testSrc("DummyClass.java"));
    52         if (tester.run(ARGS, NO_TEST, NEGATED_TEST) != 0) {
    48         checkExit(Exit.OK);
    53             throw new Error("Javadoc failed to execute.");
    49 
    54         }
    50         checkOutput("DummyClass.html", false,
    55         tester.printSummary();
    51                 "todo");
    56     }
    52     }
    57 }
    53 }