25 import java.lang.module.ModuleFinder;
26 import java.lang.module.ModuleReference;
27 import java.lang.reflect.InvocationHandler;
28 import java.lang.reflect.Layer;
29 import java.lang.reflect.Module;
30 import java.lang.reflect.Proxy;
31 import java.nio.file.Path;
32 import java.nio.file.Paths;
33 import java.util.Arrays;
34 import java.util.List;
35
36 import static jdk.testlibrary.ProcessTools.executeTestJava;
37
38 import org.testng.annotations.BeforeTest;
39 import org.testng.annotations.Test;
40 import static org.testng.Assert.*;
41
42 /**
43 * @test
44 * @library ../../lib /lib/testlibrary
45 * @build ProxyTest CompilerUtils jdk.testlibrary.ProcessTools
46 * @run testng ProxyLayerTest
47 * @summary Test proxies to implement interfaces in a layer
48 */
49
50 public class ProxyLayerTest {
51
52 private static final String TEST_SRC = System.getProperty("test.src");
53 private static final String TEST_CLASSES = System.getProperty("test.classes");
54
55 private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
56 private static final Path MODS_DIR = Paths.get("mods");
57 private static final Path CPATH_DIR = Paths.get(TEST_CLASSES);
58
59 // the names of the modules in this test
60 private static String[] modules = new String[] {"m1", "m2", "m3"};
61
62
63 /**
64 * Compiles all modules used by the test
|
25 import java.lang.module.ModuleFinder;
26 import java.lang.module.ModuleReference;
27 import java.lang.reflect.InvocationHandler;
28 import java.lang.reflect.Layer;
29 import java.lang.reflect.Module;
30 import java.lang.reflect.Proxy;
31 import java.nio.file.Path;
32 import java.nio.file.Paths;
33 import java.util.Arrays;
34 import java.util.List;
35
36 import static jdk.testlibrary.ProcessTools.executeTestJava;
37
38 import org.testng.annotations.BeforeTest;
39 import org.testng.annotations.Test;
40 import static org.testng.Assert.*;
41
42 /**
43 * @test
44 * @library ../../lib /lib/testlibrary
45 * @modules jdk.compiler
46 * @build ProxyTest CompilerUtils jdk.testlibrary.ProcessTools
47 * @run testng ProxyLayerTest
48 * @summary Test proxies to implement interfaces in a layer
49 */
50
51 public class ProxyLayerTest {
52
53 private static final String TEST_SRC = System.getProperty("test.src");
54 private static final String TEST_CLASSES = System.getProperty("test.classes");
55
56 private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
57 private static final Path MODS_DIR = Paths.get("mods");
58 private static final Path CPATH_DIR = Paths.get(TEST_CLASSES);
59
60 // the names of the modules in this test
61 private static String[] modules = new String[] {"m1", "m2", "m3"};
62
63
64 /**
65 * Compiles all modules used by the test
|