diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DeconstructionTests.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DeconstructionTests.cs index d03deab4a..566a56c3e 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DeconstructionTests.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DeconstructionTests.cs @@ -420,11 +420,83 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty (a, GetRef()) = GetSource(); } + public void RefLocal_FloatToDoubleConversion_Custom2(out double a) + { + (a, GetRef()) = GetSource(); + } + public void RefLocal_FloatToDoubleConversion_Tuple(out double a) { (a, GetRef()) = GetTuple(); } + public void RefLocal_NoConversion_Custom(out MyInt? a) + { + (a, GetRef()) = GetSource(); + } + + public void RefLocal_IntToLongConversion_Custom(out long a) + { + (a, GetRef()) = GetSource(); + } + + // dynamic conversion is not supported + //public void RefLocal_ImplicitReferenceConversion_Custom(out object a) + //{ + // (a, GetRef()) = GetSource(); + //} + + public void RefLocal_NoConversion_Custom_DiscardFirst() + { + (_, GetRef()) = GetSource(); + } + + public void RefLocal_NoConversion_Custom_DiscardLast(out MyInt? a) + { + (a, _) = GetSource(); + } + + public void RefLocal_NoConversion_Tuple(out MyInt? a) + { + (a, GetRef()) = GetTuple(); + } + + public void RefLocal_NoConversion_Tuple_DiscardLast(out MyInt? a) + { + (a, GetRef(), _) = GetTuple(); + } + + // currently we detect deconstruction, iff the first element is not discarded + //public void RefLocal_NoConversion_Tuple_DiscardFirst(out var a) + //{ + // (_, GetRef(), GetRef()) = GetTuple(); + //} + + public void RefLocal_NoConversion_Custom_DiscardSecond(out MyInt? a) + { + (a, _, GetRef()) = GetSource(); + } + + public void RefLocal_NoConversion_Tuple_DiscardSecond(out MyInt? a) + { + (a, _, GetRef()) = GetTuple(); + } + + public void RefLocal_NoConversion_Custom_ReferenceTypes(out string a) + { + (a, GetRef()) = GetSource(); + } + + public void RefLocal_NoConversion_Tuple_ReferenceTypes(out string a) + { + (a, GetRef()) = GetTuple(); + } + + public void RefLocal_IntToLongConversion_Tuple(out long a) + { + (a, GetRef()) = GetTuple(); + } + //public void ArrayAssign_FloatToDoubleConversion_Custom(double[] arr) //{ // (arr[0], arr[1], arr[2]) = GetSource();