lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master f737b11 3/5: Rectify confusing terminology


From: Greg Chicares
Subject: [lmi-commits] [lmi] master f737b11 3/5: Rectify confusing terminology
Date: Fri, 31 Jan 2020 11:29:39 -0500 (EST)

branch: master
commit f737b1131c0208e21d9a340149bce06fc792f59f
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Rectify confusing terminology
    
    Calling
      ostream insertion an "Input" operation, and
      istream extraction an "Output" operation
    made 'I' and 'O' connote opposite concepts.
---
 stream_cast.hpp      | 4 ++--
 stream_cast_test.cpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/stream_cast.hpp b/stream_cast.hpp
index 1a89d4d..8d778d6 100644
--- a/stream_cast.hpp
+++ b/stream_cast.hpp
@@ -117,11 +117,11 @@ To stream_cast(From from, To = To())
 
     if(!(interpreter << from))
         {
-        err << "Input failed ";
+        err << "Failure in ostream inserter ";
         }
     else if(!(interpreter >> result))
         {
-        err << "Output failed ";
+        err << "Failure in istream extractor ";
         }
     else if(!(interpreter >> std::ws).eof())
         {
diff --git a/stream_cast_test.cpp b/stream_cast_test.cpp
index 430c9f7..7239a22 100644
--- a/stream_cast_test.cpp
+++ b/stream_cast_test.cpp
@@ -79,7 +79,7 @@ int test_main(int, char*[])
     BOOST_TEST_THROW
         (stream_cast<std::string>(static_cast<std::streambuf*>(nullptr))
         ,std::runtime_error
-        ,lmi_test::what_regex("^Input failed")
+        ,lmi_test::what_regex("^Failure in ostream inserter")
         );
 
     // Induce failure in istream extractor:
@@ -92,7 +92,7 @@ int test_main(int, char*[])
     BOOST_TEST_THROW
         (stream_cast<bool>("3")
         ,std::runtime_error
-        ,lmi_test::what_regex("^Output failed")
+        ,lmi_test::what_regex("^Failure in istream extractor")
         );
 
     // Throw if any trailing input remains...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]