Skip to content

Commit 587a15f

Browse files
committed
[GH Usage] Added overflow test case for ToKiloFormat
1 parent 7077c4e commit 587a15f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/NuGetGallery.Facts/Extensions/NumberExtensionsFacts.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public class TheToKiloFormatMethod
6565
[InlineData(999_990_000, "1.0B")]
6666
[InlineData(1_000_000_000, "1.0B")]
6767
[InlineData(1_999_000_000, "2.0B")]
68+
[InlineData(2_147_483_647, "2.1B")]
6869
[InlineData(-1, "-1")]
6970
[InlineData(-999, "-999")]
7071
[InlineData(-1000, "-1.0K")]
@@ -97,6 +98,7 @@ public class TheToKiloFormatMethod
9798
[InlineData(-999_990_000, "-1.0B")]
9899
[InlineData(-1_000_000_000, "-1.0B")]
99100
[InlineData(-1_999_000_000, "-2.0B")]
101+
[InlineData(-2_147_483_648, "-2.1B")]
100102
public void FormatsUsingExpectedUnit(int number, string expected)
101103
{
102104
var actual = NumberExtensions.ToKiloFormat(number);

0 commit comments

Comments
 (0)