langtools/test/com/sun/javadoc/testTagOutput/TestTagOutput.java
author alundblad
Wed, 26 Aug 2015 09:02:02 +0200
changeset 32337 c9d3ab9f601c
parent 30730 d3ce7619db2c
permissions -rw-r--r--
8133671: langtools tests have bad license Summary: Dropped classpath exception from copyright notice in tests. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21023
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
     1
/*
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 24399
diff changeset
     2
 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
21023
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
     4
 *
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
32337
c9d3ab9f601c 8133671: langtools tests have bad license
alundblad
parents: 30730
diff changeset
     7
 * published by the Free Software Foundation.
21023
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
     8
 *
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    13
 * accompanied this code).
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    14
 *
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    18
 *
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    21
 * questions.
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    22
 */
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    23
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    24
/*
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    25
 * @test
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
    26
 * @bug 8026370 8026567
21023
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    27
 * @summary This test checks the generated tag output.
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    28
 * @author Bhavesh Patel
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    29
 * @library ../lib
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 24399
diff changeset
    30
 * @modules jdk.javadoc
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    31
 * @build JavadocTester
21023
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    32
 * @run main TestTagOutput
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    33
 */
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    34
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    35
public class TestTagOutput extends JavadocTester {
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    36
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    37
    public static void main(String... args) throws Exception {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    38
        TestTagOutput tester = new TestTagOutput();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    39
        tester.runTests();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    40
    }
21023
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    41
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    42
    @Test
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    43
    void test() {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    44
        javadoc("-d", "out",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    45
                "-sourcepath", testSrc,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    46
                "pkg1");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    47
        checkExit(Exit.OK);
21023
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    48
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    49
        checkOutput("pkg1/DeprecatedTag.html", true,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    50
            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    51
            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;" +
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    52
            "<span class=\"deprecationComment\">Do not use this.</span></div>");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    53
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    54
        checkOutput("pkg1/DeprecatedTag.html", false,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    55
            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated." +
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    56
            "</span>&nbsp;<span class=\"deprecationComment\"></span></div>");
21023
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    57
    }
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents:
diff changeset
    58
}