✅ added missing tests
This commit is contained in:
parent
f1cd15ce7e
commit
d1b30250d6
3 changed files with 17 additions and 1 deletions
|
|
@ -699,6 +699,15 @@ TEST_CASE("constructors")
|
|||
json j(n);
|
||||
CHECK(j.type() == json::value_t::number_float);
|
||||
}
|
||||
|
||||
SECTION("infinity")
|
||||
{
|
||||
// infinity is stored as null
|
||||
// should change in the future: https://github.com/nlohmann/json/issues/388
|
||||
json::number_float_t n(std::numeric_limits<json::number_float_t>::infinity());
|
||||
json j(n);
|
||||
CHECK(j.type() == json::value_t::null);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("create a floating-point number (implicit)")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue