< prev index next >

test/jdk/tools/launcher/modules/addmods/AddModsTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 96,146 **** .getExitValue(); assertTrue(exitValue == 0); } - /** - * Basic test of --add-modules ALL-DEFAULT. Module java.xml.ws.annotation - * should not resolved and so the types in that module should not be - * visible. - */ - public void testAddDefaultModules2() throws Exception { - - // java --add-modules ALL-DEFAULT --module-path mods1 -m test ... - int exitValue - = executeTestJava("--module-path", MODS1_DIR.toString(), - "--add-modules", "ALL-DEFAULT", - "-m", TEST_MID, - "javax.annotation.Generated") - .outputTo(System.out) - .errorTo(System.out) - .shouldContain("ClassNotFoundException") - .getExitValue(); - - assertTrue(exitValue != 0); - } - - /** - * Basic test of --add-modules ALL-SYSTEM. All system modules should be resolved - * and thus all types in those modules should be visible. - */ - public void testAddSystemModules() throws Exception { - - // java --add-modules ALL-SYSTEM --module-path mods1 -m test ... - int exitValue - = executeTestJava("--module-path", MODS1_DIR.toString(), - "--add-modules", "ALL-SYSTEM", - "-m", TEST_MID, - "java.sql.Connection", - "javax.annotation.Generated") - .outputTo(System.out) - .errorTo(System.out) - .getExitValue(); - - assertTrue(exitValue == 0); - } - /** * Run test on class path to load a type in a module on the application * module path, uses {@code --add-modules logger}. */ --- 96,105 ----
< prev index next >