mirror of
https://github.com/nlohmann/json
synced 2025-01-05 23:21:06 +00:00
unit-constructor1.cpp: Fix floating point truncation warning
This commit is contained in:
parent
87dea32e81
commit
e0ff1a837c
@ -709,7 +709,7 @@ TEST_CASE("constructors")
|
||||
|
||||
SECTION("float")
|
||||
{
|
||||
float n = 42.23;
|
||||
float n = 42.23f;
|
||||
json j(n);
|
||||
CHECK(j.type() == json::value_t::number_float);
|
||||
CHECK(j.m_value.number_float == Approx(j_reference.m_value.number_float));
|
||||
|
Loading…
Reference in New Issue
Block a user