< prev index next >

test/jdk/javadoc/doclet/testRepeatedAnnotations/TestRepeatedAnnotations.java

Print this page




   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      8005092
  27  * @summary  Test repeated annotations output.
  28  * @author   bpatel
  29  * @library  ../lib
  30  * @modules jdk.javadoc
  31  * @build    JavadocTester
  32  * @run main TestRepeatedAnnotations
  33  */
  34 
  35 public class TestRepeatedAnnotations extends JavadocTester {
  36 
  37     public static void main(String... args) throws Exception {
  38         TestRepeatedAnnotations tester = new TestRepeatedAnnotations();
  39         tester.runTests();
  40     }
  41 
  42     @Test
  43     void test() {
  44         javadoc("-d", "out",
  45                 "-sourcepath", testSrc,
  46                 "pkg", "pkg1");
  47         checkExit(Exit.OK);
  48 
  49         checkOutput("pkg/C.html", true,
  50                 "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  51                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
  52                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  53                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>",
  54                 "<a href=\"../pkg/ContaineeRegDoc.html\" "
  55                 + "title=\"annotation in pkg\">@ContaineeRegDoc</a> "
  56                 + "<a href=\"../pkg/ContaineeRegDoc.html\" "
  57                 + "title=\"annotation in pkg\">@ContaineeRegDoc</a>",
  58                 "<a href=\"../pkg/RegContainerDoc.html\" "
  59                 + "title=\"annotation in pkg\">@RegContainerDoc</a>"
  60                 + "(<a href=\"../pkg/RegContainerDoc.html#value--\">value</a>={"
  61                 + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
  62                 + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
  63                 + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
  64                 + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})",
  65                 "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  66                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
  67                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  68                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
  69                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  70                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>",
  71                 "<a href=\"../pkg/ContainerSynthDoc.html\" "
  72                 + "title=\"annotation in pkg\">@ContainerSynthDoc</a>("
  73                 + "<a href=\"../pkg/ContainerSynthDoc.html#value--\">value</a>="
  74                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  75                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>)",
  76                 "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  77                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
  78                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  79                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>");
  80 
  81         checkOutput("pkg/D.html", true,
  82                 "<a href=\"../pkg/RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>"
  83                 + "(<a href=\"../pkg/RegDoc.html#x--\">x</a>=1)",
  84                 "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
  85                 + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>=1)",
  86                 "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
  87                 + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})",
  88                 "<a href=\"../pkg/NonSynthDocContainer.html\" "
  89                 + "title=\"annotation in pkg\">@NonSynthDocContainer</a>"
  90                 + "(<a href=\"../pkg/NonSynthDocContainer.html#value--\">value</a>="
  91                 + "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>)");
  92 
  93         checkOutput("pkg1/C.html", true,
  94                 "<a href=\"../pkg1/RegContainerValDoc.html\" "
  95                 + "title=\"annotation in pkg1\">@RegContainerValDoc</a>"
  96                 + "(<a href=\"../pkg1/RegContainerValDoc.html#value--\">value</a>={"
  97                 + "<a href=\"../pkg1/RegContaineeNotDoc.html\" "
  98                 + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>,"
  99                 + "<a href=\"../pkg1/RegContaineeNotDoc.html\" "
 100                 + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>},"
 101                 + "<a href=\"../pkg1/RegContainerValDoc.html#y--\">y</a>=3)",
 102                 "<a href=\"../pkg1/ContainerValDoc.html\" "
 103                 + "title=\"annotation in pkg1\">@ContainerValDoc</a>"
 104                 + "(<a href=\"../pkg1/ContainerValDoc.html#value--\">value</a>={"
 105                 + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
 106                 + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
 107                 + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
 108                 + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
 109                 + "<a href=\"../pkg1/ContainerValDoc.html#x--\">x</a>=1)");
 110 




   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      8005092 6469562
  27  * @summary  Test repeated annotations output.
  28  * @author   bpatel
  29  * @library  ../lib
  30  * @modules jdk.javadoc
  31  * @build    JavadocTester
  32  * @run main TestRepeatedAnnotations
  33  */
  34 
  35 public class TestRepeatedAnnotations extends JavadocTester {
  36 
  37     public static void main(String... args) throws Exception {
  38         TestRepeatedAnnotations tester = new TestRepeatedAnnotations();
  39         tester.runTests();
  40     }
  41 
  42     @Test
  43     void test() {
  44         javadoc("-d", "out",
  45                 "-sourcepath", testSrc,
  46                 "pkg", "pkg1");
  47         checkExit(Exit.OK);
  48 
  49         checkOutput("pkg/C.html", true,
  50                 "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  51                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
  52                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  53                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>",
  54                 "<a href=\"../pkg/ContaineeRegDoc.html\" "
  55                 + "title=\"annotation in pkg\">@ContaineeRegDoc</a> "
  56                 + "<a href=\"../pkg/ContaineeRegDoc.html\" "
  57                 + "title=\"annotation in pkg\">@ContaineeRegDoc</a>",
  58                 "<a href=\"../pkg/RegContainerDoc.html\" "
  59                 + "title=\"annotation in pkg\">@RegContainerDoc</a>"
  60                 + "({"
  61                 + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
  62                 + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
  63                 + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
  64                 + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})",
  65                 "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  66                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
  67                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  68                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
  69                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  70                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>",
  71                 "<a href=\"../pkg/ContainerSynthDoc.html\" "
  72                 + "title=\"annotation in pkg\">@ContainerSynthDoc</a>("
  73                 + ""
  74                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  75                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>)",
  76                 "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  77                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
  78                 + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
  79                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>");
  80 
  81         checkOutput("pkg/D.html", true,
  82                 "<a href=\"../pkg/RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>"
  83                 + "(<a href=\"../pkg/RegDoc.html#x--\">x</a>=1)",
  84                 "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
  85                 + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>=1)",
  86                 "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
  87                 + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})",
  88                 "<a href=\"../pkg/NonSynthDocContainer.html\" "
  89                 + "title=\"annotation in pkg\">@NonSynthDocContainer</a>"
  90                 + "("
  91                 + "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>)");
  92 
  93         checkOutput("pkg1/C.html", true,
  94                 "<a href=\"../pkg1/RegContainerValDoc.html\" "
  95                 + "title=\"annotation in pkg1\">@RegContainerValDoc</a>"
  96                 + "(<a href=\"../pkg1/RegContainerValDoc.html#value--\">value</a>={"
  97                 + "<a href=\"../pkg1/RegContaineeNotDoc.html\" "
  98                 + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>,"
  99                 + "<a href=\"../pkg1/RegContaineeNotDoc.html\" "
 100                 + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>},"
 101                 + "<a href=\"../pkg1/RegContainerValDoc.html#y--\">y</a>=3)",
 102                 "<a href=\"../pkg1/ContainerValDoc.html\" "
 103                 + "title=\"annotation in pkg1\">@ContainerValDoc</a>"
 104                 + "(<a href=\"../pkg1/ContainerValDoc.html#value--\">value</a>={"
 105                 + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
 106                 + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
 107                 + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
 108                 + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
 109                 + "<a href=\"../pkg1/ContainerValDoc.html#x--\">x</a>=1)");
 110 


< prev index next >