Skip to content

Commit 00e44b0

Browse files
committed
Added additional test case
1 parent 6808f6b commit 00e44b0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ public void TestMethod()
283283
var x = (long)64 * 1024;
284284
var y = (double)64 /* test */ * 1024;
285285
var z = (long) /* test */ 64 * 1024;
286+
var a = (double)64 // dividend
287+
/ (double)4; // divisor
286288
}
287289
}
288290
";
@@ -295,6 +297,8 @@ public void TestMethod()
295297
var x = 64L * 1024;
296298
var y = 64D /* test */ * 1024;
297299
var z = /* test */ 64L * 1024;
300+
var a = 64D // dividend
301+
/ 4D; // divisor
298302
}
299303
}
300304
";
@@ -304,6 +308,8 @@ public void TestMethod()
304308
Diagnostic().WithLocation(6, 17),
305309
Diagnostic().WithLocation(7, 17),
306310
Diagnostic().WithLocation(8, 17),
311+
Diagnostic().WithLocation(9, 17),
312+
Diagnostic().WithLocation(10, 15),
307313
};
308314

309315
await VerifyCSharpFixAsync(testCode, expectedDiagnosticResult, fixedCode, CancellationToken.None).ConfigureAwait(false);

0 commit comments

Comments
 (0)