提交 82b3f2b3 编写于 作者: M Martin Strecker

Added test of presence of ConflictAnnotation.

上级 6c95d276
......@@ -1654,27 +1654,28 @@ public void M2()
</Document>
</Project>
</Workspace>";
var fix =
@"
<Workspace>
<Project Language=""C#"" CommonReferences=""true"">
<MetadataReferenceFromSource Language=""C#"" CommonReferences=""true"">
<Document FilePath=""ReferencedDocument"">
var fixedDocumentWithoutConflictAnnotation = @"
namespace N
{
public class BaseClass
public class Derived: BaseClass
{
public virtual void M() { }
public override void M(int v) { }
}
public class DerivedDerived: Derived
{
public void M2()
{
M(1);
}
}
}
</Document>
</MetadataReferenceFromSource>
<Document FilePath=""TestDocument"">
";
var fixedDocumentWithConflictAnnotation = @"
namespace N
{
public class Derived: BaseClass
{
public override void M(int v) { }
public override void M({|Conflict:int v|}) { }
}
public class DerivedDerived: Derived
{
......@@ -1684,11 +1685,9 @@ public void M2()
}
}
}
</Document>
</Project>
</Workspace>";
await TestInRegularAndScriptAsync(code, fix, index: 0);
await TestInRegularAndScriptAsync(code, fix, index: 1);
";
await TestInRegularAndScriptAsync(code, fixedDocumentWithoutConflictAnnotation, index: 0);
await TestInRegularAndScriptAsync(code, fixedDocumentWithConflictAnnotation, index: 1);
}
[WorkItem(21446, "https://github.com/dotnet/roslyn/issues/21446")]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册