< 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,11 +36,10 @@
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 {
@@ -103,16 +102,12 @@
checkBytes(segment.baseAddress(), layout);
}
}
@Test(expectedExceptions = { UnsupportedOperationException.class,
- OutOfMemoryError.class })
+ IllegalArgumentException.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() {
< prev index next >