< prev index next >
test/java/util/ResourceBundle/modules/security/TestPermission.java
Print this page
*** 24,44 ****
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
! import static jdk.testlibrary.ProcessTools.executeTestJava;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
/**
* @test
* @library /lib/testlibrary
* @modules jdk.compiler
! * @build TestPermission CompilerUtils jdk.testlibrary.*
* @run testng TestPermission
* @summary Driver for testing ResourceBundle::getBundle(String, Module)
*/
public class TestPermission {
--- 24,44 ----
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
! import jdk.testlibrary.tasks.JavaTask;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
/**
* @test
* @library /lib/testlibrary
* @modules jdk.compiler
! * @build TestPermission CompilerUtils jdk.testlibrary.tasks.JavaTask
* @run testng TestPermission
* @summary Driver for testing ResourceBundle::getBundle(String, Module)
*/
public class TestPermission {
*** 66,80 ****
/**
* Run the modular test
*/
@Test
public void runTest() throws Exception {
! int exitValue = executeTestJava("--module-path", MODS_DIR.toString(),
! "--add-modules", "m1",
! "-m", "test/jdk.test.Main")
! .outputTo(System.out)
! .errorTo(System.out)
! .getExitValue();
!
! assertTrue(exitValue == 0);
}
}
--- 66,76 ----
/**
* Run the modular test
*/
@Test
public void runTest() throws Exception {
! new JavaTask().ignoreStandardModuleOptions()
! .modulepath(MODS_DIR.toString())
! .addModules("m1")
! .moduleName("test").className("jdk.test.Main").run();
}
}
< prev index next >