TestEnclosingClass.java revision 3294:9adfb22ff08f
1116742Ssam/*
2116904Ssam * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
3178354Ssam * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4116742Ssam *
5116742Ssam * This code is free software; you can redistribute it and/or modify it
6116742Ssam * under the terms of the GNU General Public License version 2 only, as
7116742Ssam * published by the Free Software Foundation.
8116742Ssam *
9116742Ssam * This code is distributed in the hope that it will be useful, but WITHOUT
10116904Ssam * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11116904Ssam * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12116904Ssam * version 2 for more details (a copy is included in the LICENSE file that
13116904Ssam * accompanied this code).
14116742Ssam *
15116904Ssam * You should have received a copy of the GNU General Public License version
16116904Ssam * 2 along with this work; if not, write to the Free Software Foundation,
17116904Ssam * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18116904Ssam *
19116904Ssam * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20116904Ssam * or visit www.oracle.com if you need additional information or have any
21116904Ssam * questions.
22116904Ssam */
23116904Ssam
24116904Ssam/*
25116742Ssam * @test
26116742Ssam * @bug      5008230
27116742Ssam * @summary  Check the outer class when documenting enclosing class/interface.
28116742Ssam * @author   jamieh
29116742Ssam * @library  ../lib
30178354Ssam * @modules jdk.javadoc/jdk.javadoc.internal.tool
31178354Ssam * @build    JavadocTester
32116742Ssam * @run main TestEnclosingClass
33116742Ssam */
34116742Ssam
35116742Ssampublic class TestEnclosingClass extends JavadocTester {
36116742Ssam
37138568Ssam    public static void main(String... args) throws Exception {
38116742Ssam        TestEnclosingClass tester = new TestEnclosingClass();
39116742Ssam        tester.runTests();
40116742Ssam    }
41116742Ssam
42116742Ssam    @Test
43116742Ssam    void test() {
44116742Ssam        javadoc("-d", "out",
45178354Ssam                "-sourcepath", testSrc,
46178354Ssam                "pkg");
47116742Ssam        checkExit(Exit.OK);
48116742Ssam
49116742Ssam        checkOutput("pkg/MyClass.MyInterface.html", true,
50147221Ssam                "Enclosing class:");
51147221Ssam    }
52147221Ssam}
53178354Ssam