fixed #70
This commit is contained in:
parent
1580eee4ed
commit
17609f244d
4 changed files with 55 additions and 5 deletions
|
|
@ -8450,4 +8450,25 @@ TEST_CASE("regression tests")
|
|||
CHECK(j == R"(["\"foo\""])"_json);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("issue #70 - Handle infinity and NaN cases")
|
||||
{
|
||||
SECTION("NAN value")
|
||||
{
|
||||
CHECK(json(NAN) == json());
|
||||
}
|
||||
|
||||
SECTION("overflows")
|
||||
{
|
||||
CHECK(json(std::exp(800)) == json());
|
||||
CHECK(json(HUGE_VALF) == json());
|
||||
CHECK(json(HUGE_VAL) == json());
|
||||
CHECK(json(HUGE_VALL) == json());
|
||||
}
|
||||
|
||||
SECTION("infinity")
|
||||
{
|
||||
CHECK(json(INFINITY) == json());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue