Skip to content

Commit a46d2a5

Browse files
committed
Add tests for types with no suffix
Closes #2661
1 parent 754e7bc commit a46d2a5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1139UnitTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ public void Method()
183183
[InlineData("(bool)true")]
184184
[InlineData("(bool)(false)")]
185185
[InlineData("(long)~+1")]
186+
[InlineData("unchecked((byte)-1)")]
187+
[InlineData("(sbyte)-1")]
188+
[InlineData("(int)-1")]
186189
public async Task TestOtherTypesOfCastsShouldNotTriggerDiagnosticAsync(string correctCastExpression)
187190
{
188191
var testCode = $@"

0 commit comments

Comments
 (0)