diff --git a/tests/HelpersTest.cpp b/tests/HelpersTest.cpp index ca0b0f3d..e709eaca 100644 --- a/tests/HelpersTest.cpp +++ b/tests/HelpersTest.cpp @@ -350,7 +350,7 @@ TEST(Types, LexicalCastDouble) { std::string input = "9.12"; long double x; EXPECT_TRUE(CLI::detail::lexical_cast(input, x)); - EXPECT_FLOAT_EQ(9.12, x); + EXPECT_FLOAT_EQ((long double) 9.12, x); std::string bad_input = "hello"; EXPECT_FALSE(CLI::detail::lexical_cast(bad_input, x)); diff --git a/tests/IniTest.cpp b/tests/IniTest.cpp index 8fb8e96a..0c3fe2ee 100644 --- a/tests/IniTest.cpp +++ b/tests/IniTest.cpp @@ -521,7 +521,7 @@ TEST_F(TApp, IniOutputFlag) { EXPECT_THAT(str, HasSubstr("onething=true")); EXPECT_THAT(str, HasSubstr("something=2")); - std::string str = app.config_to_str(true); + str = app.config_to_str(true); EXPECT_THAT(str, HasSubstr("nothing")); }