changeset 17733:10d8bdeabfa5

8165583: Fix module dependencies for jdk/java/util/* tests Reviewed-by: alanb
author skovalev
date Thu, 08 Sep 2016 09:59:54 -0700
parents c2895dc9842f
children 0d5787987564
files test/java/util/Calendar/Bug4302966.java test/java/util/Date/Bug8135055.java test/java/util/Formatter/FormatLocale.java test/java/util/ResourceBundle/modules/security/TestPermission.java test/java/util/ServiceLoader/modules/ServicesTest.java test/java/util/TimeZone/HongKong.java test/java/util/logging/modules/GetResourceBundleTest.java
diffstat 7 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/util/Calendar/Bug4302966.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/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/test/java/util/Date/Bug8135055.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/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/test/java/util/Formatter/FormatLocale.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/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/test/java/util/ResourceBundle/modules/security/TestPermission.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/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/test/java/util/ServiceLoader/modules/ServicesTest.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/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/test/java/util/TimeZone/HongKong.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/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/test/java/util/logging/modules/GetResourceBundleTest.java	Thu Sep 08 09:45:50 2016 -0700
+++ b/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,