@@ -181,7 +181,7 @@ public void interwovenPadding() {
181
181
var fd = FunctionDescriptor .of (struct , struct , struct );
182
182
var e = expectThrows (IllegalArgumentException .class , () -> linker .downcallHandle (fd ));
183
183
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 );
185
185
}
186
186
187
187
@ Test
@@ -199,7 +199,7 @@ public void stackedPadding() {
199
199
var fd = FunctionDescriptor .of (struct , struct , struct );
200
200
var e = expectThrows (IllegalArgumentException .class , () -> linker .downcallHandle (fd ));
201
201
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 );
203
203
}
204
204
205
205
@ Test
@@ -208,7 +208,7 @@ public void paddingUnionByteSize3() {
208
208
var union = MemoryLayout .unionLayout (MemoryLayout .paddingLayout (3 ), ValueLayout .JAVA_INT );
209
209
var fd = FunctionDescriptor .of (union , union , union );
210
210
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 );
212
212
}
213
213
214
214
@ Test
@@ -217,7 +217,7 @@ public void paddingUnionByteSize4() {
217
217
var union = MemoryLayout .unionLayout (MemoryLayout .paddingLayout (4 ), ValueLayout .JAVA_INT );
218
218
var fd = FunctionDescriptor .of (union , union , union );
219
219
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 );
221
221
}
222
222
223
223
@ Test
@@ -226,7 +226,7 @@ public void paddingUnionByteSize5() {
226
226
var union = MemoryLayout .unionLayout (MemoryLayout .paddingLayout (5 ), ValueLayout .JAVA_INT );
227
227
var fd = FunctionDescriptor .of (union , union , union );
228
228
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" );
230
230
}
231
231
232
232
@ Test
@@ -239,7 +239,7 @@ public void paddingUnionSeveral() {
239
239
MemoryLayout .paddingLayout (16 ));
240
240
var fd = FunctionDescriptor .of (union , union , union );
241
241
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 );
243
243
}
244
244
245
245
@ Test
0 commit comments