langtools/test/com/sun/javadoc/testHelpFile/TestHelpFile.java
author jjg
Tue, 22 Apr 2014 17:41:11 -0700
changeset 24071 b0845717434e
parent 24065 fc4022e50129
child 24072 e7549dcbc4af
permissions -rw-r--r--
8041253: Avoid redundant synonyms of NO_TEST Reviewed-by: ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14059
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
     1
/*
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 14059
diff changeset
     2
 * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
14059
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
     4
 *
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
     7
 * published by the Free Software Foundation.
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
     8
 *
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    13
 * accompanied this code).
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    14
 *
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    18
 *
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    21
 * questions.
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    22
 */
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    23
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    24
/*
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    25
 * @test
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    26
 * @bug      7132631
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    27
 * @summary  Make sure that the help file is generated correctly.
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    28
 * @author   Bhavesh Patel
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    29
 * @library  ../lib/
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    30
 * @build    JavadocTester TestHelpFile
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    31
 * @run main TestHelpFile
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    32
 */
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    33
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    34
public class TestHelpFile extends JavadocTester {
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    35
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    36
    //Test information.
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    37
    private static final String BUG_ID = "7132631";
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    38
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    39
    //Javadoc arguments.
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    40
    private static final String[] ARGS = new String[] {
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    41
        "-d", BUG_ID, "-sourcepath", SRC_DIR,
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 14059
diff changeset
    42
            SRC_DIR + "/TestHelpFile.java"
14059
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    43
    };
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    44
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    45
    private static final String[][] TEST = {
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 14059
diff changeset
    46
        {BUG_ID + "/help-doc.html",
14059
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    47
            "<a href=\"constant-values.html\">Constant Field Values</a>"
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    48
        },
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    49
    };
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    50
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    51
    /**
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    52
     * The entry point of the test.
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    53
     * @param args the array of command line arguments.
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    54
     */
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    55
    public static void main(String[] args) {
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    56
        TestHelpFile tester = new TestHelpFile();
24071
b0845717434e 8041253: Avoid redundant synonyms of NO_TEST
jjg
parents: 24065
diff changeset
    57
        tester.run(ARGS, TEST, NO_TEST);
14059
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    58
        tester.printSummary();
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    59
    }
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    60
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    61
    /**
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    62
     * {@inheritDoc}
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    63
     */
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    64
    public String getBugId() {
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    65
        return BUG_ID;
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    66
    }
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    67
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    68
    /**
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    69
     * {@inheritDoc}
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    70
     */
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    71
    public String getBugName() {
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    72
        return getClass().getName();
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    73
    }
3bee341587fa 7132631: The help-doc.html generates an invalid link to constant-values.html
bpatel
parents:
diff changeset
    74
}