Skip to content

Commit 19ece5f

Browse files
committed
Improve diagnostics for int128 test failures
1 parent 7851c4b commit 19ece5f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/tests/Interop/PInvoke/Int128/Int128Test.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@ public struct StructJustInt128
1010
{
1111
public StructJustInt128(Int128 val) { value = val; }
1212
public Int128 value;
13+
14+
public override string ToString () =>
15+
$"StructJustInt128(value={value:X32})";
1316
}
1417

1518
public struct StructWithInt128
1619
{
1720
public StructWithInt128(Int128 val) { value = val; messUpPadding = 0x10; }
1821
public byte messUpPadding;
1922
public Int128 value;
23+
24+
public override string ToString () =>
25+
$"StructWithInt128(messUpPadding={messUpPadding}, value={value:X32})";
2026
}
2127

2228
unsafe partial class Int128Native
@@ -111,6 +117,7 @@ public static void TestInt128FieldLayout()
111117
StructWithInt128 rhs = new StructWithInt128(new Int128(13, 14));
112118

113119
Int128Native.AddStructWithInt128_ByRef(ref lhs, ref rhs);
120+
// Interpreter-FIXME: Incorrect result
114121
Assert.Equal(new StructWithInt128(new Int128(24, 26)), lhs);
115122

116123
Int128 value2;

0 commit comments

Comments
 (0)