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:
parent
ae5bf0ce62
commit
f88aa33908
@ -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));
|
||||||
|
@ -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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user