De-serialization of Decimal not always overflowing when it should (#1668)

This commit is contained in:
Tyler Brinkley
2018-04-22 12:28:15 +12:00
committed by James Newton-King
parent 4c4d870816
commit 94a4dbf7fe
2 changed files with 10 additions and 4 deletions
@@ -233,6 +233,8 @@ namespace Newtonsoft.Json.Tests.Utilities
AssertDecimalTryParse("1E+29", ParseResult.Overflow, null);
AssertDecimalTryParse("-1E+29", ParseResult.Overflow, null);
AssertDecimalTryParse("79228162514264337593543950336", ParseResult.Overflow, null); // decimal.MaxValue + 1
AssertDecimalTryParse("-79228162514264337593543950336", ParseResult.Overflow, null); // decimal.MinValue - 1
AssertDecimalTryParse("1-1", ParseResult.Invalid, null);
AssertDecimalTryParse("1-", ParseResult.Invalid, null);