langtools/test/com/sun/javadoc/testBreakIterator/TestBreakIterator.java
changeset 24399 af1a0220d0fa
parent 24072 e7549dcbc4af
child 30730 d3ce7619db2c
equal deleted inserted replaced
24398:601a611d0aee 24399:af1a0220d0fa
    27  * @summary Determine the end of the first sentence using BreakIterator.
    27  * @summary Determine the end of the first sentence using BreakIterator.
    28  * If the first sentence of "method" is parsed correctly, the test passes.
    28  * If the first sentence of "method" is parsed correctly, the test passes.
    29  * Correct Answer: "The class is empty (i.e. it has no members)."
    29  * Correct Answer: "The class is empty (i.e. it has no members)."
    30  * Wrong Answer: "The class is empty (i.e."
    30  * Wrong Answer: "The class is empty (i.e."
    31  * @author jamieh
    31  * @author jamieh
    32  * @library ../lib/
    32  * @library ../lib
    33  * @build JavadocTester
    33  * @build JavadocTester
    34  * @build TestBreakIterator
       
    35  * @run main TestBreakIterator
    34  * @run main TestBreakIterator
    36  */
    35  */
    37 
    36 
    38 public class TestBreakIterator extends JavadocTester {
    37 public class TestBreakIterator extends JavadocTester {
    39 
    38 
    40     private static final String[][] TEST = {
    39     public static void main(String... args) throws Exception {
    41         { "pkg/BreakIteratorTest.html",
    40         TestBreakIterator tester = new TestBreakIterator();
    42             "The class is empty (i.e. it has no members)."}};
    41         tester.runTests();
    43     private static final String[] ARGS =
    42     }
    44         new String[] {
       
    45             "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR,
       
    46             "-breakiterator", "pkg"};
       
    47 
    43 
    48     /**
    44     @Test
    49      * The entry point of the test.
    45     void test() {
    50      * @param args the array of command line arguments.
    46         javadoc("-d", "out",
    51      */
    47                 "-sourcepath", testSrc,
    52     public static void main(String[] args) {
    48                 "-breakiterator",
    53         TestBreakIterator tester = new TestBreakIterator();
    49                 "pkg");
    54         tester.run(ARGS, TEST, NO_TEST);
    50         checkExit(Exit.OK);
    55         tester.printSummary();
    51 
       
    52         checkOutput("pkg/BreakIteratorTest.html", true,
       
    53             "The class is empty (i.e. it has no members).");
    56     }
    54     }
    57 }
    55 }