< prev index next >

test/jdk/tools/jextract/test8241925/LibTest8241925Test.java

Print this page
*** 21,11 ***
   * questions.
   */
  
  import java.util.stream.DoubleStream;
  import java.util.stream.IntStream;
- import jdk.incubator.foreign.NativeAllocationScope;
  import org.testng.annotations.Test;
  import test.jextract.test8241925.*;
  import static org.testng.Assert.assertEquals;
  import static test.jextract.test8241925.test8241925_h.*;
  
--- 21,10 ---

*** 39,11 ***
   * @run testng/othervm -Dforeign.restricted=permit LibTest8241925Test
   */
  public class LibTest8241925Test {
      @Test
      public void test() {
!         try (var scope = NativeAllocationScope.unboundedScope()) {
              var addr = Cint.allocate(12, scope);
              assertEquals(Cint.get(addr), 12);
              square(addr);
              assertEquals(Cint.get(addr), 144);
  
--- 38,11 ---
   * @run testng/othervm -Dforeign.restricted=permit LibTest8241925Test
   */
  public class LibTest8241925Test {
      @Test
      public void test() {
!         try (var scope = new CScope()) {
              var addr = Cint.allocate(12, scope);
              assertEquals(Cint.get(addr), 12);
              square(addr);
              assertEquals(Cint.get(addr), 144);
  
< prev index next >