Skip to content

Commit 2ade291

Browse files
committed
Add test cases: char == char.MinValue in conditional and empty-string comparison
https://claude.ai/code/session_01AkwUvu3XuCdj3D4axoX4UX
1 parent d947a26 commit 2ade291

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Tests/CSharp/ExpressionTests/StringExpressionTests.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,30 @@ private void TestMethod()
564564
bool testResult2 = testChar == char.MinValue;
565565
bool testResult3 = testChar != char.MinValue;
566566
}
567+
}");
568+
}
569+
570+
[Fact]
571+
public async Task CharEqualityInConditionAsync()
572+
{
573+
await TestConversionVisualBasicToCSharpAsync(@"Class TestClass
574+
Private Function IsEmpty(c As Char) As Boolean
575+
If c = """" Then
576+
Return True
577+
End If
578+
Return False
579+
End Function
580+
End Class", @"
581+
internal partial class TestClass
582+
{
583+
private bool IsEmpty(char c)
584+
{
585+
if (c == char.MinValue)
586+
{
587+
return true;
588+
}
589+
return false;
590+
}
567591
}");
568592
}
569593
}

0 commit comments

Comments
 (0)