< prev index next >

test/java/util/logging/modules/GetResourceBundleTest.java

Print this page

        

*** 22,31 **** --- 22,33 ---- */ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; + import java.util.Collections; + import java.util.Arrays; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
*** 80,109 **** Files.copy(PKG_SRC_DIR.resolve(p3), PKG_DEST_DIR.resolve(p3), REPLACE_EXISTING); } @Test public void runWithoutSecurityManager() throws Exception { ! int exitValue = executeTestJava( ! "-cp", PKG_DEST_DIR.toString(), ! "-mp", MOD_DEST_DIR.toString(), ! "-addmods", String.join(",", modules), ! "p3.test.ResourceBundleTest") ! .outputTo(System.out) ! .errorTo(System.err) .getExitValue(); assertTrue(exitValue == 0); } @Test public void runWithSecurityManager() throws Exception { ! int exitValue = executeTestJava( ! "-Djava.security.manager", ! "-cp", PKG_DEST_DIR.toString(), ! "-mp", MOD_DEST_DIR.toString(), ! "-addmods", String.join(",", modules), ! "p3.test.ResourceBundleTest") ! .outputTo(System.out) ! .errorTo(System.err) .getExitValue(); assertTrue(exitValue == 0); } } --- 82,101 ---- Files.copy(PKG_SRC_DIR.resolve(p3), PKG_DEST_DIR.resolve(p3), REPLACE_EXISTING); } @Test public void runWithoutSecurityManager() throws Exception { ! int exitValue = executeModularTest(null, "p3.test.ResourceBundleTest", null, ! Arrays.asList(PKG_DEST_DIR), Arrays.asList(MOD_DEST_DIR), Arrays.asList(modules)) .getExitValue(); assertTrue(exitValue == 0); } @Test public void runWithSecurityManager() throws Exception { ! int exitValue = executeModularTest(null, "p3.test.ResourceBundleTest", ! Arrays.asList("-Djava.security.manager"), ! Arrays.asList(PKG_DEST_DIR), Arrays.asList(MOD_DEST_DIR), Arrays.asList(modules)) .getExitValue(); assertTrue(exitValue == 0); } }
< prev index next >