bpatel@1468: /* bpatel@1468: * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. bpatel@1468: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. bpatel@1468: * bpatel@1468: * This code is free software; you can redistribute it and/or modify it bpatel@1468: * under the terms of the GNU General Public License version 2 only, as bpatel@1468: * published by the Free Software Foundation. bpatel@1468: * bpatel@1468: * This code is distributed in the hope that it will be useful, but WITHOUT bpatel@1468: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or bpatel@1468: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License bpatel@1468: * version 2 for more details (a copy is included in the LICENSE file that bpatel@1468: * accompanied this code). bpatel@1468: * bpatel@1468: * You should have received a copy of the GNU General Public License version bpatel@1468: * 2 along with this work; if not, write to the Free Software Foundation, bpatel@1468: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. bpatel@1468: * bpatel@1468: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA bpatel@1468: * or visit www.oracle.com if you need additional information or have any bpatel@1468: * questions. bpatel@1468: */ bpatel@1468: bpatel@1468: /* bpatel@1468: * @test bpatel@1468: * @bug 8004893 bpatel@1468: * @summary Make sure that the lambda feature changes work fine in bpatel@1468: * javadoc. bpatel@1468: * @author bpatel bpatel@1468: * @library ../lib/ bpatel@1468: * @build JavadocTester TestLambdaFeature bpatel@1468: * @run main TestLambdaFeature bpatel@1468: */ bpatel@1468: bpatel@1468: public class TestLambdaFeature extends JavadocTester { bpatel@1468: bpatel@1468: //Test information. bpatel@1468: private static final String BUG_ID = "8004893"; bpatel@1468: bpatel@1468: //Javadoc arguments. bpatel@1468: private static final String[] ARGS = new String[] { bpatel@1468: "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" bpatel@1468: }; bpatel@1468: bpatel@1468: //Input for string search tests. bpatel@1468: private static final String[][] TEST = { bpatel@1468: {BUG_ID + FS + "pkg" + FS + "A.html", bpatel@1468: "default void"}, bpatel@1468: {BUG_ID + FS + "pkg" + FS + "A.html", bpatel@1468: "
default void defaultMethod()
"}, bpatel@1468: {BUG_ID + FS + "pkg" + FS + "A.html", bpatel@1468: "" + bpatel@1468: "All Methods " + bpatel@1468: "" + bpatel@1468: "Instance Methods" + bpatel@1468: " " + bpatel@1468: "Abstract Methods " + bpatel@1468: "" + bpatel@1468: "Default Methods" + bpatel@1468: " "}, bpatel@1468: {BUG_ID + FS + "pkg" + FS + "A.html", bpatel@1468: "
" + NL + "
Functional Interface:
" + NL + bpatel@1468: "
This is a functional interface and can therefore be used as " + bpatel@1468: "the assignment target for a lambda expression or method " + jjg@1606: "reference.
" + NL + "
"} bpatel@1468: }; bpatel@1468: private static final String[][] NEGATED_TEST = { bpatel@1468: {BUG_ID + FS + "pkg" + FS + "A.html", bpatel@1468: "default default void"}, bpatel@1468: {BUG_ID + FS + "pkg" + FS + "A.html", bpatel@1468: "
default default void defaultMethod()
"}, bpatel@1468: {BUG_ID + FS + "pkg" + FS + "B.html", bpatel@1468: "default void"}, bpatel@1468: {BUG_ID + FS + "pkg" + FS + "B.html", bpatel@1468: "
" + NL + "
Functional Interface:
"} bpatel@1468: }; bpatel@1468: bpatel@1468: /** bpatel@1468: * The entry point of the test. bpatel@1468: * @param args the array of command line arguments. bpatel@1468: */ bpatel@1468: public static void main(String[] args) { bpatel@1468: TestLambdaFeature tester = new TestLambdaFeature(); bpatel@1468: run(tester, ARGS, TEST, NEGATED_TEST); bpatel@1468: tester.printSummary(); bpatel@1468: } bpatel@1468: bpatel@1468: /** bpatel@1468: * {@inheritDoc} bpatel@1468: */ bpatel@1468: public String getBugId() { bpatel@1468: return BUG_ID; bpatel@1468: } bpatel@1468: bpatel@1468: /** bpatel@1468: * {@inheritDoc} bpatel@1468: */ bpatel@1468: public String getBugName() { bpatel@1468: return getClass().getName(); bpatel@1468: } bpatel@1468: }