Browse Source

Add test case for empty string pattern

pull/3049/head
Siegfried Pammer 2 years ago
parent
commit
97b6a2fe67
  1. 12
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PatternMatching.cs

12
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PatternMatching.cs

@ -717,6 +717,18 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -717,6 +717,18 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}
}
public void RecursivePattern_CustomStructNested_EmptyString(object obj)
{
if (obj is S { S2: { Text: "" } })
{
Console.WriteLine("Test " + obj);
}
else
{
Console.WriteLine("not Test");
}
}
public void RecursivePattern_CustomStructNested_Float(object obj)
{
if (obj is S { S2: { F: 3.141f, Obj: null } })

Loading…
Cancel
Save