Skip to content

Commit a64e208

Browse files
Timur KelmanTimur Kelman
authored andcommitted
move the new test to the PropertyMemberTests
1 parent 266e7e3 commit a64e208

2 files changed

Lines changed: 51 additions & 51 deletions

File tree

Tests/CSharp/MemberTests/MemberTests.cs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4050,57 +4050,6 @@ public static int StaticTestProperty
40504050
}");
40514051
}
40524052

4053-
[Fact]
4054-
public async Task IndexedPropertyWithTriviaAsync()
4055-
{
4056-
//issue 1095
4057-
await TestConversionVisualBasicToCSharpAsync(
4058-
@"Class IndexedPropertyWithTrivia
4059-
'a
4060-
Property P(i As Integer) As Integer
4061-
'b
4062-
Get
4063-
'1
4064-
Dim x = 1 '2
4065-
'3
4066-
End Get
4067-
4068-
'c
4069-
Set(value As Integer)
4070-
'4
4071-
Dim x = 1 '5
4072-
'6
4073-
x = value + i '7
4074-
'8
4075-
End Set
4076-
'd
4077-
End Property
4078-
End Class", @"
4079-
internal partial class IndexedPropertyWithTrivia
4080-
{
4081-
// a
4082-
// b
4083-
public int get_P(int i)
4084-
{
4085-
// 1
4086-
int x = 1; // 2
4087-
return default;
4088-
// 3
4089-
}
4090-
4091-
// c
4092-
public void set_P(int i, int value)
4093-
{
4094-
// 4
4095-
int x = 1; // 5
4096-
// 6
4097-
x = value + i; // 7
4098-
// 8
4099-
// d
4100-
}
4101-
}");
4102-
}
4103-
41044053
[Fact]
41054054
public async Task TestOmittedArgumentsAsync()
41064055
{

Tests/CSharp/MemberTests/PropertyMemberTests.cs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,57 @@ public void ReturnWhatever(MyEnum m)
288288
}");
289289
}
290290

291+
[Fact]
292+
public async Task TestParameterizedPropertyWithTriviaAsync()
293+
{
294+
//issue 1095
295+
await TestConversionVisualBasicToCSharpAsync(
296+
@"Class IndexedPropertyWithTrivia
297+
'a
298+
Property P(i As Integer) As Integer
299+
'b
300+
Get
301+
'1
302+
Dim x = 1 '2
303+
'3
304+
End Get
305+
306+
'c
307+
Set(value As Integer)
308+
'4
309+
Dim x = 1 '5
310+
'6
311+
x = value + i '7
312+
'8
313+
End Set
314+
'd
315+
End Property
316+
End Class", @"
317+
internal partial class IndexedPropertyWithTrivia
318+
{
319+
// a
320+
// b
321+
public int get_P(int i)
322+
{
323+
// 1
324+
int x = 1; // 2
325+
return default;
326+
// 3
327+
}
328+
329+
// c
330+
public void set_P(int i, int value)
331+
{
332+
// 4
333+
int x = 1; // 5
334+
// 6
335+
x = value + i; // 7
336+
// 8
337+
// d
338+
}
339+
}");
340+
}
341+
291342
[Fact]
292343
public async Task PropertyWithMissingTypeDeclarationAsync()//TODO Check object is the inferred type
293344
{

0 commit comments

Comments
 (0)