8227289: Enable assertions for some shell to java conversion tests after JDK-8218960
Reviewed-by: naoto
--- a/test/jdk/java/util/Calendar/SupplementalJapaneseEraTestRun.java Mon Jul 15 15:27:06 2019 +0200
+++ b/test/jdk/java/util/Calendar/SupplementalJapaneseEraTestRun.java Mon Jul 15 10:21:33 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, 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
@@ -93,7 +93,9 @@
private static void testRun(String property, List<String> javaParam)
throws Throwable{
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
- launcher.addToolArg("-cp")
+ launcher.addToolArg("-ea")
+ .addToolArg("-esa")
+ .addToolArg("-cp")
.addToolArg(Utils.TEST_CLASS_PATH)
.addToolArg("-Djdk.calendar.japanese.supplemental.era=" + property)
.addToolArg("SupplementalJapaneseEraTest");
--- a/test/jdk/java/util/ResourceBundle/Control/MissingResourceCauseTestRun.java Mon Jul 15 15:27:06 2019 +0200
+++ b/test/jdk/java/util/ResourceBundle/Control/MissingResourceCauseTestRun.java Mon Jul 15 10:21:33 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, 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
@@ -85,7 +85,8 @@
String cp = Utils.TEST_CLASSES + File.pathSeparator + Utils.TEST_SRC
+ File.pathSeparator + ".";
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
- launcher.addToolArg("-esa")
+ launcher.addToolArg("-ea")
+ .addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(cp)
.addToolArg("MissingResourceCauseTest");
--- a/test/jdk/java/util/ResourceBundle/modules/ModuleTestUtil.java Mon Jul 15 15:27:06 2019 +0200
+++ b/test/jdk/java/util/ResourceBundle/modules/ModuleTestUtil.java Mon Jul 15 10:21:33 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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
@@ -134,7 +134,9 @@
public static void runModule(String mp, String mn, List<String> localeList)
throws Throwable {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
- launcher.addToolArg("-p")
+ launcher.addToolArg("-ea")
+ .addToolArg("-esa")
+ .addToolArg("-p")
.addToolArg(mp)
.addToolArg("-m")
.addToolArg(mn);
@@ -160,7 +162,9 @@
public static void runModuleWithCp(String cp, String mp, String mn,
List<String> localeList, boolean expected) throws Throwable {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
- launcher.addToolArg("-cp")
+ launcher.addToolArg("-ea")
+ .addToolArg("-esa")
+ .addToolArg("-cp")
.addToolArg(cp)
.addToolArg("-p")
.addToolArg(mp)
--- a/test/jdk/java/util/ResourceBundle/modules/layer/LayerTest.java Mon Jul 15 15:27:06 2019 +0200
+++ b/test/jdk/java/util/ResourceBundle/modules/layer/LayerTest.java Mon Jul 15 10:21:33 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, 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
@@ -72,7 +72,9 @@
private static void runCmd() throws Throwable {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
- launcher.addToolArg("-cp")
+ launcher.addToolArg("-ea")
+ .addToolArg("-esa")
+ .addToolArg("-cp")
.addToolArg(Utils.TEST_CLASSES)
.addToolArg("Main")
.addToolArg(Utils.TEST_CLASSES);
--- a/test/jdk/java/util/ResourceBundle/modules/unnamed/UnNamedTest.java Mon Jul 15 15:27:06 2019 +0200
+++ b/test/jdk/java/util/ResourceBundle/modules/unnamed/UnNamedTest.java Mon Jul 15 10:21:33 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, 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
@@ -74,7 +74,9 @@
private static void runCmd() throws Throwable {
// access resource bundles that are exported private unconditionally.
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
- launcher.addToolArg("-cp")
+ launcher.addToolArg("-ea")
+ .addToolArg("-esa")
+ .addToolArg("-cp")
.addToolArg(Utils.TEST_CLASSES)
.addToolArg("--module-path")
.addToolArg(MODS_DIR.toString())
@@ -92,7 +94,9 @@
// --add-exports can't open resources
launcher = JDKToolLauncher.createUsingTestJDK("java");
- launcher.addToolArg("-cp")
+ launcher.addToolArg("-ea")
+ .addToolArg("-esa")
+ .addToolArg("-cp")
.addToolArg(Utils.TEST_CLASSES)
.addToolArg("--module-path")
.addToolArg(MODS_DIR.toString())
--- a/test/jdk/java/util/ResourceBundle/modules/visibility/VisibilityTest.java Mon Jul 15 15:27:06 2019 +0200
+++ b/test/jdk/java/util/ResourceBundle/modules/visibility/VisibilityTest.java Mon Jul 15 10:21:33 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, 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
@@ -329,6 +329,8 @@
private int runCmd(List<String> argsList) throws Throwable {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
+ launcher.addToolArg("-ea")
+ .addToolArg("-esa");
argsList.forEach(launcher::addToolArg);
return ProcessTools.executeCommand(launcher.getCommand()).getExitValue();
--- a/test/jdk/java/util/TimeZone/Bug8066652Run.java Mon Jul 15 15:27:06 2019 +0200
+++ b/test/jdk/java/util/TimeZone/Bug8066652Run.java Mon Jul 15 10:21:33 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, 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
@@ -51,6 +51,8 @@
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
//Setting invalid TimeZone using VM option
launcher.addToolArg("-Duser.timezone=Foo/Bar")
+ .addToolArg("-ea")
+ .addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(cp)
.addToolArg("Bug8066652");
--- a/test/jdk/java/util/TimeZone/TimeZoneDatePermissionCheckRun.java Mon Jul 15 15:27:06 2019 +0200
+++ b/test/jdk/java/util/TimeZone/TimeZoneDatePermissionCheckRun.java Mon Jul 15 10:21:33 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2019, 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
@@ -69,6 +69,8 @@
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-Djava.security.manager")
.addToolArg("-Djava.security.debug=access,failure,policy")
+ .addToolArg("-ea")
+ .addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(jarPath)
.addToolArg("TimeZoneDatePermissionCheck");