Skip to content

Commit 2f9157b

Browse files
committed
Add regression test for #1937
1 parent 310bb4e commit 2f9157b

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1606UnitTests.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,28 @@ public void MethodName()
745745
await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
746746
}
747747

748+
[Fact]
749+
public async Task TestIncompleteMemberAsync()
750+
{
751+
var testCode = @"
752+
class Class1
753+
{
754+
/// <include file='ClassWithSummary.xml' path='/Class1/MethodName/*'/>
755+
public string MethodName
756+
}
757+
";
758+
759+
var expected = new DiagnosticResult
760+
{
761+
Id = "CS1002",
762+
Severity = DiagnosticSeverity.Error,
763+
Locations = new[] { new DiagnosticResultLocation("Test0.cs", 5, 29) },
764+
Message = "; expected"
765+
};
766+
767+
await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
768+
}
769+
748770
/// <inheritdoc/>
749771
protected override Project CreateProject(string[] sources, string language = "C#", string[] filenames = null)
750772
{

0 commit comments

Comments
 (0)