< prev index next >

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

Print this page
rev 51638 : [mq]: 8210112


  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.nio.file.Files;
  25 import java.nio.file.Path;
  26 import java.nio.file.Paths;
  27 
  28 import org.testng.annotations.BeforeClass;
  29 import org.testng.annotations.Test;
  30 
  31 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
  32 import static jdk.testlibrary.ProcessTools.*;
  33 import jdk.test.lib.compiler.CompilerUtils;
  34 import static org.testng.Assert.*;
  35 
  36 /**
  37  * @test
  38  * @bug 8129126 8136802 8137316 8137317 8136804 8139350
  39  * @library /lib/testlibrary /test/lib
  40  * @modules jdk.compiler
  41  *          java.logging
  42  * @build GetResourceBundleTest jdk.testlibrary.ProcessTools
  43  *        jdk.test.lib.compiler.CompilerUtils
  44  * @run testng GetResourceBundleTest
  45  * @summary Tests Logger.getLogger + logger.getResourceBundle in an named/unnamed module,
  46  *          resources are in named and unnamed modules respectively.
  47  *          Positive tests to ensure that a Logger can retrieve ResourceBundle in its current module.
  48  *          Negative tests to ensure that a Logger cannot retrieve ResourceBundle in another module.
  49  *          This test also verifies 8136802 8137316 8137317 8136804 8139350.
  50  */
  51 
  52 public class GetResourceBundleTest {
  53 
  54     private static final String TEST_SRC = System.getProperty("test.src");
  55 
  56     private static final Path MOD_SRC_DIR = Paths.get(TEST_SRC, "src");
  57     private static final Path MOD_DEST_DIR = Paths.get("mods");
  58     private static final Path PKG_SRC_DIR = Paths.get(TEST_SRC, "pkgs");
  59     private static final Path PKG_DEST_DIR = Paths.get("pkgs");
  60 
  61     private static final String[] modules = new String[] {"m1", "m2"};
  62 




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.nio.file.Files;
  25 import java.nio.file.Path;
  26 import java.nio.file.Paths;
  27 
  28 import org.testng.annotations.BeforeClass;
  29 import org.testng.annotations.Test;
  30 
  31 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
  32 import static jdk.test.lib.process.ProcessTools.*;
  33 import jdk.test.lib.compiler.CompilerUtils;
  34 import static org.testng.Assert.*;
  35 
  36 /**
  37  * @test
  38  * @bug 8129126 8136802 8137316 8137317 8136804 8139350
  39  * @library /test/lib
  40  * @modules jdk.compiler
  41  *          java.logging
  42  * @build GetResourceBundleTest jdk.test.lib.process.ProcessTools
  43  *        jdk.test.lib.compiler.CompilerUtils
  44  * @run testng GetResourceBundleTest
  45  * @summary Tests Logger.getLogger + logger.getResourceBundle in an named/unnamed module,
  46  *          resources are in named and unnamed modules respectively.
  47  *          Positive tests to ensure that a Logger can retrieve ResourceBundle in its current module.
  48  *          Negative tests to ensure that a Logger cannot retrieve ResourceBundle in another module.
  49  *          This test also verifies 8136802 8137316 8137317 8136804 8139350.
  50  */
  51 
  52 public class GetResourceBundleTest {
  53 
  54     private static final String TEST_SRC = System.getProperty("test.src");
  55 
  56     private static final Path MOD_SRC_DIR = Paths.get(TEST_SRC, "src");
  57     private static final Path MOD_DEST_DIR = Paths.get("mods");
  58     private static final Path PKG_SRC_DIR = Paths.get(TEST_SRC, "pkgs");
  59     private static final Path PKG_DEST_DIR = Paths.get("pkgs");
  60 
  61     private static final String[] modules = new String[] {"m1", "m2"};
  62 


< prev index next >