From f42175c8dafd36ac049a4b4986f0e34271235b95 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Thu, 1 Mar 2018 00:00:30 +0100 Subject: [PATCH] Unit tests update --- src/fstring.cpp | 6 +++--- src/test/fstring-test.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fstring.cpp b/src/fstring.cpp index f1be5508..3e953f91 100644 --- a/src/fstring.cpp +++ b/src/fstring.cpp @@ -1700,6 +1700,9 @@ bool FString::operator >= (const char c) const //---------------------------------------------------------------------- bool FString::operator > (const FString& s) const { + if ( ! (string || s.string) ) + return false; + if ( ! s ) return true; @@ -1709,9 +1712,6 @@ bool FString::operator > (const FString& s) const if ( ! string && s.string ) return false; - if ( ! (string || s.string) ) - return false; - return ( std::wcscmp(string, s.string) > 0 ); } diff --git a/src/test/fstring-test.cpp b/src/test/fstring-test.cpp index ae2deaae..705560f1 100644 --- a/src/test/fstring-test.cpp +++ b/src/test/fstring-test.cpp @@ -141,7 +141,7 @@ void FStringTest::NoArgumentTest() CPPUNIT_ASSERT ( ! empty.includes(std::wstring(L"123")) ); CPPUNIT_ASSERT ( ! empty.includes(FString("123")) ); - std::stringstream out; + std::ostringstream out; out << empty; CPPUNIT_ASSERT ( out.str() == "" );