< prev index next >

test/tools/launcher/modules/upgrademodulepath/UpgradeModulePathTest.java

Print this page

        

*** 31,42 **** */ import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; ! import static jdk.testlibrary.ProcessTools.executeTestJava; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import static org.testng.Assert.*; --- 31,43 ---- */ import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; + import java.util.Arrays; ! import static jdk.testlibrary.ProcessTools.executeModularTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import static org.testng.Assert.*;
*** 89,104 **** public void testWithUpgradedModule() throws Exception { String mid = "test/jdk.test.Main"; int exitValue ! = executeTestJava( ! "-upgrademodulepath", UPGRADEDMODS_DIR.toString(), ! "-mp", MODS_DIR.toString(), ! "-m", mid) ! .outputTo(System.out) ! .errorTo(System.out) .getExitValue(); assertTrue(exitValue == 0); } --- 90,102 ---- public void testWithUpgradedModule() throws Exception { String mid = "test/jdk.test.Main"; int exitValue ! = executeModularTest(mid, null, ! Arrays.asList( "-upgrademodulepath", UPGRADEDMODS_DIR.toString()), ! null, Arrays.asList(MODS_DIR), null) .getExitValue(); assertTrue(exitValue == 0); }
*** 113,128 **** String upgrademodulepath = "DoesNotExit" + File.pathSeparator + UPGRADEDMODS_DIR.toString(); String mid = "test/jdk.test.Main"; int exitValue ! = executeTestJava( ! "-upgrademodulepath", upgrademodulepath, ! "-mp", MODS_DIR.toString(), ! "-m", mid) ! .outputTo(System.out) ! .errorTo(System.out) .getExitValue(); assertTrue(exitValue == 0); } --- 111,123 ---- String upgrademodulepath = "DoesNotExit" + File.pathSeparator + UPGRADEDMODS_DIR.toString(); String mid = "test/jdk.test.Main"; int exitValue ! = executeModularTest(mid, null, ! Arrays.asList("-upgrademodulepath", upgrademodulepath), ! null, Arrays.asList(MODS_DIR), null) .getExitValue(); assertTrue(exitValue == 0); }
< prev index next >