langtools/test/tools/javac/defaultMethodsVisibility/DefaultMethodsNotVisibleForSourceLessThan8Test.java
author alanb
Thu, 17 Mar 2016 19:04:28 +0000
changeset 36526 3b41f1c69604
parent 30730 d3ce7619db2c
child 36778 e04318f39f92
permissions -rw-r--r--
8142968: Module System implementation Summary: Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282 Reviewed-by: jjg, jlahoda, vromero, mcimadamore, bpatel, ksrini, darcy, anazarov, dfuchs Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, jan.lahoda@oracle.com, vicente.romero@oracle.com, andreas.lundblad@oracle.com, andrey.x.nazarov@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, kumar.x.srinivasan@oracle.com, sundararajan.athijegannathan@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     1
/*
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 26100
diff changeset
     2
 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     4
 *
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     7
 * published by the Free Software Foundation.
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     8
 *
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    13
 * accompanied this code).
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    14
 *
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    18
 *
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    21
 * questions.
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    22
 */
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    23
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    24
/*
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    25
 * @test
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    26
 * @bug 8029240 8030855
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    27
 * @summary Default methods not always visible under -source 7
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    28
 * Default methods should be visible under source previous to 8
26100
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
    29
 * @library /tools/lib
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 26100
diff changeset
    30
 * @modules jdk.compiler/com.sun.tools.javac.api
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 26100
diff changeset
    31
 *          jdk.compiler/com.sun.tools.javac.file
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 26100
diff changeset
    32
 *          jdk.compiler/com.sun.tools.javac.main
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 30730
diff changeset
    33
 *          jdk.jdeps/com.sun.tools.javap
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    34
 * @build ToolBox
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    35
 * @run main DefaultMethodsNotVisibleForSourceLessThan8Test
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    36
 */
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    37
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    38
import java.nio.file.Files;
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    39
import java.nio.file.Paths;
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    40
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    41
public class DefaultMethodsNotVisibleForSourceLessThan8Test {
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    42
    // common definitions
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    43
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    44
    // this one should be compiled with source 8, the rest with source < 8
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    45
    static final String ISrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    46
        "interface I {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    47
        "    default void m() {}\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    48
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    49
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    50
    static final String JSrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    51
        "interface J extends I {}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    52
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    53
    static final String ASrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    54
        "abstract class A implements I {}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    55
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    56
    static final String BSrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    57
        "class B implements I {}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    58
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    59
    // test legacy implementations
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    60
    static final String C1Src =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    61
        "class C1 implements I {\n" +
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    62
        "    public void m() {}\n" +
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    63
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    64
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    65
    static final String C2Src =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    66
        "class C2 implements J {\n" +
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    67
        "    public void m() {}\n" +
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    68
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    69
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    70
    static final String C3Src =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    71
        "class C3 extends A {\n" +
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    72
        "    public void m() {}\n" +
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    73
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    74
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    75
    static final String C4Src =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    76
        "class C4 extends B {\n" +
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    77
        "    public void m() {}\n" +
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    78
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    79
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    80
    //test legacy invocations
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    81
    static final String LegacyInvocationSrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    82
        "class LegacyInvocation {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    83
        "    public static void test(I i, J j, A a, B b) {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    84
        "        i.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    85
        "        j.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    86
        "        a.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    87
        "        b.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    88
        "    }\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    89
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    90
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    91
    //test case super invocations
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    92
    static final String SubASrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    93
        "class SubA extends A {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    94
        "    public void test() {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    95
        "        super.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    96
        "    }\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    97
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    98
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    99
    static final String SubBSrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   100
        "class SubB extends B {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   101
        "    public void test() {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   102
        "        super.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   103
        "    }\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   104
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   105
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   106
    public static void main(String[] args) throws Exception {
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   107
        String[] sources = new String[] {
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   108
            "1.6",
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   109
            "1.7",
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   110
        };
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   111
        for (String source : sources) {
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   112
            new DefaultMethodsNotVisibleForSourceLessThan8Test().run(source);
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   113
        }
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   114
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   115
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   116
    String outDir;
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   117
    String source;
26100
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   118
    ToolBox tb = new ToolBox();
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   119
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   120
    void run(String source) throws Exception {
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   121
        this.source = source;
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   122
        outDir = "out" + source.replace('.', '_');
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   123
        testsPreparation();
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   124
        testLegacyImplementations();
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   125
        testLegacyInvocations();
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   126
        testSuperInvocations();
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   127
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   128
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   129
    void testsPreparation() throws Exception {
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   130
        Files.createDirectory(Paths.get(outDir));
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   131
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   132
        /* as an extra check let's make sure that interface 'I' can't be compiled
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   133
         * with source < 8
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   134
         */
26100
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   135
        tb.new JavacTask()
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   136
                .outdir(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   137
                .options("-source", source)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   138
                .sources(ISrc)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   139
                .run(ToolBox.Expect.FAIL);
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   140
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   141
        //but it should compile with source >= 8
26100
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   142
        tb.new JavacTask()
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   143
                .outdir(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   144
                .sources(ISrc)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   145
                .run();
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   146
26100
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   147
        tb.new JavacTask()
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   148
                .outdir(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   149
                .classpath(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   150
                .options("-source", source)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   151
                .sources(JSrc, ASrc, BSrc)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   152
                .run();
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   153
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   154
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   155
    void testLegacyImplementations() throws Exception {
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   156
        //compile C1-4
26100
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   157
        tb.new JavacTask()
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   158
                .outdir(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   159
                .classpath(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   160
                .options("-source", source)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   161
                .sources(C1Src, C2Src, C3Src, C4Src)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   162
                .run();
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   163
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   164
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   165
    void testLegacyInvocations() throws Exception {
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   166
        //compile LegacyInvocation
26100
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   167
        tb.new JavacTask()
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   168
                .outdir(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   169
                .classpath(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   170
                .options("-source", source)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   171
                .sources(LegacyInvocationSrc)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   172
                .run();
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   173
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   174
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   175
    void testSuperInvocations() throws Exception {
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   176
        //compile SubA, SubB
26100
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   177
        tb.new JavacTask()
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   178
                .outdir(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   179
                .classpath(outDir)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   180
                .options("-source", source)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   181
                .sources(SubASrc, SubBSrc)
bb7dd001d190 8050429: Update/cleanup ToolBox
jjg
parents: 25445
diff changeset
   182
                .run();
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   183
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   184
}