mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8152897: refactor ToolBox to allow reduced documented dependencies
Reviewed-by: vromero
This commit is contained in:
parent
208d93e110
commit
7812306bc0
212 changed files with 3955 additions and 3485 deletions
|
@ -27,16 +27,19 @@
|
|||
* @summary Verify that javap marks public interfaces as public
|
||||
* @library /tools/lib
|
||||
* @modules jdk.compiler/com.sun.tools.javac.api
|
||||
* jdk.compiler/com.sun.tools.javac.file
|
||||
* jdk.compiler/com.sun.tools.javac.main
|
||||
* jdk.jdeps/com.sun.tools.javap
|
||||
* @build ToolBox
|
||||
* @build toolbox.ToolBox toolbox.JavapTask
|
||||
* @run main PublicInterfaceTest
|
||||
*/
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import toolbox.JavapTask;
|
||||
import toolbox.Task;
|
||||
import toolbox.ToolBox;
|
||||
|
||||
// Original test: test/tools/javap/PublicInterfaceTest.sh
|
||||
public class PublicInterfaceTest {
|
||||
public interface Test {}
|
||||
|
@ -46,10 +49,10 @@ public class PublicInterfaceTest {
|
|||
|
||||
Path pathToClass = Paths.get(ToolBox.testClasses, "PublicInterfaceTest$Test.class");
|
||||
|
||||
String out = tb.new JavapTask()
|
||||
String out = new JavapTask(tb)
|
||||
.classes(pathToClass.toString())
|
||||
.run()
|
||||
.getOutput(ToolBox.OutputKind.DIRECT);
|
||||
.getOutput(Task.OutputKind.DIRECT);
|
||||
|
||||
if (!out.contains("public"))
|
||||
throw new AssertionError("The javap output does not contain \"public\"");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue