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 19, 2024
1 parent ccbd778 commit 4c5d449
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions Tests/CSharp/MemberTests/MemberTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4019,6 +4019,58 @@ public static int StaticTestProperty
return _StaticTestProperty_sPrevPosition + 1;
}
}
}");
}

[Fact]
public async Task IndexedPropertyWithTriviaAsync()
{
//issue 1095
await TestConversionVisualBasicToCSharpAsync(
@"Class IndexedPropertyWithTrivia
'a
Property P(i As Integer) As Integer
'b
Get
'1
Dim x = 1 '2
'3
End Get
'c
Set(value As Integer)
'4
Dim x = 1 '5
'6
x = value + i '7
'8
End Set
'd
End Property
End Class", @"using System;
internal partial class IndexedPropertyWithTrivia
{
// a
public int get_P(int i)
// b
{
// 1
int x = 1; // 2
return default;
// 3
}
// c
public void set_P(int i, int value)
{
// 4
int x = 1; // 5
// 6
x = value + i; // 7
// 8
}
// d
}");
}
}

0 comments on commit 4c5d449

Please sign in to comment.