langtools/test/com/sun/javadoc/testProfiles/TestProfilesConfiguration.java
author bpatel
Fri, 18 Oct 2013 16:34:42 -0700
changeset 21478 fa4c7cda1b41
parent 19937 7dacecdfbad4
child 23971 f5ff1f5a8dee
permissions -rw-r--r--
8026567: Use meaningful style names for strong and italic styles. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     1
/*
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     2
 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     4
 *
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     8
 *
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    13
 * accompanied this code).
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    14
 *
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    18
 *
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    21
 * questions.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    22
 */
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    23
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    24
/*
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    25
 * @test
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 19937
diff changeset
    26
 * @bug      8006124 8009684 8015663 8015496 8026567
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    27
 * @summary  Test javadoc options support for profiles.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    28
 * @author   Evgeniya Stepanova
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    29
 * @library  ../lib/
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    30
 * @build    JavadocTester TestProfilesConfiguration
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    31
 * @run main TestProfilesConfiguration
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    32
 */
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    33
public class TestProfilesConfiguration extends JavadocTester {
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    34
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    35
    //Test information.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    36
    private static final String BUG_ID = "8006124-8009684";
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    37
    private static final String PROFILE_CONFIGURATION_BUG_ID = BUG_ID + "-3";
19937
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    38
    private static final String NODEPR_NOPKGS_BUG_ID = BUG_ID + "-4";
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    39
    //Javadoc arguments.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    40
    private static final String[] ARGS3 = new String[]{
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    41
        "-d", PROFILE_CONFIGURATION_BUG_ID, "-sourcepath", SRC_DIR, "-nocomment",
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    42
        "-keywords", "-Xprofilespath", SRC_DIR + FS + "profile-rtjar-includes.txt",
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    43
        "-doctitle", "Simple doctitle", "-use", "pkg3", "pkg1", "pkg2", "pkg4",
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    44
        "pkg5", "-packagesheader", "Simple packages header","pkgDeprecated"
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    45
    };
19937
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    46
    private static final String[] ARGS4 = new String[]{
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    47
        "-d", NODEPR_NOPKGS_BUG_ID, "-sourcepath", SRC_DIR, "-nocomment", "-nodeprecated",
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    48
        "-keywords", "-Xprofilespath", SRC_DIR + FS + "profile-rtjar-includes-nopkgs.txt",
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    49
        "-doctitle", "Simple doctitle", "-use", "-packagesheader", "Simple packages header",
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    50
        "pkg1", "pkg2", "pkg3", "pkg4", "pkg5", "pkgDeprecated"
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    51
    };
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    52
    private static final String[][] NODEPR_NOPKGS_TEST = {
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    53
        {NODEPR_NOPKGS_BUG_ID + FS + "overview-summary.html",
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    54
            "<ul>" + NL + "<li><a href=\"compact2-summary.html\" target=\"classFrame\">" +
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    55
            "compact2</a></li>" + NL + "<li><a href=\"compact3-summary.html\" target=\"" +
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    56
            "classFrame\">compact3</a></li>" + NL + "</ul>"
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    57
        },
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    58
        {NODEPR_NOPKGS_BUG_ID + FS + "profile-overview-frame.html",
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    59
            "<ul title=\"Profiles\">" + NL + "<li><a href=\"compact2-frame.html\" target=\"packageListFrame\">" +
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    60
            "compact2</a></li>" + NL + "<li><a href=\"compact3-frame.html\" target=\"" +
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    61
            "packageListFrame\">compact3</a></li>" + NL + "</ul>"
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    62
        }
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    63
    };
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    64
    private static final String[][] NODEPR_NOPKGS_NEGATED_TEST = {
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    65
        {NODEPR_NOPKGS_BUG_ID + FS + "overview-summary.html",
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    66
            "compact1"
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    67
        }
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    68
    };
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    69
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    70
    private static final String[][] PROFILES_CONFIGURATION_TEST = {
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    71
        //-use option test string fo profile view page
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    72
        {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html","<li>Use</li>"
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    73
        },
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    74
        //-doctitle option test string
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    75
        {PROFILE_CONFIGURATION_BUG_ID + FS + "overview-summary.html",
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    76
            "<div class=\"header\">" + NL + "<h1 class=\"title\">Simple doctitle</h1>"
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    77
        },
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    78
        //-packagesheader option test string fo profiles
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    79
        {PROFILE_CONFIGURATION_BUG_ID + FS + "profile-overview-frame.html",
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    80
            "<h1 title=\"Simple packages header\" class=\"bar\">Simple packages header</h1>"
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    81
        },
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    82
        //-keywords option test string for profiles
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    83
        {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html",
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    84
            "<meta name=\"keywords\" content=\"compact1 profile\">"
19937
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    85
        },
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    86
        //Deprecated information on a package
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    87
        {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html",
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    88
            "<h3><a href=\"pkgDeprecated/compact1-package-summary.html\" target=\"" +
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    89
            "classFrame\">pkgDeprecated</a></h3>" + NL + "<div class=\"deprecatedContent\">" +
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 19937
diff changeset
    90
            "<span class=\"deprecatedLabel\">Deprecated.</span></div>"
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    91
        }
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    92
    };
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    93
    private static final String[][] PROFILES_CONFIGURATION_NEGATED_TEST = {
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    94
        //-nocomments option test string
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    95
        {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html",
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    96
            "<div class=\"block\"><i>Class1Pkg2.</i></div>"
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    97
        }
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    98
    };
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    99
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   100
    /**
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   101
     * The entry point of the test.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   102
     *
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   103
     * @param args the array of command line arguments.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   104
     */
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   105
    public static void main(String[] args) {
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   106
        TestProfilesConfiguration tester = new TestProfilesConfiguration();
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   107
        run(tester, ARGS3, PROFILES_CONFIGURATION_TEST,
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   108
        PROFILES_CONFIGURATION_NEGATED_TEST);
19937
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
   109
        run(tester, ARGS4, NODEPR_NOPKGS_TEST,
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
   110
        NODEPR_NOPKGS_NEGATED_TEST);
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   111
        tester.printSummary();
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   112
    }
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   113
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   114
    /**
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   115
     * {@inheritDoc}
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   116
     */
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   117
    public String getBugId() {
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   118
        return BUG_ID;
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   119
    }
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   120
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   121
    /**
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   122
     * {@inheritDoc}
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   123
     */
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   124
    public String getBugName() {
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   125
        return getClass().getName();
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   126
    }
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   127
}