JDK 14 RFR of JDK-8233940: Preview API tests for String methods should use ${jdk.version} as -source arg
Joe Darcy
joe.darcy at oracle.com
Tue Nov 12 06:13:55 UTC 2019
Hello,
To remove the need to modify tests when the JDK version is updated, the
tests of the preview API in String should use "${jdk.version}" as an
argument to -source rather than a fixed version string:
JDK-8233940: Preview API tests for String methods should use
${jdk.version} as -source arg
http://cr.openjdk.java.net/~darcy/8233940.0/
The new TEST.properties file only affects tests in the java/lang/String
directory. Some additional work is needed before jtreg "smart actions"
can be enabled throughout the tests in the "jdk" directory as they are
already in "langtools".
Patch below.
Thanks,
-Joe
--- old/test/jdk/java/lang/String/Formatted.java 2019-11-11
22:09:42.692005000 -0800
+++ new/test/jdk/java/lang/String/Formatted.java 2019-11-11
22:09:42.476005000 -0800
@@ -25,7 +25,7 @@
* @test
* bug 8203444
* @summary Unit tests for instance versions of String#format
- * @compile --enable-preview -source 14 Formatted.java
+ * @compile --enable-preview -source ${jdk.version} Formatted.java
* @run main/othervm --enable-preview Formatted
*/
--- old/test/jdk/java/lang/String/StripIndent.java 2019-11-11
22:09:43.376005000 -0800
+++ new/test/jdk/java/lang/String/StripIndent.java 2019-11-11
22:09:43.120005000 -0800
@@ -25,7 +25,7 @@
* @test
* @bug 8223775
* @summary This exercises String#stripIndent patterns and limits.
- * @compile --enable-preview -source 14 StripIndent.java
+ * @compile --enable-preview -source ${jdk.version} StripIndent.java
* @run main/othervm --enable-preview StripIndent
*/
--- old/test/jdk/java/lang/String/TranslateEscapes.java 2019-11-11
22:09:44.020005000 -0800
+++ new/test/jdk/java/lang/String/TranslateEscapes.java 2019-11-11
22:09:43.776005000 -0800
@@ -25,7 +25,7 @@
* @test
* @bug 8223780
* @summary This exercises String#translateEscapes patterns and limits.
- * @compile --enable-preview -source 14 TranslateEscapes.java
+ * @compile --enable-preview -source ${jdk.version} TranslateEscapes.java
* @run main/othervm --enable-preview TranslateEscapes
*/
--- /dev/null 2019-09-13 10:19:35.768000000 -0700
+++ new/test/jdk/java/lang/String/TEST.properties 2019-11-11
22:09:44.396005000 -0800
@@ -0,0 +1 @@
+allowSmartActionArgs=true
More information about the core-libs-dev
mailing list