From f88aa33908e8ff5d2f757c9b7b01a150267e29e2 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Thu, 30 Mar 2017 16:36:05 -0400 Subject: [PATCH] Fix a few errors and warnings with tests --- tests/HelpersTest.cpp | 2 +- tests/IniTest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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")); }