Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Kelman authored and Timur Kelman committed Jul 23, 2024
1 parent e65b3fd commit 236f724
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Tests/CSharp/MemberTests/MemberTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,45 @@ public void set_Prop(int i, string value)
}", incompatibleWithAutomatedCommentTesting: true);// Known bug: Additional declarations don't get comments correctly converted
}

[Fact]
public async Task StaticLocalsInPropertyGetterAndSetterAsync()
{
await TestConversionVisualBasicToCSharpAsync(
@"
Public Property Prop As String
Get
Static b As Boolean
b = True
End Get
Set(ByVal s As String)
Static b As Boolean
b = False
End Set
End Property
", @"
internal partial class SurroundingClass
{
private bool _Prop_b;
private bool _Prop_b1;
public string Prop
{
get
{
_Prop_b = true;
return default;
}
set
{
_Prop_b1 = false;
}
}
}");
}

[Fact]
public async Task TestReadOnlyAndWriteOnlyParametrizedPropertyAsync()
{
Expand Down

0 comments on commit 236f724

Please sign in to comment.