< prev index next >

test/jdk/com/sun/tools/jextract/Runner.java

Print this page

        

@@ -59,11 +59,11 @@
 import static org.testng.Assert.fail;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Factory;
 import org.testng.annotations.Test;
-import com.sun.tools.jextract.*;
+import com.sun.tools.jextract.Context;
 
 /*
  * @test
  * @summary Main test runner created all cases
  * @modules java.base/jdk.internal.org.objectweb.asm

@@ -84,11 +84,11 @@
     private Map<String, byte[]> actualClz;
     private ClassLoader actualCL;
     private Object[][] clz_data;
 
     public Runner(Path nativeSrc, String pkg, Path[] javaSrcFiles) {
-        ctx = Context.newInstance();
+        this.ctx = new Context();
         this.nativeSrc = nativeSrc;
         this.pkg = pkg;
         this.javaSrcFiles = javaSrcFiles;
     }
 

@@ -97,11 +97,11 @@
             throw new IllegalArgumentException("Cannot read the file: " + nativeSrc);
         }
         Path p = nativeSrc.toAbsolutePath();
         ctx.usePackageForFolder(p.getParent(), pkg);
         ctx.addSource(p);
-        ctx.parse(AsmCodeFactory::new);
+        ctx.parse();
         return ctx.collectClasses(pkg);
     }
 
     private InMemoryFileManager<StandardJavaFileManager> compileJavaCode() {
         JavaCompiler cl = ToolProvider.getSystemJavaCompiler();
< prev index next >