Skip to content

Commit defc7e0

Browse files
committed
8318454: TestLayoutPaths broken on Big Endian platforms after JDK-8317837
Reviewed-by: mdoerr, mcimadamore
1 parent 3c70f2c commit defc7e0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/jdk/java/foreign/TestLayoutPaths.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import static java.lang.foreign.MemoryLayout.PathElement.groupElement;
4343
import static java.lang.foreign.MemoryLayout.PathElement.sequenceElement;
4444
import static java.lang.foreign.ValueLayout.JAVA_INT;
45-
import static java.lang.foreign.ValueLayout.JAVA_LONG;
4645
import static java.lang.foreign.ValueLayout.JAVA_SHORT;
4746
import static org.testng.Assert.*;
4847

@@ -139,8 +138,8 @@ public void testByteOffsetHandleBadRange() {
139138
@Test
140139
public void testBadAlignmentOfRoot() {
141140
MemoryLayout struct = MemoryLayout.structLayout(
142-
JAVA_INT,
143-
JAVA_SHORT.withName("x"));
141+
JAVA_INT.withOrder(ByteOrder.LITTLE_ENDIAN),
142+
JAVA_SHORT.withOrder(ByteOrder.LITTLE_ENDIAN).withName("x"));
144143
assertEquals(struct.byteAlignment(), 4);
145144

146145
try (Arena arena = Arena.ofConfined()) {

0 commit comments

Comments
 (0)