942N/A/*
942N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
942N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
942N/A *
942N/A * This code is free software; you can redistribute it and/or modify it
942N/A * under the terms of the GNU General Public License version 2 only, as
942N/A * published by the Free Software Foundation.
942N/A *
942N/A * This code is distributed in the hope that it will be useful, but WITHOUT
942N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
942N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
942N/A * version 2 for more details (a copy is included in the LICENSE file that
942N/A * accompanied this code).
942N/A *
942N/A * You should have received a copy of the GNU General Public License version
942N/A * 2 along with this work; if not, write to the Free Software Foundation,
942N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
942N/A *
942N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
942N/A * or visit www.oracle.com if you need additional information or have any
942N/A * questions.
942N/A */
942N/A
942N/A/*
942N/A * @test
942N/A * @bug 7010342
942N/A * @summary Test for correct sub title generation.
942N/A * @author Bhavesh Patel
942N/A * @library ../lib/
942N/A * @build JavadocTester
942N/A * @build TestSubTitle
942N/A * @run main TestSubTitle
942N/A */
942N/A
942N/Apublic class TestSubTitle extends JavadocTester {
942N/A
942N/A private static final String BUG_ID = "7010342";
942N/A private static final String[][] TEST = {
942N/A {BUG_ID + FS + "pkg" + FS + "package-summary.html",
994N/A "<div class=\"block\">This is the description of package pkg.</div>"
942N/A },
942N/A {BUG_ID + FS + "pkg" + FS + "C.html",
942N/A "<div class=\"subTitle\">pkg</div>"
942N/A }
942N/A };
942N/A private static final String[][] NEG_TEST = {
942N/A {BUG_ID + FS + "pkg" + FS + "package-summary.html",
942N/A "<p class=\"subTitle\">" + NL + "<div class=\"block\">This is the " +
942N/A "description of package pkg.</div>" + NL + "</p>"
942N/A },
942N/A {BUG_ID + FS + "pkg" + FS + "C.html",
942N/A "<p class=\"subTitle\">pkg</p>"
942N/A }
942N/A };
942N/A private static final String[] ARGS = new String[]{
942N/A "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
942N/A };
942N/A
942N/A /**
942N/A * The entry point of the test.
942N/A * @param args the array of command line arguments.
942N/A */
942N/A public static void main(String[] args) {
942N/A TestSubTitle tester = new TestSubTitle();
942N/A run(tester, ARGS, TEST, NEG_TEST);
942N/A tester.printSummary();
942N/A }
942N/A
942N/A /**
942N/A * {@inheritDoc}
942N/A */
942N/A public String getBugId() {
942N/A return BUG_ID;
942N/A }
942N/A
942N/A /**
942N/A * {@inheritDoc}
942N/A */
942N/A public String getBugName() {
942N/A return getClass().getName();
942N/A }
942N/A}