mirror of
https://github.com/nlohmann/json.git
synced 2024-11-24 14:59:00 +08:00
Fixed std::numeric_limit::max() call
This commit is contained in:
parent
3f0cf26f7a
commit
9e765f5aed
@ -925,7 +925,7 @@ TEST_CASE("CBOR")
|
||||
}
|
||||
SECTION("3.40282e+38(max float)")
|
||||
{
|
||||
float v = std::numeric_limits<float>::max();
|
||||
float v = (std::numeric_limits<float>::max)();
|
||||
json j = v;
|
||||
std::vector<uint8_t> expected =
|
||||
{
|
||||
@ -953,7 +953,7 @@ TEST_CASE("CBOR")
|
||||
}
|
||||
SECTION("1 + 3.40282e+38(more than max float)")
|
||||
{
|
||||
double v = static_cast<double>(std::numeric_limits<float>::max()) + 0.1e+34;
|
||||
double v = static_cast<double>((std::numeric_limits<float>::max)()) + 0.1e+34;
|
||||
json j = v;
|
||||
std::vector<uint8_t> expected =
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user