< prev index next >
langtools/test/tools/jdeps/modules/InverseDeps.java
Print this page
*** 115,137 ****
};
}
@Test(dataProvider = "testrequires")
public void testrequires(String name, String[][] expected) throws Exception {
! String cmd1 = String.format("jdeps -inverse -modulepath %s -requires %s -addmods %s%n",
MODS_DIR, name, modules.stream().collect(Collectors.joining(",")));
try (JdepsUtil.Command jdeps = JdepsUtil.newCommand(cmd1)) {
jdeps.appModulePath(MODS_DIR.toString())
.addmods(modules)
.requires(Set.of(name));
runJdeps(jdeps, expected);
}
! String cmd2 = String.format("jdeps -inverse -modulepath %s -requires %s" +
! " -addmods ALL-MODULE-PATH%n", LIBS_DIR, name);
// automatic module
try (JdepsUtil.Command jdeps = JdepsUtil.newCommand(cmd2)) {
jdeps.appModulePath(MODS_DIR.toString())
.addmods(Set.of("ALL-MODULE-PATH"))
--- 115,137 ----
};
}
@Test(dataProvider = "testrequires")
public void testrequires(String name, String[][] expected) throws Exception {
! String cmd1 = String.format("jdeps -inverse --module-path %s -requires %s --add-modules %s%n",
MODS_DIR, name, modules.stream().collect(Collectors.joining(",")));
try (JdepsUtil.Command jdeps = JdepsUtil.newCommand(cmd1)) {
jdeps.appModulePath(MODS_DIR.toString())
.addmods(modules)
.requires(Set.of(name));
runJdeps(jdeps, expected);
}
! String cmd2 = String.format("jdeps -inverse --module-path %s -requires %s" +
! " --add-modules ALL-MODULE-PATH%n", LIBS_DIR, name);
// automatic module
try (JdepsUtil.Command jdeps = JdepsUtil.newCommand(cmd2)) {
jdeps.appModulePath(MODS_DIR.toString())
.addmods(Set.of("ALL-MODULE-PATH"))
*** 162,172 ****
};
}
@Test(dataProvider = "testpackage")
public void testpackage(String name, String[][] expected) throws Exception {
! String cmd = String.format("jdeps -inverse -modulepath %s -package %s -addmods %s%n",
MODS_DIR, name, modules.stream().collect(Collectors.joining(",")));
try (JdepsUtil.Command jdeps = JdepsUtil.newCommand(cmd)) {
jdeps.appModulePath(MODS_DIR.toString())
.addmods(modules)
.matchPackages(Set.of(name));
--- 162,172 ----
};
}
@Test(dataProvider = "testpackage")
public void testpackage(String name, String[][] expected) throws Exception {
! String cmd = String.format("jdeps -inverse --module-path %s -package %s --add-modules %s%n",
MODS_DIR, name, modules.stream().collect(Collectors.joining(",")));
try (JdepsUtil.Command jdeps = JdepsUtil.newCommand(cmd)) {
jdeps.appModulePath(MODS_DIR.toString())
.addmods(modules)
.matchPackages(Set.of(name));
*** 193,203 ****
};
}
@Test(dataProvider = "testregex")
public void testregex(String name, String[][] expected) throws Exception {
! String cmd = String.format("jdeps -inverse -modulepath %s -regex %s -addmods %s%n",
MODS_DIR, name, modules.stream().collect(Collectors.joining(",")));
try (JdepsUtil.Command jdeps = JdepsUtil.newCommand(cmd)) {
jdeps.appModulePath(MODS_DIR.toString())
.addmods(modules)
--- 193,203 ----
};
}
@Test(dataProvider = "testregex")
public void testregex(String name, String[][] expected) throws Exception {
! String cmd = String.format("jdeps -inverse --module-path %s -regex %s --add-modules %s%n",
MODS_DIR, name, modules.stream().collect(Collectors.joining(",")));
try (JdepsUtil.Command jdeps = JdepsUtil.newCommand(cmd)) {
jdeps.appModulePath(MODS_DIR.toString())
.addmods(modules)
< prev index next >