Wed, 08 Oct 2014 12:38:55 -0700
Added tag jdk8u40-b09 for changeset 8bb38a350722
bpatel@1324 | 1 | /* |
jjg@1743 | 2 | * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
bpatel@1324 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
bpatel@1324 | 4 | * |
bpatel@1324 | 5 | * This code is free software; you can redistribute it and/or modify it |
bpatel@1324 | 6 | * under the terms of the GNU General Public License version 2 only, as |
bpatel@1324 | 7 | * published by the Free Software Foundation. |
bpatel@1324 | 8 | * |
bpatel@1324 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
bpatel@1324 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
bpatel@1324 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
bpatel@1324 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
bpatel@1324 | 13 | * accompanied this code). |
bpatel@1324 | 14 | * |
bpatel@1324 | 15 | * You should have received a copy of the GNU General Public License version |
bpatel@1324 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
bpatel@1324 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
bpatel@1324 | 18 | * |
bpatel@1324 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
bpatel@1324 | 20 | * or visit www.oracle.com if you need additional information or have any |
bpatel@1324 | 21 | * questions. |
bpatel@1324 | 22 | */ |
bpatel@1324 | 23 | |
bpatel@1324 | 24 | /* |
bpatel@1324 | 25 | * @test |
bpatel@2147 | 26 | * @bug 7180906 8026567 |
bpatel@1324 | 27 | * @summary Test to make sure that the since tag works correctly |
bpatel@1324 | 28 | * @author Bhavesh Patel |
bpatel@1324 | 29 | * @library ../lib/ |
bpatel@1324 | 30 | * @build JavadocTester TestSinceTag |
bpatel@1324 | 31 | * @run main TestSinceTag |
bpatel@1324 | 32 | */ |
bpatel@1324 | 33 | |
bpatel@1324 | 34 | public class TestSinceTag extends JavadocTester { |
bpatel@1324 | 35 | |
bpatel@1324 | 36 | //Test information. |
bpatel@1324 | 37 | private static final String BUG_ID = "7180906"; |
bpatel@1324 | 38 | |
bpatel@1324 | 39 | //Javadoc arguments. |
bpatel@1324 | 40 | private static final String[] ARGS1 = new String[] { |
bpatel@1324 | 41 | "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1" |
bpatel@1324 | 42 | }; |
bpatel@1324 | 43 | |
bpatel@1324 | 44 | private static final String[] ARGS2 = new String[] { |
bpatel@1324 | 45 | "-d", BUG_ID, "-sourcepath", SRC_DIR, "-nosince", "pkg1" |
bpatel@1324 | 46 | }; |
bpatel@1324 | 47 | |
bpatel@1324 | 48 | //Input for string search tests. |
bpatel@1324 | 49 | private static final String[][] TEST = { |
bpatel@1324 | 50 | {BUG_ID + FS + "pkg1" + FS + "C1.html", |
bpatel@2147 | 51 | "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL + |
jjg@1743 | 52 | "<dd>JDK1.0</dd>" |
bpatel@1324 | 53 | }, |
bpatel@1324 | 54 | {BUG_ID + FS + "serialized-form.html", |
bpatel@2147 | 55 | "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL + |
jjg@1743 | 56 | "<dd>1.4</dd>" |
bpatel@1324 | 57 | } |
bpatel@1324 | 58 | }; |
bpatel@1324 | 59 | |
bpatel@1324 | 60 | /** |
bpatel@1324 | 61 | * The entry point of the test. |
bpatel@1324 | 62 | * @param args the array of command line arguments. |
bpatel@1324 | 63 | */ |
bpatel@1324 | 64 | public static void main(String[] args) { |
bpatel@1324 | 65 | TestSinceTag tester = new TestSinceTag(); |
bpatel@1324 | 66 | run(tester, ARGS1, TEST, NO_TEST); |
bpatel@1324 | 67 | run(tester, ARGS2, NO_TEST, TEST); |
bpatel@1324 | 68 | tester.printSummary(); |
bpatel@1324 | 69 | } |
bpatel@1324 | 70 | |
bpatel@1324 | 71 | /** |
bpatel@1324 | 72 | * {@inheritDoc} |
bpatel@1324 | 73 | */ |
bpatel@1324 | 74 | public String getBugId() { |
bpatel@1324 | 75 | return BUG_ID; |
bpatel@1324 | 76 | } |
bpatel@1324 | 77 | |
bpatel@1324 | 78 | /** |
bpatel@1324 | 79 | * {@inheritDoc} |
bpatel@1324 | 80 | */ |
bpatel@1324 | 81 | public String getBugName() { |
bpatel@1324 | 82 | return getClass().getName(); |
bpatel@1324 | 83 | } |
bpatel@1324 | 84 | } |