TestMethodTypes.java revision 3294:9adfb22ff08f
1197139Shrs/* 2197139Shrs * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. 3197139Shrs * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4197139Shrs * 5197139Shrs * This code is free software; you can redistribute it and/or modify it 6198190Sdougb * under the terms of the GNU General Public License version 2 only, as 7197139Shrs * published by the Free Software Foundation. 8197139Shrs * 9197139Shrs * This code is distributed in the hope that it will be useful, but WITHOUT 10197139Shrs * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11197139Shrs * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12197139Shrs * version 2 for more details (a copy is included in the LICENSE file that 13197139Shrs * accompanied this code). 14197139Shrs * 15197139Shrs * You should have received a copy of the GNU General Public License version 16197139Shrs * 2 along with this work; if not, write to the Free Software Foundation, 17197139Shrs * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18197139Shrs * 19197139Shrs * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20197139Shrs * or visit www.oracle.com if you need additional information or have any 21197139Shrs * questions. 22197139Shrs */ 23197139Shrs 24220153Semaste/* 25197139Shrs * @test 26197139Shrs * @bug 8002304 8024096 27197139Shrs * @summary Test for various method types in the method summary table 28197139Shrs * @author Bhavesh Patel 29197139Shrs * @library ../lib 30197139Shrs * @modules jdk.javadoc/jdk.javadoc.internal.tool 31197139Shrs * @build JavadocTester 32197139Shrs * @run main TestMethodTypes 33197139Shrs */ 34197139Shrs 35197139Shrspublic class TestMethodTypes extends JavadocTester { 36197139Shrs 37197139Shrs public static void main(String... args) throws Exception { 38197139Shrs TestMethodTypes tester = new TestMethodTypes(); 39197139Shrs tester.runTests(); 40197139Shrs } 41197139Shrs 42197947Sdougb @Test 43197139Shrs void test() { 44197139Shrs javadoc("-d", "out", 45197139Shrs "-sourcepath", testSrc, 46197139Shrs "pkg1"); 47197139Shrs checkExit(Exit.OK); 48197139Shrs 49197139Shrs checkOutput("pkg1/A.html", true, 50197139Shrs "var methods = {", 51220153Semaste "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " 52197139Shrs + "Methods</span><span class=\"tabEnd\"> </span></span>" 53197139Shrs + "<span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:show(1);\">" 54197139Shrs + "Static Methods</a></span><span class=\"tabEnd\"> </span></span>" 55197139Shrs + "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" 56197139Shrs + "Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" 57197139Shrs + "<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">" 58197139Shrs + "Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>" 59197139Shrs + "<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">" 60197139Shrs + "Deprecated Methods</a></span><span class=\"tabEnd\"> </span></span>" 61197139Shrs + "</caption>", 62197139Shrs "<tr id=\"i0\" class=\"altColor\">"); 63197139Shrs 64197139Shrs checkOutput("pkg1/B.html", true, 65197139Shrs "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " 66197139Shrs + "Methods</span><span class=\"tabEnd\"> </span></span>" 67197139Shrs + "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" 68197139Shrs + "Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" 69197139Shrs + "<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">" 70197139Shrs + "Abstract Methods</a></span><span class=\"tabEnd\"> </span></span>" 71197139Shrs + "</caption>"); 72197139Shrs 73197139Shrs checkOutput("pkg1/D.html", true, 74197139Shrs "var methods = {", 75197139Shrs "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " 76 + "Methods</span><span class=\"tabEnd\"> </span></span>" 77 + "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" 78 + "Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" 79 + "<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">" 80 + "Abstract Methods</a></span><span class=\"tabEnd\"> </span></span>" 81 + "<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">" 82 + "Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>" 83 + "<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">" 84 + "Deprecated Methods</a></span><span class=\"tabEnd\"> </span></span>" 85 + "</caption>", 86 "<tr id=\"i0\" class=\"altColor\">"); 87 88 checkOutput("pkg1/A.html", false, 89 "<caption><span>Methods</span><span class=\"tabEnd\"> </span>" 90 + "</caption>"); 91 92 checkOutput("pkg1/B.html", false, 93 "<caption><span>Methods</span><span class=\"tabEnd\"> </span>" 94 + "</caption>"); 95 96 checkOutput("pkg1/D.html", false, 97 "<caption><span>Methods</span><span class=\"tabEnd\"> </span>" 98 + "</caption>"); 99 } 100} 101