This commit is contained in:
Niels Lohmann
2023-09-23 17:19:28 +02:00
committed by GitHub
parent 5fec803493
commit 1ce29fa22f
16 changed files with 88 additions and 42 deletions

View File

@@ -542,13 +542,13 @@ TEST_CASE("parser class")
CHECK(parser_helper("9007199254740991").get<int64_t>() == 9007199254740991);
}
SECTION("over the edge cases") // issue #178 - Integer conversion to unsigned (incorrect handling of 64 bit integers)
SECTION("over the edge cases") // issue #178 - Integer conversion to unsigned (incorrect handling of 64-bit integers)
{
// While RFC8259, Section 6 specifies a preference for support
// for ranges in range of IEEE 754-2008 binary64 (double precision)
// this does not accommodate 64 bit integers without loss of accuracy.
// As 64 bit integers are now widely used in software, it is desirable
// to expand support to to the full 64 bit (signed and unsigned) range
// this does not accommodate 64-bit integers without loss of accuracy.
// As 64-bit integers are now widely used in software, it is desirable
// to expand support to the full 64 bit (signed and unsigned) range
// i.e. -(2**63) -> (2**64)-1.
// -(2**63) ** Note: compilers see negative literals as negated positive numbers (hence the -1))
@@ -822,7 +822,7 @@ TEST_CASE("parser class")
CHECK(accept_helper("9007199254740991"));
}
SECTION("over the edge cases") // issue #178 - Integer conversion to unsigned (incorrect handling of 64 bit integers)
SECTION("over the edge cases") // issue #178 - Integer conversion to unsigned (incorrect handling of 64-bit integers)
{
// While RFC8259, Section 6 specifies a preference for support
// for ranges in range of IEEE 754-2008 binary64 (double precision)