test/langtools/jdk/javadoc/doclet/testModifierEx/TestModifierEx.java
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 36526 langtools/test/jdk/javadoc/doclet/testModifierEx/TestModifierEx.java@3b41f1c69604
child 53097 2e82ca64b25d
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
     1
/*
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
     2
 * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
     4
 *
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
     7
 * published by the Free Software Foundation.
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
     8
 *
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    13
 * accompanied this code).
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    14
 *
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    18
 *
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    21
 * questions.
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    22
 */
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    23
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    24
/*
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    25
 * @test
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    26
 * @summary Ensure the modifiers are correct
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    27
 * @library ../lib
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    28
 * @modules jdk.javadoc/jdk.javadoc.internal.tool
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    29
 * @build JavadocTester
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    30
 * @run main TestModifierEx
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    31
 */
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    32
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    33
public class TestModifierEx extends JavadocTester {
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    34
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    35
    public static void main(String... args) throws Exception {
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    36
        TestModifierEx tester = new TestModifierEx();
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    37
        tester.runTests();
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    38
    }
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    39
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    40
    @Test
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    41
    void test1(){
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    42
        javadoc("-d", "out-1",
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    43
                "-sourcepath", testSrc,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    44
                "-package", "pkg1");
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    45
        checkExit(Exit.OK);
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    46
        checkOutput("pkg1/Abstract.html", true,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    47
                "<pre>public abstract class <span class=\"typeNameLabel\">Abstract</span>");
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    48
        checkOutput("pkg1/Interface.html", true,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    49
                "<pre>interface <span class=\"typeNameLabel\">Interface</span></pre>");
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    50
        checkOutput("pkg1/Interface.Kind.html", true,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    51
                "<pre>public static interface <span class=\"typeNameLabel\">Interface.Kind</span></pre>");
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    52
        checkOutput("pkg1/Enum.html", true,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    53
                "<pre>public enum <span class=\"typeNameLabel\">Enum</span>");
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    54
        checkOutput("pkg1/Klass.StaticEnum.html", true,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    55
                "<pre>public static enum <span class=\"typeNameLabel\">Klass.StaticEnum</span>");
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    56
    }
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    57
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
diff changeset
    58
}