< prev index next >
test/jdk/java/foreign/TestArrays.java
Print this page
rev 57826 : 8237521: Memory Access API fixes for 32-bit
Reviewed-by: mcimadamore, dholmes
*** 36,46 ****
import java.lang.invoke.VarHandle;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
- import org.testng.SkipException;
import org.testng.annotations.*;
import static org.testng.Assert.*;
public class TestArrays {
--- 36,45 ----
*** 103,118 ****
checkBytes(segment.baseAddress(), layout);
}
}
@Test(expectedExceptions = { UnsupportedOperationException.class,
! OutOfMemoryError.class })
public void testTooBigForArray() {
- if (System.getProperty("sun.arch.data.model").equals("32")) {
- throw new SkipException("32-bit Unsafe does not support this allocation size");
- }
-
MemorySegment.allocateNative((long) Integer.MAX_VALUE * 2).toByteArray();
}
@Test(expectedExceptions = IllegalStateException.class)
public void testArrayFromClosedSegment() {
--- 102,113 ----
checkBytes(segment.baseAddress(), layout);
}
}
@Test(expectedExceptions = { UnsupportedOperationException.class,
! IllegalArgumentException.class })
public void testTooBigForArray() {
MemorySegment.allocateNative((long) Integer.MAX_VALUE * 2).toByteArray();
}
@Test(expectedExceptions = IllegalStateException.class)
public void testArrayFromClosedSegment() {
< prev index next >