langtools/test/jdk/javadoc/doclet/testIncluded/TestIncluded.java
author ksrini
Wed, 17 Feb 2016 11:19:07 -0800
changeset 36042 885eb5258cc4
child 36271 be6ff7a50f62
permissions -rw-r--r--
8149842: javadoc incorrectly tries to get the documentation for inherited methods. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36042
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
     1
/*
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
     4
 *
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
     7
 * published by the Free Software Foundation.
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
     8
 *
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    13
 * accompanied this code).
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    14
 *
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    18
 *
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    21
 * questions.
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    22
 */
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    23
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    24
/*
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    25
 * @test
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    26
 * @bug      8149468
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    27
 * @summary  Verify that non included classes are not inspected.
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    28
 * @library  ../lib
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    29
 * @modules  jdk.javadoc/jdk.javadoc.internal.tool
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    30
 * @build    JavadocTester
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    31
 * @run main TestIncluded
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    32
 */
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    33
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    34
public class TestIncluded extends JavadocTester {
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    35
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    36
    public static void main(String... args) throws Exception {
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    37
        TestIncluded tester = new TestIncluded();
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    38
        tester.runTests();
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    39
    }
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    40
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    41
    /*
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    42
     * The arguments specify only "pkg" but "parent" sources are on the path.
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    43
     * The class parent.A utilizes a non existent taglet, that will trigger
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    44
     * an error, if doc comments are inspected.
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    45
     */
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    46
    @Test
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    47
    void test() {
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    48
        javadoc("-d", "out",
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    49
                "-Xdoclint:all",
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    50
                "-sourcepath", testSrc,
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    51
                "pkg");
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    52
        checkExit(Exit.OK);
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    53
        checkFiles(false, "parent/A.html");
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    54
    }
885eb5258cc4 8149842: javadoc incorrectly tries to get the documentation for inherited methods.
ksrini
parents:
diff changeset
    55
}