Merge pull request #300 from t-b/fix_warning_in_test_case
unit-constructor1.cpp: Fix floating point truncation warning
This commit is contained in:
commit
463ffb21bc
1 changed files with 1 additions and 1 deletions
|
@ -709,7 +709,7 @@ TEST_CASE("constructors")
|
||||||
|
|
||||||
SECTION("float")
|
SECTION("float")
|
||||||
{
|
{
|
||||||
float n = 42.23;
|
float n = 42.23f;
|
||||||
json j(n);
|
json j(n);
|
||||||
CHECK(j.type() == json::value_t::number_float);
|
CHECK(j.type() == json::value_t::number_float);
|
||||||
CHECK(j.m_value.number_float == Approx(j_reference.m_value.number_float));
|
CHECK(j.m_value.number_float == Approx(j_reference.m_value.number_float));
|
||||||
|
|
Loading…
Reference in a new issue