test/langtools/jdk/javadoc/doclet/testAnnotationOptional/TestAnnotationOptional.java
changeset 49139 771616d26ca1
parent 47216 71c04702a3d5
child 53097 2e82ca64b25d
equal deleted inserted replaced
49138:67912cbf784a 49139:771616d26ca1
     1 /*
     1 /*
     2  * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 8025633 8081854
    26  * @bug 8025633 8081854 8182765
    27  * @summary  Make sure that annotations types with optional elements have
    27  * @summary  Make sure that annotations types with optional elements have
    28  *           element headers
    28  *           element headers
    29  * @author   Mahmood Ali
    29  * @author   Mahmood Ali
    30  * @library  ../lib
    30  * @library  ../lib
    31  * @modules jdk.javadoc/jdk.javadoc.internal.tool
    31  * @modules jdk.javadoc/jdk.javadoc.internal.tool
    46                 "-sourcepath", testSrc,
    46                 "-sourcepath", testSrc,
    47                 "pkg");
    47                 "pkg");
    48         checkExit(Exit.OK);
    48         checkExit(Exit.OK);
    49 
    49 
    50         checkOutput("pkg/AnnotationOptional.html", true,
    50         checkOutput("pkg/AnnotationOptional.html", true,
       
    51             "<a id=\"annotation.type.element.detail\">");
       
    52     }
       
    53 
       
    54     @Test
       
    55     void test_html4() {
       
    56         javadoc("-d", "out-html4",
       
    57                 "-html4",
       
    58                 "-sourcepath", testSrc,
       
    59                 "pkg");
       
    60         checkExit(Exit.OK);
       
    61 
       
    62         checkOutput("pkg/AnnotationOptional.html", true,
    51             "<a name=\"annotation.type.element.detail\">");
    63             "<a name=\"annotation.type.element.detail\">");
    52     }
    64     }
    53 }
    65 }