< prev index next > test/jdk/tools/jextract/test8241925/LibTest8241925Test.java
Print this page
* 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.*;
* @run testng/othervm -Dforeign.restricted=permit LibTest8241925Test
*/
public class LibTest8241925Test {
@Test
public void test() {
- try (var scope = NativeAllocationScope.unboundedScope()) {
+ 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 >