Skip to content

Commit dc0596b

Browse files
committed
Remove issue-557 char-default tests that depend on a fix not in this branch
Tests TestCharDefaultValueForStringParameterAsync and TestCharLiteralDefaultValueForStringParameterAsync require the FixCharDefaultsForStringParams fix which is in a separate PR. Removing them from the issue-827 branch to prevent test failures. https://claude.ai/code/session_01AkwUvu3XuCdj3D4axoX4UX
1 parent a68e887 commit dc0596b

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

Tests/CSharp/MemberTests/MemberTests.cs

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,49 +1576,4 @@ private void OptionalByRefWithDefault([Optional][DefaultParameterValue(""a"")] r
15761576
CS7036: There is no argument given that corresponds to the required parameter 'str1' of 'MissingByRefArgumentWithNoExplicitDefaultValue.ByRefNoDefault(ref string)'
15771577
");
15781578
}
1579-
1580-
[Fact]
1581-
public async Task TestCharDefaultValueForStringParameterAsync()
1582-
{
1583-
// Issue #557: VB allows Char as a default value for a String parameter, but C# does not.
1584-
// The fix replaces the default with null and prepends a null-coalescing assignment in the body.
1585-
await TestConversionVisualBasicToCSharpAsync(
1586-
@"Module TestModule
1587-
Friend Const DlM As Char = ""^""c
1588-
1589-
Friend Function LeftSideOf(Optional ByVal strDlM As String = DlM) As String
1590-
Return strDlM
1591-
End Function
1592-
End Module", @"
1593-
internal static partial class TestModule
1594-
{
1595-
internal const char DlM = '^';
1596-
1597-
internal static string LeftSideOf(string strDlM = null)
1598-
{
1599-
strDlM = strDlM ?? DlM.ToString();
1600-
return strDlM;
1601-
}
1602-
}");
1603-
}
1604-
1605-
[Fact]
1606-
public async Task TestCharLiteralDefaultValueForStringParameterAsync()
1607-
{
1608-
// Issue #557: inline char literal as default value for a String parameter.
1609-
await TestConversionVisualBasicToCSharpAsync(
1610-
@"Class TestClass
1611-
Friend Function Foo(Optional s As String = ""^""c) As String
1612-
Return s
1613-
End Function
1614-
End Class", @"
1615-
internal partial class TestClass
1616-
{
1617-
internal string Foo(string s = null)
1618-
{
1619-
s = s ?? '^'.ToString();
1620-
return s;
1621-
}
1622-
}");
1623-
}
16241579
}

0 commit comments

Comments
 (0)