提交 0e1609fe 编写于 作者: C Cyrus Najmabadi

Add test

上级 8f2f736e
......@@ -185,6 +185,32 @@ void Goo(S s)
}", parseOptions: s_parseOptions);
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseRangeOperator)]
public async Task TestNonStringType_Assignment()
{
await TestAsync(
@"
namespace System { public struct Range { } }
struct S { public ref S Slice(int start, int length); public int Length { get; } public S this[System.Range] { get; } }
class C
{
void Goo(S s)
{
s.Slice([||]1, s.Length - 2) = default;
}
}",
@"
namespace System { public struct Range { } }
struct S { public ref S Slice(int start, int length); public int Length { get; } public S this[System.Range] { get; } }
class C
{
void Goo(S s)
{
s[1..^1] = default;
}
}", parseOptions: s_parseOptions);
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseRangeOperator)]
public async Task TestMethodToMethod()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册