TestHiddenMembers.java revision 3294:9adfb22ff08f
182531Smsmith/* 282531Smsmith * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. 382531Smsmith * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 482531Smsmith * 582531Smsmith * This code is free software; you can redistribute it and/or modify it 682531Smsmith * under the terms of the GNU General Public License version 2 only, as 782531Smsmith * published by the Free Software Foundation. 882531Smsmith * 982531Smsmith * This code is distributed in the hope that it will be useful, but WITHOUT 1082531Smsmith * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1182531Smsmith * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1282531Smsmith * version 2 for more details (a copy is included in the LICENSE file that 1382531Smsmith * accompanied this code). 1482531Smsmith * 1582531Smsmith * You should have received a copy of the GNU General Public License version 1682531Smsmith * 2 along with this work; if not, write to the Free Software Foundation, 1782531Smsmith * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1882531Smsmith * 1982531Smsmith * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2082531Smsmith * or visit www.oracle.com if you need additional information or have any 2182531Smsmith * questions. 2282531Smsmith */ 2382531Smsmith 2482531Smsmith/* 2582531Smsmith * @test 2682531Smsmith * @bug 4492178 27119482Sobrien * @summary Test to make sure that hidden overriden members are not 28119482Sobrien * documented as inherited. 29119482Sobrien * @author jamieh 3082531Smsmith * @library ../lib 3182531Smsmith * @modules jdk.javadoc/jdk.javadoc.internal.tool 3282531Smsmith * @build JavadocTester 33158023Sjhb * @run main TestHiddenMembers 34158023Sjhb */ 3582531Smsmith 36193530Sjkimpublic class TestHiddenMembers extends JavadocTester { 37117529Snjl 38114246Snjl private static final String[][] NEGATED_TEST = { 3982531Smsmith { } 4082531Smsmith }; 4182531Smsmith private static final String[] ARGS = 4282531Smsmith new String[] { 4382531Smsmith 4482531Smsmith }; 4582531Smsmith 4682531Smsmith public static void main(String... args) throws Exception { 47167814Sjkim TestHiddenMembers tester = new TestHiddenMembers(); 48167814Sjkim tester.runTests(); 4982531Smsmith } 5082531Smsmith 5182531Smsmith @Test 5282531Smsmith void test() { 5382531Smsmith javadoc("-d", "out", 5482531Smsmith "-sourcepath", testSrc, 55167814Sjkim "pkg"); 56145158Snjl checkExit(Exit.OK); 5782531Smsmith 5882531Smsmith // We should not inherit any members from BaseClass because they are all overriden and hidden 5982531Smsmith // (declared as private). 6082531Smsmith // TODO: check normal case of generated tags: upper case of lower case 6182531Smsmith checkOutput("pkg/SubClass.html", false, 6282531Smsmith "inherited from class pkg.<A HREF=\"../pkg/BaseClass.html\">BaseClass</A>"); 6382531Smsmith } 6482531Smsmith} 6582531Smsmith