langtools/test/com/sun/javadoc/testValueTag/TestValueTag.java
author jjg
Tue, 22 Apr 2014 17:57:40 -0700
changeset 24072 e7549dcbc4af
parent 24065 fc4022e50129
child 24399 af1a0220d0fa
permissions -rw-r--r--
8040903: Clean up use of BUG_ID in javadoc tests Reviewed-by: ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
     2
 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
    21
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
/*
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
 * @test
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 20264
diff changeset
    26
 * @bug      4764045 8004825 8026567
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
 * @summary  This test ensures that the value tag works in all
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
 * use cases. The explainations for each test case are written below.
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
 * @author   jamieh
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
 * @library  ../lib/
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
    31
 * @build    JavadocTester TestValueTag
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
 * @run main TestValueTag
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
public class TestValueTag extends JavadocTester {
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
    //Javadoc arguments.
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
    private static final String[] ARGS =
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
        new String[] {
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    40
            "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-tag",
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
    41
            "todo", "pkg1", "pkg2"
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
    42
        };
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
    43
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
    44
    private static final String[] ARGS1 =
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
    45
        new String[] {
15354
52a04c670c05 8004834: Add doclint support into javadoc
jjg
parents: 7681
diff changeset
    46
            "-Xdoclint:none",
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    47
            "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "-tag",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
            "todo", "pkg1", "pkg2"
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
        };
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
    //Input for string search tests.
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
    private static final String[][] TEST = {
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
        //Base case:  using @value on a constant.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    54
        { "pkg1/Class1.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
            "Result:  \"Test 1 passes\""},
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
        //Retrieve value of constant in same class.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    57
        { "pkg1/Class1.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    58
            "Result:  <a href=\"../pkg1/Class1.html#TEST_2_PASSES\">\"Test 2 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    59
        { "pkg1/Class1.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    60
            "Result:  <a href=\"../pkg1/Class1.html#TEST_3_PASSES\">\"Test 3 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    61
        { "pkg1/Class1.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    62
            "Result:  <a href=\"../pkg1/Class1.html#TEST_4_PASSES\">\"Test 4 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    63
        { "pkg1/Class1.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    64
            "Result:  <a href=\"../pkg1/Class1.html#TEST_5_PASSES\">\"Test 5 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    65
        { "pkg1/Class1.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    66
            "Result:  <a href=\"../pkg1/Class1.html#TEST_6_PASSES\">\"Test 6 passes\"</a>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
        //Retrieve value of constant in different class.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    68
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    69
            "Result:  <a href=\"../pkg1/Class1.html#TEST_7_PASSES\">\"Test 7 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    70
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    71
            "Result:  <a href=\"../pkg1/Class1.html#TEST_8_PASSES\">\"Test 8 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    72
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    73
            "Result:  <a href=\"../pkg1/Class1.html#TEST_9_PASSES\">\"Test 9 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    74
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    75
            "Result:  <a href=\"../pkg1/Class1.html#TEST_10_PASSES\">\"Test 10 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    76
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    77
            "Result:  <a href=\"../pkg1/Class1.html#TEST_11_PASSES\">\"Test 11 passes\"</a>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
        //Retrieve value of constant in different package
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    79
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    80
            "Result:  <a href=\"../pkg2/Class3.html#TEST_12_PASSES\">\"Test 12 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    81
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    82
            "Result:  <a href=\"../pkg2/Class3.html#TEST_13_PASSES\">\"Test 13 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    83
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    84
            "Result:  <a href=\"../pkg2/Class3.html#TEST_14_PASSES\">\"Test 14 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    85
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    86
            "Result:  <a href=\"../pkg2/Class3.html#TEST_15_PASSES\">\"Test 15 passes\"</a>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    87
        { "pkg1/Class2.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    88
            "Result:  <a href=\"../pkg2/Class3.html#TEST_16_PASSES\">\"Test 16 passes\"</a>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
        //Retrieve value of constant from a package page
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    90
        { "pkg2/package-summary.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    91
            "Result: <a href=\"../pkg2/Class3.html#TEST_17_PASSES\">\"Test 17 passes\"</a>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
        //Test @value tag used with custom tag.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    93
        { "pkg1/CustomTagUsage.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
    94
            "<dt><span class=\"simpleTagLabel\">Todo:</span></dt>\n" +
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 15354
diff changeset
    95
                "<dd>the value of this constant is 55.</dd>"},
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
    96
        //Test @value errors printed dues to invalid use or when used with
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
    97
        //non-constant or with bad references.
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
    98
        {ERROR_OUTPUT,"error: value does not refer to a constant\n" +
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
    99
            "     * Result:  {@value TEST_12_ERROR}"
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   100
        },
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
   101
        {ERROR_OUTPUT,"error: {@value} not allowed here\n" +
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   102
            "     * Result:  {@value}"
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   103
        },
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
   104
        {ERROR_OUTPUT,"error: value does not refer to a constant\n" +
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   105
            "     * Result:  {@value NULL}"
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   106
        },
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
   107
        {ERROR_OUTPUT,"error: {@value} not allowed here\n" +
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   108
            "     * Invalid (null): {@value}"
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   109
        },
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
   110
        {ERROR_OUTPUT,"error: {@value} not allowed here\n" +
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   111
            "     * Invalid (non-constant field): {@value}"
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   112
        },
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
   113
        {ERROR_OUTPUT,"error: value does not refer to a constant\n" +
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   114
            "     * Here is a bad value reference: {@value UnknownClass#unknownConstant}"
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   115
        },
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
   116
        {ERROR_OUTPUT,"error: reference not found\n" +
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   117
            "     * Here is a bad value reference: {@value UnknownClass#unknownConstant}"
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   118
        },
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 21478
diff changeset
   119
        {ERROR_OUTPUT,"error: {@value} not allowed here\n" +
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   120
            "     * @todo the value of this constant is {@value}"
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   121
        }
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   122
    };
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   123
    private static final String[][] TEST1 = {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
        //Test @value warning printed when used with non-constant.
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
        {WARNING_OUTPUT,"warning - @value tag (which references nonConstant) " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
            "can only be used in constants."
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
        },
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   128
        {WARNING_OUTPUT,"warning - @value tag (which references NULL) " +
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   129
            "can only be used in constants."
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   130
        },
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   131
        {WARNING_OUTPUT,"warning - @value tag (which references TEST_12_ERROR) " +
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   132
            "can only be used in constants."
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   133
        },
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
        //Test warning printed for bad reference.
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
        {WARNING_OUTPUT,"warning - UnknownClass#unknownConstant (referenced by " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
            "@value tag) is an unknown reference."
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
        },
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   138
        //Test warning printed for invalid use of @value.
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   139
        {WARNING_OUTPUT,"warning - @value tag cannot be used here."
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   140
        }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
    };
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   142
    private static final String[][] NEGATED_TEST = {
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   143
        //Base case:  using @value on a constant.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   144
        { "pkg1/Class1.html",
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   145
            "Result:  <a href=\"../pkg1/Class1.html#TEST_12_ERROR\">\"Test 12 " +
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   146
            "generates an error message\"</a>"},
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   147
    };
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
     * The entry point of the test.
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
     * @param args the array of command line arguments.
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
    public static void main(String[] args) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
        TestValueTag tester = new TestValueTag();
24065
fc4022e50129 8041150: Avoid silly use of static methods in JavadocTester
jjg
parents: 23971
diff changeset
   155
        tester.run(ARGS, TEST, NEGATED_TEST);
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   156
        checkForException(tester);
24065
fc4022e50129 8041150: Avoid silly use of static methods in JavadocTester
jjg
parents: 23971
diff changeset
   157
        tester.run(ARGS1, TEST1, NO_TEST);
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   158
        checkForException(tester);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
        tester.printSummary();
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
20264
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   162
    public static void checkForException(TestValueTag tester) {
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   163
        if (tester.getErrorOutput().contains("DocletAbortException")) {
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   164
            throw new AssertionError("javadoc threw DocletAbortException");
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   165
        }
f7527e6828bb 8004825: javadoc crash DocletAbortException
bpatel
parents: 17566
diff changeset
   166
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
}