Skip to content

Commit 58dbaed

Browse files
Improve coverage for SA1305 by adding test for a variable in a native methods class
1 parent 0f30141 commit 58dbaed

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1305UnitTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,21 @@ public void TestMethod()
6262
await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
6363
}
6464

65+
[Fact]
66+
public async Task TestVariableNamesInNativeClassMethodAsync()
67+
{
68+
var testCode = @"
69+
public class TypeNameNativeMethods
70+
{
71+
public void MethodName()
72+
{
73+
bool abX;
74+
}
75+
}";
76+
77+
await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
78+
}
79+
6580
[Fact]
6681
public async Task TestInvalidFieldNamesAreReportedAsync()
6782
{

0 commit comments

Comments
 (0)