From 2af5577b3961563faec69b0dbbc7c3ef796840ea Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Wed, 8 Mar 2017 09:16:19 -0500 Subject: [PATCH] Adding missed update --- tests/HelpersTest.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/HelpersTest.cpp b/tests/HelpersTest.cpp index 2e09e2a4..cb79623d 100644 --- a/tests/HelpersTest.cpp +++ b/tests/HelpersTest.cpp @@ -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); }