TestSmoke.java revision 3294:9adfb22ff08f
1/*
2 * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24/*
25 * @test
26 * @bug 8006735
27 * @summary  Smoke test for ensuring that annotations are emitted to javadoc
28 *
29 * @author   Mahmood Ali <mali>
30 * @library  ../../lib
31 * @modules jdk.javadoc/jdk.javadoc.internal.tool
32 * @build    JavadocTester
33 * @run main TestSmoke
34 */
35
36public class TestSmoke extends JavadocTester {
37
38    public static void main(String... args) throws Exception {
39        TestSmoke tester = new TestSmoke();
40        tester.runTests();
41    }
42
43    @Test
44    void test() {
45        javadoc("-d", "out",
46                "-private",
47                "-sourcepath", testSrc,
48                "pkg");
49        checkExit(Exit.OK);
50
51        checkOutput("pkg/T0x1C.html", true, "@DA");
52        checkOutput("pkg/T0x1D.html", true, "@DA");
53        checkOutput("pkg/T0x0D.html", true, "@DA");
54        checkOutput("pkg/T0x0B.html", true, "@DA");
55        checkOutput("pkg/T0x0F.html", true, "@DA");
56        checkOutput("pkg/T0x20B.html", true, "@DA");
57        checkOutput("pkg/T0x22B.html", true, "@DA");
58        checkOutput("pkg/T0x10.html", true, "@DA");
59        checkOutput("pkg/T0x10A.html", true, "@DA");
60        checkOutput("pkg/T0x11.html", true, "@DA");
61        checkOutput("pkg/T0x12.html", true, "@DA");
62        checkOutput("pkg/T0x13.html", true, "@DA");
63        checkOutput("pkg/T0x14.html", true, "@DA");
64        checkOutput("pkg/T0x15.html", true, "@DA");
65        checkOutput("pkg/T0x16.html", true, "@DA");
66
67        checkOutput("pkg/T0x06.html", true, "@DA");
68        checkOutput("pkg/T0x20.html", true, "@DA");
69        checkOutput("pkg/T0x20A.html", true, "@DTPA");
70        checkOutput("pkg/T0x22.html", true, "@DA");
71        checkOutput("pkg/T0x22A.html", true, "@DTPA");
72
73        checkOutput("pkg/T0x1C.html", false, "@A");
74        checkOutput("pkg/T0x1D.html", false, "@A");
75        checkOutput("pkg/T0x00.html", false, "@A");
76        checkOutput("pkg/T0x01.html", false, "@A");
77        checkOutput("pkg/T0x02.html", false, "@A");
78        checkOutput("pkg/T0x04.html", false, "@A");
79        checkOutput("pkg/T0x08.html", false, "@A");
80        checkOutput("pkg/T0x0D.html", false, "@A");
81        checkOutput("pkg/T0x06.html", false, "@A");
82        checkOutput("pkg/T0x0B.html", false, "@A");
83        checkOutput("pkg/T0x0F.html", false, "@A");
84        checkOutput("pkg/T0x20.html", false, "@A");
85        checkOutput("pkg/T0x20A.html", false, "@A");
86        checkOutput("pkg/T0x20B.html", false, "@A");
87        checkOutput("pkg/T0x22.html", false, "@A");
88        checkOutput("pkg/T0x22A.html", false, "@A");
89        checkOutput("pkg/T0x22B.html", false, "@A");
90        checkOutput("pkg/T0x10.html", false, "@A");
91        checkOutput("pkg/T0x10A.html", false, "@A");
92        checkOutput("pkg/T0x12.html", false, "@A");
93        checkOutput("pkg/T0x11.html", false, "@A");
94        checkOutput("pkg/T0x13.html", false, "@A");
95        checkOutput("pkg/T0x15.html", false, "@A");
96        checkOutput("pkg/T0x14.html", false, "@A");
97        checkOutput("pkg/T0x16.html", false, "@A");
98    }
99}
100