TestTagInheritence.java revision 3233:b5d08bc0d224
1314818Sngie/*
2311966Sngie * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
3311966Sngie * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4311966Sngie *
5311966Sngie * This code is free software; you can redistribute it and/or modify it
6311966Sngie * under the terms of the GNU General Public License version 2 only, as
7311966Sngie * published by the Free Software Foundation.
8311966Sngie *
9311966Sngie * This code is distributed in the hope that it will be useful, but WITHOUT
10311966Sngie * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11311966Sngie * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12311966Sngie * version 2 for more details (a copy is included in the LICENSE file that
13311966Sngie * accompanied this code).
14311966Sngie *
15311966Sngie * You should have received a copy of the GNU General Public License version
16311966Sngie * 2 along with this work; if not, write to the Free Software Foundation,
17311966Sngie * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18311966Sngie *
19311966Sngie * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20311966Sngie * or visit www.oracle.com if you need additional information or have any
21311966Sngie * questions.
22311966Sngie */
23311966Sngie
24311966Sngie/*
25311966Sngie * @test
26311966Sngie * @bug     4496223 4496270 4618686 4720974 4812240 6253614 6253604
27311966Sngie * @summary <DESC>
28311966Sngie * @author  jamieh
29311966Sngie * @library ../lib
30311966Sngie * @modules jdk.javadoc
31311966Sngie * @build JavadocTester
32311966Sngie * @run main TestTagInheritence
33311966Sngie */
34311966Sngie
35311966Sngie// TODO: Inheritence should be Inheritance!   fix separately as noreg-trivial
36311966Sngiepublic class TestTagInheritence extends JavadocTester {
37311966Sngie
38311966Sngie    public static void main(String... args) throws Exception {
39311966Sngie        TestTagInheritence tester = new TestTagInheritence();
40311966Sngie        tester.runTests();
41311966Sngie    }
42311966Sngie
43311966Sngie    @Test
44311966Sngie    void test() {
45311966Sngie        javadoc("-Xdoclint:none",
46311966Sngie                "-d", "out",
47311966Sngie                "-sourcepath", testSrc,
48311966Sngie                "pkg", "firstSentence", "firstSentence2");
49311966Sngie        checkExit(Exit.OK);
50311966Sngie
51314818Sngie        //Test bad inheritDoc tag warning.
52311966Sngie        checkOutput(Output.OUT, true,
53311966Sngie                "warning - @inheritDoc used but testBadInheritDocTag() "
54311966Sngie                + "does not override or implement any method.");
55311966Sngie
56311966Sngie        //Test valid usage of inheritDoc tag.
57311966Sngie        for (int i = 1; i < 40; i++) {
58311966Sngie            checkOutput("pkg/TestTagInheritence.html", true,
59311966Sngie                    "Test " + i + " passes");
60311966Sngie        }
61311966Sngie
62311966Sngie        //First sentence test (6253614)
63311966Sngie        checkOutput("firstSentence/B.html", true,
64311966Sngie                "<div class=\"block\">First sentence.</div>");
65311966Sngie
66311966Sngie        //Another first sentence test (6253604)
67311966Sngie        checkOutput("firstSentence2/C.html", true,
68311966Sngie                "<div class=\"block\">First sentence.</div>");
69311966Sngie    }
70311966Sngie}
71311966Sngie