Skip to content

Commit 4e68d66

Browse files
committed
8344954: Linker tests fails on BE platforms after JDK-8340205
Reviewed-by: mdoerr, amitkumar
1 parent ca81ab5 commit 4e68d66

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/jdk/java/foreign/TestLinker.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public void interwovenPadding() {
181181
var fd = FunctionDescriptor.of(struct, struct, struct);
182182
var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd));
183183
assertEquals(e.getMessage(),
184-
"The padding layout x2 was preceded by another padding layout x1 in [b1x1x2i4]");
184+
"The padding layout x2 was preceded by another padding layout x1 in " + struct);
185185
}
186186

187187
@Test
@@ -199,7 +199,7 @@ public void stackedPadding() {
199199
var fd = FunctionDescriptor.of(struct, struct, struct);
200200
var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd));
201201
assertEquals(e.getMessage(),
202-
"The padding layout x2 was preceded by another padding layout x1 in [b1x1x2x4x8x16[[[4:j8]]|x32]]");
202+
"The padding layout x2 was preceded by another padding layout x1 in " + struct);
203203
}
204204

205205
@Test
@@ -208,7 +208,7 @@ public void paddingUnionByteSize3() {
208208
var union = MemoryLayout.unionLayout(MemoryLayout.paddingLayout(3), ValueLayout.JAVA_INT);
209209
var fd = FunctionDescriptor.of(union, union, union);
210210
var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd));
211-
assertEquals(e.getMessage(), "Superfluous padding x3 in [x3|i4]");
211+
assertEquals(e.getMessage(), "Superfluous padding x3 in " + union);
212212
}
213213

214214
@Test
@@ -217,7 +217,7 @@ public void paddingUnionByteSize4() {
217217
var union = MemoryLayout.unionLayout(MemoryLayout.paddingLayout(4), ValueLayout.JAVA_INT);
218218
var fd = FunctionDescriptor.of(union, union, union);
219219
var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd));
220-
assertEquals(e.getMessage(), "Superfluous padding x4 in [x4|i4]");
220+
assertEquals(e.getMessage(), "Superfluous padding x4 in " + union);
221221
}
222222

223223
@Test
@@ -226,7 +226,7 @@ public void paddingUnionByteSize5() {
226226
var union = MemoryLayout.unionLayout(MemoryLayout.paddingLayout(5), ValueLayout.JAVA_INT);
227227
var fd = FunctionDescriptor.of(union, union, union);
228228
var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd));
229-
assertEquals(e.getMessage(), "Layout '[x5|i4]' has unexpected size: 5 != 4");
229+
assertEquals(e.getMessage(), "Layout '" + union + "' has unexpected size: 5 != 4");
230230
}
231231

232232
@Test
@@ -239,7 +239,7 @@ public void paddingUnionSeveral() {
239239
MemoryLayout.paddingLayout(16));
240240
var fd = FunctionDescriptor.of(union, union, union);
241241
var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd));
242-
assertEquals(e.getMessage(), "More than one padding in [[3:i4]|j8|x16|x16]");
242+
assertEquals(e.getMessage(), "More than one padding in " + union);
243243
}
244244

245245
@Test

0 commit comments

Comments
 (0)