langtools/test/tools/javah/T4942232/MissingParamClassTest.java
changeset 36778 e04318f39f92
parent 36526 3b41f1c69604
child 36991 7f814aac1f80
--- a/langtools/test/tools/javah/T4942232/MissingParamClassTest.java	Thu Mar 31 14:56:33 2016 -0700
+++ b/langtools/test/tools/javah/T4942232/MissingParamClassTest.java	Thu Mar 31 15:20:50 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, 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
@@ -29,10 +29,8 @@
  * class is missing or not in the classpath
  * @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.JavahTask
  * @run compile MissingParamClassTest.java
  * @clean MissingParamClassException
  * @run main MissingParamClassTest
@@ -44,17 +42,21 @@
 import java.nio.file.Files;
 import java.nio.file.Paths;
 
+import toolbox.JavahTask;
+import toolbox.Task;
+import toolbox.ToolBox;
+
 // Original test: test/tools/javah/MissingParamClassTest.sh
 public class MissingParamClassTest {
 
     public static void main(String[] args) throws Exception {
         ToolBox tb = new ToolBox();
 
-        String out = tb.new JavahTask()
+        String out = new JavahTask(tb)
                 .classpath(ToolBox.testClasses)
                 .classes("ParamClassTest")
-                .run(ToolBox.Expect.FAIL)
-                .getOutput(ToolBox.OutputKind.DIRECT);
+                .run(Task.Expect.FAIL)
+                .getOutput(Task.OutputKind.DIRECT);
 
         if (Files.exists(Paths.get("ParamClassTest.h")) || out.isEmpty())
             throw new AssertionError("The only output generated by javah must be an error message");