-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Track trailing zeros only for floating point numbers #48608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0f09aa9
c4252fa
032d6d8
a6f41aa
1e6ea43
9897a27
f27bd8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1500,6 +1500,14 @@ public static void ToString_InvalidFormat_ThrowsFormatException() | |
| Assert.Throws<FormatException>(() => f.ToString("E" + intMaxPlus1String)); | ||
| } | ||
|
|
||
| [Theory] | ||
| [InlineData("3.00")] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume this is one of the tests we would expect to add a much longer list of values to in the future, per our recent discussion about adding much more comprehensive tests in this area.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup. This is just the start |
||
| public void TestRoundTripDecimalToString(string input) | ||
| { | ||
| decimal d = Decimal.Parse(input, NumberStyles.Number, NumberFormatInfo.InvariantInfo); | ||
| string dString = d.ToString(CultureInfo.InvariantCulture); | ||
| Assert.Equal(input, dString); | ||
| } | ||
| public static IEnumerable<object[]> Truncate_TestData() | ||
| { | ||
| yield return new object[] { 123m, 123m }; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.