diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/rtl/strings/test_ostring_concat.cxx | 14 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_concat.cxx | 14 |
2 files changed, 16 insertions, 12 deletions
diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx index 4f4f2e3f799b..15795d039cee 100644 --- a/sal/qa/rtl/strings/test_ostring_concat.cxx +++ b/sal/qa/rtl/strings/test_ostring_concat.cxx @@ -11,6 +11,7 @@ #define RTL_STRING_UNITTEST_CONCAT #include <sal/types.h> +#include <cppunit/TestAssert.h> #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> @@ -19,20 +20,21 @@ #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> +#include <string> #include <typeinfo> bool rtl_string_unittest_invalid_concat = false; using namespace rtl; -namespace std +namespace CppUnit { -template< typename charT, typename traits > static std::basic_ostream<charT, traits> & -operator <<( - std::basic_ostream<charT, traits> & stream, const std::type_info& info ) +template<> struct assertion_traits<std::type_info> { - return stream << info.name(); -} + static bool equal(std::type_info const & x, std::type_info const & y) { return x == y; } + + static std::string toString(std::type_info const & x) { return x.name(); } +}; } // namespace namespace test { namespace ostring { diff --git a/sal/qa/rtl/strings/test_oustring_concat.cxx b/sal/qa/rtl/strings/test_oustring_concat.cxx index 874666869554..8ec1699d4431 100644 --- a/sal/qa/rtl/strings/test_oustring_concat.cxx +++ b/sal/qa/rtl/strings/test_oustring_concat.cxx @@ -12,6 +12,7 @@ extern bool rtl_string_unittest_invalid_concat; #include <sal/types.h> +#include <cppunit/TestAssert.h> #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> @@ -20,18 +21,19 @@ extern bool rtl_string_unittest_invalid_concat; #include <rtl/string.hxx> #include <rtl/strbuf.hxx> +#include <string> #include <typeinfo> using namespace rtl; -namespace std +namespace CppUnit { -template< typename charT, typename traits > static std::basic_ostream<charT, traits> & -operator <<( - std::basic_ostream<charT, traits> & stream, const std::type_info& info ) +template<> struct assertion_traits<std::type_info> { - return stream << info.name(); -} + static bool equal(std::type_info const & x, std::type_info const & y) { return x == y; } + + static std::string toString(std::type_info const & x) { return x.name(); } +}; } // namespace namespace test { namespace oustring { |