8186610: move ModuleUtils to top-level testlibrary
Reviewed-by: alanb, iignatyev
This commit is contained in:
parent
b3de6ff3a6
commit
7014d0bdf8
@ -23,9 +23,10 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* @build BasicLayerTest ModuleUtils
|
||||
* @build BasicLayerTest
|
||||
* jdk.test.lib.util.ModuleUtils
|
||||
* @compile layertest/Test.java
|
||||
* @run testng BasicLayerTest
|
||||
* @summary Basic tests for java.lang.ModuleLayer
|
||||
@ -41,6 +42,8 @@ import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import jdk.test.lib.util.ModuleUtils;
|
||||
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
|
||||
import org.testng.annotations.DataProvider;
|
||||
|
@ -23,9 +23,11 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build LayerAndLoadersTest jdk.test.lib.compiler.CompilerUtils ModuleUtils
|
||||
* @build LayerAndLoadersTest
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* jdk.test.lib.util.ModuleUtils
|
||||
* @run testng LayerAndLoadersTest
|
||||
* @summary Tests for java.lang.ModuleLayer@defineModulesWithXXX methods
|
||||
*/
|
||||
@ -54,6 +56,7 @@ import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.util.ModuleUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -23,8 +23,9 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @build LayerControllerTest ModuleUtils
|
||||
* @library /test/lib
|
||||
* @build LayerControllerTest
|
||||
* jdk.test.lib.util.ModuleUtils
|
||||
* @run testng LayerControllerTest
|
||||
* @summary Basic tests for java.lang.ModuleLayer.Controller
|
||||
*/
|
||||
@ -35,6 +36,8 @@ import java.lang.module.ModuleFinder;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import jdk.test.lib.util.ModuleUtils;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import static org.testng.Assert.*;
|
||||
|
||||
|
@ -23,9 +23,10 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build AutomaticModulesTest ModuleUtils
|
||||
* @library /test/lib
|
||||
* @build AutomaticModulesTest
|
||||
* jdk.test.lib.util.JarUtils
|
||||
* jdk.test.lib.util.ModuleUtils
|
||||
* @run testng AutomaticModulesTest
|
||||
* @summary Basic tests for automatic modules
|
||||
*/
|
||||
@ -50,6 +51,7 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.util.JarUtils;
|
||||
import jdk.test.lib.util.ModuleUtils;
|
||||
|
||||
import org.testng.annotations.DataProvider;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -23,10 +23,11 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.base/jdk.internal.module
|
||||
* @build ConfigurationTest ModuleUtils
|
||||
* @build ConfigurationTest
|
||||
* jdk.test.lib.util.ModuleUtils
|
||||
* @run testng ConfigurationTest
|
||||
* @summary Basic tests for java.lang.module.Configuration
|
||||
*/
|
||||
@ -47,6 +48,8 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import jdk.test.lib.util.ModuleUtils;
|
||||
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import jdk.internal.module.ModuleInfoWriter;
|
||||
import jdk.internal.module.ModuleTarget;
|
||||
|
@ -42,7 +42,6 @@ import static org.testng.Assert.*;
|
||||
/**
|
||||
* @test
|
||||
* @bug 8142968 8173381
|
||||
* @library /lib/testlibrary
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* @modules java.base/jdk.internal.module
|
||||
* @modules java.base/jdk.internal.org.objectweb.asm
|
||||
|
@ -44,7 +44,7 @@ import static org.testng.Assert.*;
|
||||
/**
|
||||
* @test
|
||||
* @bug 8142968 8173381 8174740
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /test/lib
|
||||
* @modules jdk.compiler jdk.jlink
|
||||
* @modules java.base/jdk.internal.module
|
||||
* @modules java.base/jdk.internal.org.objectweb.asm
|
||||
|
@ -21,6 +21,8 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.test.lib.util;
|
||||
|
||||
import java.lang.module.ModuleDescriptor;
|
||||
import java.lang.module.ModuleFinder;
|
||||
import java.lang.module.ModuleReader;
|
||||
@ -47,7 +49,7 @@ public final class ModuleUtils {
|
||||
* Returns a ModuleFinder that finds modules with the given module
|
||||
* descriptors.
|
||||
*/
|
||||
static ModuleFinder finderOf(ModuleDescriptor... descriptors) {
|
||||
public static ModuleFinder finderOf(ModuleDescriptor... descriptors) {
|
||||
|
||||
// Create a ModuleReference for each module
|
||||
Map<String, ModuleReference> namesToReference = new HashMap<>();
|
Loading…
x
Reference in New Issue
Block a user