diff --git a/manual/Tasks/junit.html b/manual/Tasks/junit.html index 9a4022e53..a6879a89b 100644 --- a/manual/Tasks/junit.html +++ b/manual/Tasks/junit.html @@ -814,10 +814,10 @@ class.
<junit fork="true"
jvm="${platform.java}">
- <jvmarg value="-Xpatch:${module.name}=${build.test.classes}"/>
- <jvmarg line="-addmods ${module.name}"/>
- <jvmarg value="-XaddReads:${module.name}=ALL-UNNAMED"/>
- <jvmarg value="-XaddExports:${module.name}/my.test=ALL-UNNAMED"/>
+ <jvmarg line="--patch-module ${module.name}=${build.test.classes}"/>
+ <jvmarg line="--add-modules ${module.name}"/>
+ <jvmarg line="--add-reads ${module.name}=ALL-UNNAMED"/>
+ <jvmarg line="--add-exports ${module.name}/my.test=ALL-UNNAMED"/>
<classpath>
<pathelement path="${libs.junit}"/>
</classpath>
@@ -831,16 +831,16 @@ class.
Runs my.test.TestCase as a white-box test in the forked VM given by the platform.java property.
The junit library is a part of an unnamed module while the tested project and required modules are on the module path. The tests
do not have module-info file and are executed in the project module given by module.name property.
-The -Xpatch java option executes the tests built into ${build.test.classes} in a module given
+The --patch-module java option executes the tests built into ${build.test.classes} in a module given
by module.name property.
-The -addmods java option enables the tested module.
-The -XaddReads java option makes the unnamed module containing the junit readable by tested module.
-The -XaddExports java option makes the non-exported test package my.test accessible from the unnamed module containing the junit.
+The --add-modules java option enables the tested module.
+The --add-reads java option makes the unnamed module containing the junit readable by tested module.
+The --add-exports java option makes the non-exported test package my.test accessible from the unnamed module containing the junit.
<junit fork="true"
jvm="${platform.java}">
- <jvmarg line="-addmods ${test.module.name}"/>
- <jvmarg value="-XaddExports:${test.module.name}/my.test=junit,ALL-UNNAMED"/>
+ <jvmarg line="--add-modules ${test.module.name}"/>
+ <jvmarg line="--add-exports ${test.module.name}/my.test=junit,ALL-UNNAMED"/>
<modulepath>
<pathelement path="${modules}:${build.classes}:${libs.junit}"/>
</modulepath>
@@ -850,8 +850,8 @@ The -XaddExports java option makes the non-exported test package
Runs my.test.TestCase as a black-box test in the forked VM given by the platform.java property.
The junit library is used as an automatic module. The tests module-info requires the tested module and junit.
-The -addmods java option enables the test module.
-The -XaddExports java option makes the non-exported test package my.test accessible from the junit module and Ant's test runner.
+The --add-modules java option enables the test module.
+The --add-exports java option makes the non-exported test package my.test accessible from the junit module and Ant's test runner.
Another possibility is to export the test package in the tests module-info by exports my.test directive.