Browse Source

Add pretty tests for lifted compound assignment and nullable boxing

The lifted-operator matrix only used pure expressions; compound
assignment on nullable locals and boxing/unboxing conversions of
Nullable<T> were not covered.

Assisted-by: Claude:claude-fable-5:Claude Code
pull/3857/head
Siegfried Pammer 4 days ago committed by Siegfried Pammer
parent
commit
309592c3fe
  1. 20
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs

20
ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs

@ -937,6 +937,26 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -937,6 +937,26 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}
}
internal class T04_LiftedCompoundAssignAndBoxing
{
public static int? CompoundAssign(int? x, int? y)
{
x += y;
x <<= 2;
return x;
}
public static object Box(int? x)
{
return x;
}
public static int? Unbox(object o)
{
return (int?)o;
}
}
// dummy structure for testing custom operators
[StructLayout(LayoutKind.Sequential, Size = 1)]
public struct TS

Loading…
Cancel
Save