langtools/test/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarArgsThis.java
author alundblad
Wed, 26 Aug 2015 09:02:02 +0200
changeset 32337 c9d3ab9f601c
parent 14554 4e29b285c723
permissions -rw-r--r--
8133671: langtools tests have bad license Summary: Dropped classpath exception from copyright notice in tests. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14554
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
     1
/*
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
     4
 *
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
32337
c9d3ab9f601c 8133671: langtools tests have bad license
alundblad
parents: 14554
diff changeset
     7
 * published by the Free Software Foundation.
14554
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
     8
 *
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    13
 * accompanied this code).
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    14
 *
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    18
 *
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    21
 * questions.
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    22
 */
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    23
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    24
/**
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    25
 * @test
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    26
 * @bug 8003639
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    27
 * @summary convert lambda testng tests to jtreg and add them
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    28
 * @run testng MethodReferenceTestVarArgsThis
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    29
 */
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    30
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    31
import org.testng.annotations.Test;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    32
import java.lang.reflect.Array;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    33
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    34
import static org.testng.Assert.assertEquals;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    35
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    36
/**
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    37
 * @author Robert Field
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    38
 */
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    39
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    40
interface NsII { String m(Integer a, Integer b); }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    41
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    42
interface Nsiii { String m(int a, int b, int c); }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    43
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    44
interface Nsi { String m(int a); }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    45
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    46
interface NsaO { String m(Object[] a); }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    47
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    48
interface Nsai { String m(int[] a); }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    49
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    50
interface Nsvi { String m(int... va); }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    51
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    52
@Test
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    53
public class MethodReferenceTestVarArgsThis {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    54
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    55
    // These should be processed as var args
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    56
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    57
    String xvI(Integer... vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    58
        StringBuilder sb = new StringBuilder("xvI:");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    59
        for (Integer i : vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    60
            sb.append(i);
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    61
            sb.append("-");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    62
        }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    63
        return sb.toString();
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    64
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    65
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    66
    String xIvI(Integer f, Integer... vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    67
        StringBuilder sb = new StringBuilder("xIvI:");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    68
        sb.append(f);
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    69
        for (Integer i : vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    70
            sb.append(i);
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    71
            sb.append("-");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    72
        }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    73
        return sb.toString();
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    74
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    75
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    76
    String xvi(int... vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    77
        int sum = 0;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    78
        for (int i : vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    79
            sum += i;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    80
        }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    81
        return "xvi:" + sum;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    82
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    83
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    84
    String xIvi(Integer f, int... vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    85
        int sum = 0;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    86
        for (int i : vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    87
            sum += i;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    88
        }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    89
        return "xIvi:(" + f + ")" + sum;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    90
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    91
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    92
    String xvO(Object... vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    93
        StringBuilder sb = new StringBuilder("xvO:");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    94
        for (Object i : vi) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    95
            if (i.getClass().isArray()) {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    96
                sb.append("[");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    97
                int len = Array.getLength(i);
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    98
                for (int x = 0; x < len; ++x)  {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
    99
                    sb.append(Array.get(i, x));
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   100
                    sb.append(",");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   101
                }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   102
                sb.append("]");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   103
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   104
            } else {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   105
                sb.append(i);
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   106
            }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   107
            sb.append("*");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   108
        }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   109
        return sb.toString();
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   110
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   111
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   112
    public void testVarArgsNsSuperclass() {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   113
        NsII q;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   114
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   115
        q = this::xvO;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   116
        assertEquals(q.m(55,66), "xvO:55*66*");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   117
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   118
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   119
    public void testVarArgsNsArray() {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   120
        Nsai q;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   121
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   122
        q = this::xvO;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   123
        assertEquals(q.m(new int[] { 55,66 } ), "xvO:[55,66,]*");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   124
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   125
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   126
    public void testVarArgsNsII() {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   127
        NsII q;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   128
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   129
        q = this::xvI;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   130
        assertEquals(q.m(33,7), "xvI:33-7-");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   131
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   132
        q = this::xIvI;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   133
        assertEquals(q.m(50,40), "xIvI:5040-");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   134
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   135
        q = this::xvi;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   136
        assertEquals(q.m(100,23), "xvi:123");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   137
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   138
        q = this::xIvi;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   139
        assertEquals(q.m(9,21), "xIvi:(9)21");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   140
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   141
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   142
    public void testVarArgsNsiii() {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   143
        Nsiii q;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   144
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   145
        q = this::xvI;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   146
        assertEquals(q.m(3, 2, 1), "xvI:3-2-1-");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   147
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   148
        q = this::xIvI;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   149
        assertEquals(q.m(888, 99, 2), "xIvI:88899-2-");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   150
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   151
        q = this::xvi;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   152
        assertEquals(q.m(900,80,7), "xvi:987");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   153
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   154
        q = this::xIvi;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   155
        assertEquals(q.m(333,27, 72), "xIvi:(333)99");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   156
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   157
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   158
    public void testVarArgsNsi() {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   159
        Nsi q;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   160
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   161
        q = this::xvI;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   162
        assertEquals(q.m(3), "xvI:3-");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   163
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   164
        q = this::xIvI;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   165
        assertEquals(q.m(888), "xIvI:888");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   166
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   167
        q = this::xvi;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   168
        assertEquals(q.m(900), "xvi:900");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   169
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   170
        q = this::xIvi;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   171
        assertEquals(q.m(333), "xIvi:(333)0");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   172
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   173
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   174
    // These should NOT be processed as var args
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   175
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   176
    public void testVarArgsNsaO() {
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   177
        NsaO q;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   178
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   179
        q = this::xvO;
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   180
        assertEquals(q.m(new String[] { "yo", "there", "dude" }), "xvO:yo*there*dude*");
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   181
    }
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   182
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   183
4e29b285c723 8003639: convert lambda testng tests to jtreg and add them
rfield
parents:
diff changeset
   184
}