1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 20:23:55 +00:00

Fix a few errors and warnings with tests

This commit is contained in:
Henry Fredrick Schreiner 2017-03-30 16:36:05 -04:00
parent ae5bf0ce62
commit f88aa33908
2 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ TEST(Types, LexicalCastDouble) {
std::string input = "9.12"; std::string input = "9.12";
long double x; long double x;
EXPECT_TRUE(CLI::detail::lexical_cast(input, 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"; std::string bad_input = "hello";
EXPECT_FALSE(CLI::detail::lexical_cast(bad_input, x)); EXPECT_FALSE(CLI::detail::lexical_cast(bad_input, x));

View File

@ -521,7 +521,7 @@ TEST_F(TApp, IniOutputFlag) {
EXPECT_THAT(str, HasSubstr("onething=true")); EXPECT_THAT(str, HasSubstr("onething=true"));
EXPECT_THAT(str, HasSubstr("something=2")); 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")); EXPECT_THAT(str, HasSubstr("nothing"));
} }