Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ internal static unsafe ParsingStatus TryParseBigIntegerNumber<TChar>(ReadOnlySpa
else
{
ret = NumberToBigInteger(ref number, out result);

if (ret != ParsingStatus.OK)
{
elementsConsumed = 0;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1482,6 +1482,11 @@ public static IEnumerable<object[]> TryParsePartial_Invalid_TestData()
// Only invalid characters (no valid number)
yield return new object[] { "abc", NumberStyles.Integer, null };
yield return new object[] { "xyz", NumberStyles.Integer, null };

// Values that scan successfully but aren't representable as a BigInteger
yield return new object[] { "1.5", NumberStyles.Float, CultureInfo.InvariantCulture };
yield return new object[] { "3.14159abc", NumberStyles.Float, CultureInfo.InvariantCulture };
yield return new object[] { "1E1000000000", NumberStyles.Float, CultureInfo.InvariantCulture };
}

[Theory]
Expand Down