1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 12:13:52 +00:00

Adding missed update

This commit is contained in:
Henry Fredrick Schreiner 2017-03-08 09:16:19 -05:00
parent 228fd36cec
commit 2af5577b39

View File

@ -309,7 +309,6 @@ TEST(Types, LexicalCastInt) {
}
TEST(Types, LexicalCastDouble) {
std::string input = "9.12";
long double x;
EXPECT_TRUE(CLI::detail::lexical_cast(input, x));
@ -319,8 +318,12 @@ TEST(Types, LexicalCastDouble) {
EXPECT_FALSE(CLI::detail::lexical_cast(bad_input, x));
std::string overflow_input = "1" + std::to_string(LDBL_MAX);
std::cout << "Before: " << overflow_input << std::endl;
EXPECT_FALSE(CLI::detail::lexical_cast(overflow_input, x));
std::cout << "After: " << x << std::endl;
}
TEST(Types, LexicalCastString) {
std::string input = "one";
std::string output;
CLI::detail::lexical_cast(input, output);
EXPECT_EQ(input, output);
}