jdk/test/java/lang/invoke/JavaUtilConcurrentLookupTest.java
author alanb
Fri, 10 Feb 2017 09:04:39 +0000
changeset 43712 5dfd0950317c
parent 37669 6ba0f2bb6e30
permissions -rw-r--r--
8173393: Module system implementation refresh (2/2017) Reviewed-by: dfuchs, psandoz, mchung, alanb Contributed-by: alan.bateman@oracle.com, mandy.chung@oracle.com, claes.redestad@oracle.com, alex.buckley@oracle.com, mark.reinhold@oracle.com, john.r.rose@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37669
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
     1
/*
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
     4
 *
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
     7
 * published by the Free Software Foundation.
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
     8
 *
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    13
 * accompanied this code).
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    14
 *
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    18
 *
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    21
 * questions.
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    22
 */
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    23
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    24
/* @test
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    25
 * @summary Tests that Lookup can be produced from classes under java.util.concurrent
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    26
 * @bug 8154447
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    27
 * @compile/module=java.base java/util/concurrent/LookupTester.java
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    28
 * @run testng/othervm JavaUtilConcurrentLookupTest
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    29
 */
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    30
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    31
import org.testng.annotations.Test;
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    32
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    33
import java.util.concurrent.LookupTester;
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    34
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    35
public class JavaUtilConcurrentLookupTest {
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    36
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    37
    @Test
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    38
    public void testLookup() {
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    39
        LookupTester.getLookup();
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    40
    }
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    41
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    42
    @Test
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    43
    public void testLookupIn() {
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    44
        LookupTester.getLookupIn();
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    45
    }
6ba0f2bb6e30 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
psandoz
parents:
diff changeset
    46
}