8165583: Fix module dependencies for jdk/java/util/* tests
authorskovalev
Thu, 08 Sep 2016 09:59:54 -0700
changeset 40797 4618571397a5
parent 40796 91ffd8a6f473
child 40798 acb8f3cd80b6
8165583: Fix module dependencies for jdk/java/util/* tests Reviewed-by: alanb
jdk/test/java/util/Calendar/Bug4302966.java
jdk/test/java/util/Date/Bug8135055.java
jdk/test/java/util/Formatter/FormatLocale.java
jdk/test/java/util/ResourceBundle/modules/security/TestPermission.java
jdk/test/java/util/ServiceLoader/modules/ServicesTest.java
jdk/test/java/util/TimeZone/HongKong.java
jdk/test/java/util/logging/modules/GetResourceBundleTest.java
--- a/jdk/test/java/util/Calendar/Bug4302966.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/jdk/test/java/util/Calendar/Bug4302966.java	Thu Sep 08 09:59:54 2016 -0700
@@ -24,6 +24,7 @@
 /*
  * @test
  * @bug 4302966
+ * @modules jdk.localedata
  * @summary In Czech Republic first day of week is Monday not Sunday
  */
 
--- a/jdk/test/java/util/Date/Bug8135055.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/jdk/test/java/util/Date/Bug8135055.java	Thu Sep 08 09:59:54 2016 -0700
@@ -24,6 +24,7 @@
 /*
  * @test
  * @bug 8135055
+ * @modules java.sql
  * @summary Test java.sql.TimeStamp instance should come after java.util.Date
  * if Nanos component of TimeStamp is not equal to 0 milliseconds.
 */
--- a/jdk/test/java/util/Formatter/FormatLocale.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/jdk/test/java/util/Formatter/FormatLocale.java	Thu Sep 08 09:59:54 2016 -0700
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 8146156 8159548
+ * @modules jdk.localedata
  * @summary test whether uppercasing follows Locale.Category.FORMAT locale.
  * @run main/othervm FormatLocale
  */
--- a/jdk/test/java/util/ResourceBundle/modules/security/TestPermission.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/jdk/test/java/util/ResourceBundle/modules/security/TestPermission.java	Thu Sep 08 09:59:54 2016 -0700
@@ -69,6 +69,7 @@
     @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)
--- a/jdk/test/java/util/ServiceLoader/modules/ServicesTest.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/jdk/test/java/util/ServiceLoader/modules/ServicesTest.java	Thu Sep 08 09:59:54 2016 -0700
@@ -42,7 +42,7 @@
  * @test
  * @library /lib/testlibrary
  * @modules java.scripting
-            jdk.compiler
+ *          jdk.compiler
  * @build ServicesTest CompilerUtils jdk.testlibrary.*
  * @run testng ServicesTest
  * @summary Tests ServiceLoader to locate service providers on the module path
@@ -112,6 +112,7 @@
     public void runWithModulePath() throws Exception {
         int exitValue
             = executeTestJava("--module-path", MODS_DIR.toString(),
+                              "--add-modules", "bananascript",
                               "-m", "test/test.Main",
                               "BananaScriptEngine")
                 .outputTo(System.out)
@@ -131,6 +132,7 @@
         int exitValue
             = executeTestJava("--module-path", MODS_DIR.toString(),
                               "-cp", CLASSES_DIR.toString(),
+                              "--add-modules", "bananascript",
                               "-m", "test/test.Main",
                               "BananaScriptEngine", "PearScriptEngine")
                 .outputTo(System.out)
--- a/jdk/test/java/util/TimeZone/HongKong.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/jdk/test/java/util/TimeZone/HongKong.java	Thu Sep 08 09:59:54 2016 -0700
@@ -24,6 +24,7 @@
 /*
  * @test
  * @bug 4487276 8008577
+ * @modules jdk.localedata
  * @summary Verify that Hong Kong locale uses traditional Chinese names.
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI HongKong
  */
--- a/jdk/test/java/util/logging/modules/GetResourceBundleTest.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/jdk/test/java/util/logging/modules/GetResourceBundleTest.java	Thu Sep 08 09:59:54 2016 -0700
@@ -37,6 +37,7 @@
  * @bug 8129126 8136802 8137316 8137317 8136804 8139350
  * @library /lib/testlibrary
  * @modules jdk.compiler
+ *          java.logging
  * @build GetResourceBundleTest CompilerUtils jdk.testlibrary.ProcessTools
  * @run testng GetResourceBundleTest
  * @summary Tests Logger.getLogger + logger.getResourceBundle in an named/unnamed module,