Wed, 08 Oct 2014 12:38:55 -0700
Added tag jdk8u40-b09 for changeset 8bb38a350722
bpatel@1477 | 1 | /* |
jjg@2104 | 2 | * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
bpatel@1477 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
bpatel@1477 | 4 | * |
bpatel@1477 | 5 | * This code is free software; you can redistribute it and/or modify it |
bpatel@1477 | 6 | * under the terms of the GNU General Public License version 2 only, as |
bpatel@1477 | 7 | * published by the Free Software Foundation. |
bpatel@1477 | 8 | * |
bpatel@1477 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
bpatel@1477 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
bpatel@1477 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
bpatel@1477 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
bpatel@1477 | 13 | * accompanied this code). |
bpatel@1477 | 14 | * |
bpatel@1477 | 15 | * You should have received a copy of the GNU General Public License version |
bpatel@1477 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
bpatel@1477 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
bpatel@1477 | 18 | * |
bpatel@1477 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
bpatel@1477 | 20 | * or visit www.oracle.com if you need additional information or have any |
bpatel@1477 | 21 | * questions. |
bpatel@1477 | 22 | */ |
bpatel@1477 | 23 | |
bpatel@1477 | 24 | /* |
bpatel@1477 | 25 | * @test |
bpatel@1477 | 26 | * @bug 8005092 |
bpatel@1477 | 27 | * @summary Test repeated annotations output. |
bpatel@1477 | 28 | * @author bpatel |
bpatel@1477 | 29 | * @library ../lib/ |
bpatel@1477 | 30 | * @build JavadocTester TestRepeatedAnnotations |
bpatel@1477 | 31 | * @run main TestRepeatedAnnotations |
bpatel@1477 | 32 | */ |
bpatel@1477 | 33 | |
bpatel@1477 | 34 | public class TestRepeatedAnnotations extends JavadocTester { |
bpatel@1477 | 35 | |
bpatel@1477 | 36 | //Test information. |
bpatel@1477 | 37 | private static final String BUG_ID = "8005092"; |
bpatel@1477 | 38 | |
bpatel@1477 | 39 | //Javadoc arguments. |
bpatel@1477 | 40 | private static final String[] ARGS = new String[] { |
bpatel@1477 | 41 | "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", "pkg1" |
bpatel@1477 | 42 | }; |
bpatel@1477 | 43 | |
bpatel@1477 | 44 | //Input for string search tests. |
bpatel@1477 | 45 | private static final String[][] TEST = { |
bpatel@1477 | 46 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@1477 | 47 | "<a href=\"../pkg/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 48 | "title=\"annotation in pkg\">@ContaineeSynthDoc</a> " + |
bpatel@1477 | 49 | "<a href=\"../pkg/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 50 | "title=\"annotation in pkg\">@ContaineeSynthDoc</a>"}, |
bpatel@1477 | 51 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@1477 | 52 | "<a href=\"../pkg/ContaineeRegDoc.html\" " + |
bpatel@1477 | 53 | "title=\"annotation in pkg\">@ContaineeRegDoc</a> " + |
bpatel@1477 | 54 | "<a href=\"../pkg/ContaineeRegDoc.html\" " + |
bpatel@1477 | 55 | "title=\"annotation in pkg\">@ContaineeRegDoc</a>"}, |
bpatel@1477 | 56 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@1477 | 57 | "<a href=\"../pkg/RegContainerDoc.html\" " + |
bpatel@1477 | 58 | "title=\"annotation in pkg\">@RegContainerDoc</a>" + |
jjg@2104 | 59 | "(<a href=\"../pkg/RegContainerDoc.html#value--\">value</a>={" + |
bpatel@1477 | 60 | "<a href=\"../pkg/RegContaineeNotDoc.html\" " + |
bpatel@1477 | 61 | "title=\"annotation in pkg\">@RegContaineeNotDoc</a>," + |
bpatel@1477 | 62 | "<a href=\"../pkg/RegContaineeNotDoc.html\" " + |
bpatel@1477 | 63 | "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})"}, |
bpatel@1477 | 64 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@1477 | 65 | "<a href=\"../pkg/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 66 | "title=\"annotation in pkg\">@ContaineeSynthDoc</a> " + |
bpatel@1477 | 67 | "<a href=\"../pkg/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 68 | "title=\"annotation in pkg\">@ContaineeSynthDoc</a> " + |
bpatel@1477 | 69 | "<a href=\"../pkg/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 70 | "title=\"annotation in pkg\">@ContaineeSynthDoc</a>"}, |
bpatel@1477 | 71 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@1477 | 72 | "<a href=\"../pkg/ContainerSynthDoc.html\" " + |
bpatel@1477 | 73 | "title=\"annotation in pkg\">@ContainerSynthDoc</a>(" + |
jjg@2104 | 74 | "<a href=\"../pkg/ContainerSynthDoc.html#value--\">value</a>=" + |
bpatel@1477 | 75 | "<a href=\"../pkg/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 76 | "title=\"annotation in pkg\">@ContaineeSynthDoc</a>)"}, |
bpatel@1477 | 77 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@1477 | 78 | "<a href=\"../pkg/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 79 | "title=\"annotation in pkg\">@ContaineeSynthDoc</a> " + |
bpatel@1477 | 80 | "<a href=\"../pkg/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 81 | "title=\"annotation in pkg\">@ContaineeSynthDoc</a>"}, |
bpatel@1477 | 82 | |
bpatel@1477 | 83 | {BUG_ID + FS + "pkg" + FS + "D.html", |
bpatel@1477 | 84 | "<a href=\"../pkg/RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>" + |
jjg@2104 | 85 | "(<a href=\"../pkg/RegDoc.html#x--\">x</a>=1)"}, |
bpatel@1477 | 86 | {BUG_ID + FS + "pkg" + FS + "D.html", |
bpatel@1477 | 87 | "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>" + |
jjg@2104 | 88 | "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>=1)"}, |
bpatel@1477 | 89 | {BUG_ID + FS + "pkg" + FS + "D.html", |
bpatel@1477 | 90 | "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>" + |
jjg@2104 | 91 | "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})"}, |
bpatel@1477 | 92 | {BUG_ID + FS + "pkg" + FS + "D.html", |
bpatel@1477 | 93 | "<a href=\"../pkg/NonSynthDocContainer.html\" " + |
bpatel@1477 | 94 | "title=\"annotation in pkg\">@NonSynthDocContainer</a>" + |
jjg@2104 | 95 | "(<a href=\"../pkg/NonSynthDocContainer.html#value--\">value</a>=" + |
bpatel@1477 | 96 | "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>)"}, |
bpatel@1477 | 97 | |
bpatel@1477 | 98 | {BUG_ID + FS + "pkg1" + FS + "C.html", |
bpatel@1477 | 99 | "<a href=\"../pkg1/RegContainerValDoc.html\" " + |
bpatel@1477 | 100 | "title=\"annotation in pkg1\">@RegContainerValDoc</a>" + |
jjg@2104 | 101 | "(<a href=\"../pkg1/RegContainerValDoc.html#value--\">value</a>={" + |
bpatel@1477 | 102 | "<a href=\"../pkg1/RegContaineeNotDoc.html\" " + |
bpatel@1477 | 103 | "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>," + |
bpatel@1477 | 104 | "<a href=\"../pkg1/RegContaineeNotDoc.html\" " + |
bpatel@1477 | 105 | "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>}," + |
jjg@2104 | 106 | "<a href=\"../pkg1/RegContainerValDoc.html#y--\">y</a>=3)"}, |
bpatel@1477 | 107 | {BUG_ID + FS + "pkg1" + FS + "C.html", |
bpatel@1477 | 108 | "<a href=\"../pkg1/ContainerValDoc.html\" " + |
bpatel@1477 | 109 | "title=\"annotation in pkg1\">@ContainerValDoc</a>" + |
jjg@2104 | 110 | "(<a href=\"../pkg1/ContainerValDoc.html#value--\">value</a>={" + |
bpatel@1477 | 111 | "<a href=\"../pkg1/ContaineeNotDoc.html\" " + |
bpatel@1477 | 112 | "title=\"annotation in pkg1\">@ContaineeNotDoc</a>," + |
bpatel@1477 | 113 | "<a href=\"../pkg1/ContaineeNotDoc.html\" " + |
bpatel@1477 | 114 | "title=\"annotation in pkg1\">@ContaineeNotDoc</a>}," + |
jjg@2104 | 115 | "<a href=\"../pkg1/ContainerValDoc.html#x--\">x</a>=1)"} |
bpatel@1477 | 116 | }; |
bpatel@1477 | 117 | |
bpatel@1477 | 118 | private static final String[][] NEGATED_TEST = { |
bpatel@1477 | 119 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@1477 | 120 | "<a href=\"../pkg/RegContaineeDoc.html\" " + |
bpatel@1477 | 121 | "title=\"annotation in pkg\">@RegContaineeDoc</a> " + |
bpatel@1477 | 122 | "<a href=\"../pkg/RegContaineeDoc.html\" " + |
bpatel@1477 | 123 | "title=\"annotation in pkg\">@RegContaineeDoc</a>"}, |
bpatel@1477 | 124 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@1477 | 125 | "<a href=\"../pkg/RegContainerNotDoc.html\" " + |
bpatel@1477 | 126 | "title=\"annotation in pkg\">@RegContainerNotDoc</a>" + |
jjg@2104 | 127 | "(<a href=\"../pkg/RegContainerNotDoc.html#value--\">value</a>={" + |
bpatel@1477 | 128 | "<a href=\"../pkg/RegContaineeNotDoc.html\" " + |
bpatel@1477 | 129 | "title=\"annotation in pkg\">@RegContaineeNotDoc</a>," + |
bpatel@1477 | 130 | "<a href=\"../pkg/RegContaineeNotDoc.html\" " + |
bpatel@1477 | 131 | "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})"}, |
bpatel@1477 | 132 | |
bpatel@1477 | 133 | {BUG_ID + FS + "pkg1" + FS + "C.html", |
bpatel@1477 | 134 | "<a href=\"../pkg1/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 135 | "title=\"annotation in pkg1\">@ContaineeSynthDoc</a> " + |
bpatel@1477 | 136 | "<a href=\"../pkg1/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 137 | "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>"}, |
bpatel@1477 | 138 | {BUG_ID + FS + "pkg1" + FS + "C.html", |
bpatel@1477 | 139 | "<a href=\"../pkg1/RegContainerValNotDoc.html\" " + |
bpatel@1477 | 140 | "title=\"annotation in pkg1\">@RegContainerValNotDoc</a>" + |
jjg@2104 | 141 | "(<a href=\"../pkg1/RegContainerValNotDoc.html#value--\">value</a>={" + |
bpatel@1477 | 142 | "<a href=\"../pkg1/RegContaineeDoc.html\" " + |
bpatel@1477 | 143 | "title=\"annotation in pkg1\">@RegContaineeDoc</a>," + |
bpatel@1477 | 144 | "<a href=\"../pkg1/RegContaineeDoc.html\" " + |
bpatel@1477 | 145 | "title=\"annotation in pkg1\">@RegContaineeDoc</a>}," + |
jjg@2104 | 146 | "<a href=\"../pkg1/RegContainerValNotDoc.html#y--\">y</a>=4)"}, |
bpatel@1477 | 147 | {BUG_ID + FS + "pkg1" + FS + "C.html", |
bpatel@1477 | 148 | "<a href=\"../pkg1/ContainerValNotDoc.html\" " + |
bpatel@1477 | 149 | "title=\"annotation in pkg1\">@ContainerValNotDoc</a>" + |
jjg@2104 | 150 | "(<a href=\"../pkg1/ContainerValNotDoc.html#value--\">value</a>={" + |
bpatel@1477 | 151 | "<a href=\"../pkg1/ContaineeNotDoc.html\" " + |
bpatel@1477 | 152 | "title=\"annotation in pkg1\">@ContaineeNotDoc</a>," + |
bpatel@1477 | 153 | "<a href=\"../pkg1/ContaineeNotDoc.html\" " + |
bpatel@1477 | 154 | "title=\"annotation in pkg1\">@ContaineeNotDoc</a>}," + |
jjg@2104 | 155 | "<a href=\"../pkg1/ContainerValNotDoc.html#x--\">x</a>=2)"}, |
bpatel@1477 | 156 | {BUG_ID + FS + "pkg1" + FS + "C.html", |
bpatel@1477 | 157 | "<a href=\"../pkg1/ContainerSynthNotDoc.html\" " + |
bpatel@1477 | 158 | "title=\"annotation in pkg1\">@ContainerSynthNotDoc</a>(" + |
jjg@2104 | 159 | "<a href=\"../pkg1/ContainerSynthNotDoc.html#value--\">value</a>=" + |
bpatel@1477 | 160 | "<a href=\"../pkg1/ContaineeSynthDoc.html\" " + |
bpatel@1477 | 161 | "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>)"} |
bpatel@1477 | 162 | }; |
bpatel@1477 | 163 | |
bpatel@1477 | 164 | /** |
bpatel@1477 | 165 | * The entry point of the test. |
bpatel@1477 | 166 | * @param args the array of command line arguments. |
bpatel@1477 | 167 | */ |
bpatel@1477 | 168 | public static void main(String[] args) { |
bpatel@1477 | 169 | TestRepeatedAnnotations tester = new TestRepeatedAnnotations(); |
bpatel@1477 | 170 | run(tester, ARGS, TEST, NEGATED_TEST); |
bpatel@1477 | 171 | tester.printSummary(); |
bpatel@1477 | 172 | } |
bpatel@1477 | 173 | |
bpatel@1477 | 174 | /** |
bpatel@1477 | 175 | * {@inheritDoc} |
bpatel@1477 | 176 | */ |
bpatel@1477 | 177 | public String getBugId() { |
bpatel@1477 | 178 | return BUG_ID; |
bpatel@1477 | 179 | } |
bpatel@1477 | 180 | |
bpatel@1477 | 181 | /** |
bpatel@1477 | 182 | * {@inheritDoc} |
bpatel@1477 | 183 | */ |
bpatel@1477 | 184 | public String getBugName() { |
bpatel@1477 | 185 | return getClass().getName(); |
bpatel@1477 | 186 | } |
bpatel@1477 | 187 | } |