test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
author bpatel
Tue, 06 Mar 2018 10:45:47 -0800
changeset 49139 771616d26ca1
parent 47300 a905ce398074
child 53097 2e82ca64b25d
permissions -rw-r--r--
8182765: HTML5 must be the default javadoc codegen mode in the near future Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
     1
/*
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 47300
diff changeset
     2
 * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
     4
 *
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
32337
c9d3ab9f601c 8133671: langtools tests have bad license
alundblad
parents: 30730
diff changeset
     7
 * published by the Free Software Foundation.
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
     8
 *
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    13
 * accompanied this code).
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    14
 *
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    18
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 3771
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 3771
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 3771
diff changeset
    21
 * questions.
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    22
 */
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    23
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    24
/*
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    25
 * @test
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 47300
diff changeset
    26
 * @bug 6802694 8025633 8026567 8183511 8074407 8182765
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    27
 * @summary This test verifies deprecation info in serialized-form.html.
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    28
 * @author Bhavesh Patel
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    29
 * @library ../lib
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    30
 * @modules jdk.javadoc/jdk.javadoc.internal.tool
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    31
 * @build JavadocTester
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    32
 * @run main TestSerializedFormDeprecationInfo
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    33
 */
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    34
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    35
public class TestSerializedFormDeprecationInfo extends JavadocTester {
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    36
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    37
    public static void main(String... args) throws Exception {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    38
        TestSerializedFormDeprecationInfo tester = new TestSerializedFormDeprecationInfo();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    39
        tester.runTests();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    40
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    41
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    42
    @Test
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    43
    void testDefault() {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    44
        javadoc("-d", "out-default",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    45
                "-sourcepath", testSrc,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    46
                "pkg1");
41451
a847c7aa25a7 8151102: Cleanup javadoc exception handling
ksrini
parents: 36526
diff changeset
    47
        checkExit(Exit.OK);
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    48
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    49
        checkCommentDeprecated(true);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    50
        checkNoComment(false);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    51
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    52
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    53
    @Test
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    54
    void testNoComment() {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    55
        javadoc("-d", "out-nocmnt",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    56
                "-nocomment",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    57
                "-sourcepath", testSrc,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    58
                "pkg1");
41451
a847c7aa25a7 8151102: Cleanup javadoc exception handling
ksrini
parents: 36526
diff changeset
    59
        checkExit(Exit.OK);
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    60
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    61
        checkNoComment(true);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    62
        checkCommentDeprecated(false);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    63
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    64
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    65
    @Test
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    66
    void testNoDeprecated() {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    67
        javadoc("-d", "out-nodepr",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    68
                "-nodeprecated",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    69
                "-sourcepath", testSrc,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    70
                "pkg1");
41451
a847c7aa25a7 8151102: Cleanup javadoc exception handling
ksrini
parents: 36526
diff changeset
    71
        checkExit(Exit.OK);
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    72
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    73
        checkNoDeprecated(true);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    74
        checkNoCommentNoDeprecated(false);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    75
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    76
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    77
    @Test
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    78
    void testNoCommentNoDeprecated() {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    79
        javadoc("-d", "out-nocmnt-nodepr",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    80
                "-nocomment",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    81
                "-nodeprecated",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    82
                "-sourcepath", testSrc,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    83
                "pkg1");
41451
a847c7aa25a7 8151102: Cleanup javadoc exception handling
ksrini
parents: 36526
diff changeset
    84
        checkExit(Exit.OK);
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    85
        checkNoCommentNoDeprecated(true);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    86
        checkNoDeprecated(false);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    87
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    88
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    89
    // Test for normal run of javadoc. The serialized-form.html should
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
    90
    // display the inline comments, tags and deprecation information if any.
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    91
    void checkCommentDeprecated(boolean expectFound) {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    92
        checkOutput("serialized-form.html", expectFound,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    93
                "<dl>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    94
                + "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    95
                + "<dd><code>"
41451
a847c7aa25a7 8151102: Cleanup javadoc exception handling
ksrini
parents: 36526
diff changeset
    96
                + "java.io.IOException</code> - on error</dd>\n"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    97
                + "<dt><span class=\"seeLabel\">See Also:</span>"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
    98
                + "</dt>\n"
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 47300
diff changeset
    99
                + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   100
                + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   101
                + "</dl>",
47300
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   102
                "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   103
                + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 47300
diff changeset
   104
                + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
47300
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   105
                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   106
                + "</div>\n"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   107
                + "<div class=\"block\">This field indicates whether the C1 "
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   108
                + "is undecorated.</div>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   109
                + "&nbsp;\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   110
                + "<dl>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   111
                + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   112
                + "<dd>1.4</dd>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   113
                + "<dt><span class=\"seeLabel\">See Also:</span>"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   114
                + "</dt>\n"
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 47300
diff changeset
   115
                + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   116
                + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   117
                + "</dl>",
47300
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   118
                "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   119
                + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 47300
diff changeset
   120
                + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
47300
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   121
                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   122
                + "</div>\n"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   123
                + "<div class=\"block\">Reads the object stream.</div>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   124
                + "<dl>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   125
                + "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
41451
a847c7aa25a7 8151102: Cleanup javadoc exception handling
ksrini
parents: 36526
diff changeset
   126
                + "<dd><code>java.io.IOException</code> - on error</dd>\n"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   127
                + "</dl>",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   128
                "<span class=\"deprecatedLabel\">Deprecated.</span>"
47300
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   129
                + "</div>\n"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   130
                + "<div class=\"block\">"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   131
                + "The name for this class.</div>");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   132
    }
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   133
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   134
    // Test with -nocomment option. The serialized-form.html should
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   135
    // not display the inline comments and tags but should display deprecation
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   136
    // information if any.
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   137
    void checkNoComment(boolean expectFound) {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   138
        checkOutput("serialized-form.html", expectFound,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   139
                "<pre>boolean undecorated</pre>\n"
47300
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   140
                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   141
                + "<div class=\"deprecationComment\">"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   142
                + "As of JDK version 1.5, replaced by\n"
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 47300
diff changeset
   143
                + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>"
47300
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   144
                + "setUndecorated(boolean)</code></a>.</div>\n"
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   145
                + "</div>\n"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   146
                + "</li>",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   147
                "<span class=\"deprecatedLabel\">"
47300
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   148
                + "Deprecated.</span>\n"
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   149
                + "<div class=\"deprecationComment\">As of JDK version"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   150
                + " 1.5, replaced by\n"
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 47300
diff changeset
   151
                + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
47300
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   152
                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
a905ce398074 8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents: 47272
diff changeset
   153
                + "</div>\n"
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   154
                + "</li>");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   155
    }
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   156
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   157
    // Test with -nodeprecated option. The serialized-form.html should
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   158
    // ignore the -nodeprecated tag and display the deprecation info. This
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   159
    // test is similar to the normal run of javadoc in which inline comment, tags
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   160
    // and deprecation information will be displayed.
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   161
    void checkNoDeprecated(boolean expectFound) {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   162
        checkCommentDeprecated(expectFound);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   163
    }
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   164
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   165
    // Test with -nodeprecated and -nocomment options. The serialized-form.html should
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   166
    // ignore the -nodeprecated tag and display the deprecation info but should not
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   167
    // display the inline comments and tags. This test is similar to the test with
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   168
    // -nocomment option.
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   169
    void checkNoCommentNoDeprecated(boolean expectFound) {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24217
diff changeset
   170
        checkNoComment(expectFound);
2086
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   171
    }
cca2603eab0b 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
diff changeset
   172
}