Ver Fonte

Improved Long class

- removed stream operators from Long class (not
working)
- removed dead code from tests of Long class
Patrick há 4 anos atrás
pai
commit
cc7c1a4b3e
2 ficheiros alterados com 2 adições e 27 exclusões
  1. 1 14
      source/boxing/Long.hpp
  2. 1 13
      test/cases/boxing/LongTest.cpp

+ 1 - 14
source/boxing/Long.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-08-17
+ * Changed:         2020-08-25
  *
  * */
 
@@ -69,19 +69,6 @@ namespace ls_std {
       bool operator<=(const Long& _long) const;
       bool operator<=(long _value) const;
 
-      // stream operators
-
-      // TODO: not compilable
-//      friend std::ostream& operator<<(std::ostream& outputStream, const Long& _long) {
-//        outputStream << _long.value;
-//        return outputStream;
-//      }
-//
-//      friend std::istream& operator>>(std::istream& inputStream, Long& _long) {
-//        inputStream >> _long.value;
-//        return inputStream;
-//      }
-
       // logical operators
 
       friend bool operator!(const Long& _long) {

+ 1 - 13
test/cases/boxing/LongTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-08-17
+ * Changed:         2020-08-25
  *
  * */
 
@@ -261,18 +261,6 @@ namespace {
     ASSERT_FALSE(x <= y);
   }
 
-  // stream operators / input stream not testable by using automated tests
-
-  // TODO: not compilable
-//  TEST_F(LongTest, operatorOutputStream)
-//  {
-//    ls_std::Long x {10};
-//    std::ostringstream _stream {};
-//    _stream << x;
-//
-//    ASSERT_STREQ("10", _stream.str().c_str());
-//  }
-
   // logical operators
 
   TEST_F(LongTest, operatorNot)