Skip to content

Commit 76df38f

Browse files
committed
Add SA1139 tests for binary literals
1 parent 536cd6a commit 76df38f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1139CSharp7UnitTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ public void Method()
223223
[InlineData("(int)1_000_000_000_000_000_000L", "-1486618624")]
224224
[InlineData("(int)0xFFFF_FFFF_FFFF_FFFFL", "-1")]
225225
[InlineData("(uint)0xFFFF_FFFF_FFFF_FFFFL", "4294967295U")]
226+
[InlineData("(int)0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111L", "-1")]
227+
[InlineData("(uint)0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111L", "4294967295U")]
226228
public async Task TestCastsWithSeparatorsInUncheckedEnviromentShouldPreserveValueAsync(string castExpression, string correctLiteral)
227229
{
228230
var testCode = $@"

0 commit comments

Comments
 (0)