bpatel@1324: /* jjg@1743: * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. bpatel@1324: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. bpatel@1324: * bpatel@1324: * This code is free software; you can redistribute it and/or modify it bpatel@1324: * under the terms of the GNU General Public License version 2 only, as bpatel@1324: * published by the Free Software Foundation. bpatel@1324: * bpatel@1324: * This code is distributed in the hope that it will be useful, but WITHOUT bpatel@1324: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or bpatel@1324: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License bpatel@1324: * version 2 for more details (a copy is included in the LICENSE file that bpatel@1324: * accompanied this code). bpatel@1324: * bpatel@1324: * You should have received a copy of the GNU General Public License version bpatel@1324: * 2 along with this work; if not, write to the Free Software Foundation, bpatel@1324: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. bpatel@1324: * bpatel@1324: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA bpatel@1324: * or visit www.oracle.com if you need additional information or have any bpatel@1324: * questions. bpatel@1324: */ bpatel@1324: bpatel@1324: /* bpatel@1324: * @test bpatel@1324: * @bug 7180906 bpatel@1324: * @summary Test to make sure that the since tag works correctly bpatel@1324: * @author Bhavesh Patel bpatel@1324: * @library ../lib/ bpatel@1324: * @build JavadocTester TestSinceTag bpatel@1324: * @run main TestSinceTag bpatel@1324: */ bpatel@1324: bpatel@1324: public class TestSinceTag extends JavadocTester { bpatel@1324: bpatel@1324: //Test information. bpatel@1324: private static final String BUG_ID = "7180906"; bpatel@1324: bpatel@1324: //Javadoc arguments. bpatel@1324: private static final String[] ARGS1 = new String[] { bpatel@1324: "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1" bpatel@1324: }; bpatel@1324: bpatel@1324: private static final String[] ARGS2 = new String[] { bpatel@1324: "-d", BUG_ID, "-sourcepath", SRC_DIR, "-nosince", "pkg1" bpatel@1324: }; bpatel@1324: bpatel@1324: //Input for string search tests. bpatel@1324: private static final String[][] TEST = { bpatel@1324: {BUG_ID + FS + "pkg1" + FS + "C1.html", jjg@1744: "
" + NL + "
Since:
" + NL + jjg@1743: "
JDK1.0
" bpatel@1324: }, bpatel@1324: {BUG_ID + FS + "serialized-form.html", jjg@1744: "
" + NL + "
Since:
" + NL + jjg@1743: "
1.4
" bpatel@1324: } bpatel@1324: }; bpatel@1324: bpatel@1324: /** bpatel@1324: * The entry point of the test. bpatel@1324: * @param args the array of command line arguments. bpatel@1324: */ bpatel@1324: public static void main(String[] args) { bpatel@1324: TestSinceTag tester = new TestSinceTag(); bpatel@1324: run(tester, ARGS1, TEST, NO_TEST); bpatel@1324: run(tester, ARGS2, NO_TEST, TEST); bpatel@1324: tester.printSummary(); bpatel@1324: } bpatel@1324: bpatel@1324: /** bpatel@1324: * {@inheritDoc} bpatel@1324: */ bpatel@1324: public String getBugId() { bpatel@1324: return BUG_ID; bpatel@1324: } bpatel@1324: bpatel@1324: /** bpatel@1324: * {@inheritDoc} bpatel@1324: */ bpatel@1324: public String getBugName() { bpatel@1324: return getClass().getName(); bpatel@1324: } bpatel@1324: }