summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-02-16 19:07:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-02-16 21:16:12 +0000
commitdf5995b0bf9db2a68dc64f0dda1cc74ab222a1f2 (patch)
tree23d62b841c330ffe73c71b14b210005607c4f1d3 /tools
parent5884a122dc2a2c73865efdbdd861c281475a681e (diff)
Only specialize CppUnit::assetion_traits<T>::toString member functions
...not the whole CppUnit::assetion_traits<T> classes (where applicable). That avoids spelling out the (identical) equals member functions, and also leaves around the less and lessEqual member functions, in case they want to be used after all. Change-Id: I18f8d6cff0353921ced4952b33a0c85ff8292923 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qa/cppunit/test_urlobj.cxx23
1 files changed, 6 insertions, 17 deletions
diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index 8402fae5ed55..404f5c5a6ed1 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -18,24 +18,13 @@
#define OUSTR_TO_STDSTR( oustr ) std::string( OUStringToOString( oustr, RTL_TEXTENCODING_ASCII_US ).getStr() )
-CPPUNIT_NS_BEGIN
-
-template<> struct assertion_traits<INetProtocol>
+template<> inline std::string CPPUNIT_NS::assertion_traits<INetProtocol>::toString(
+ const INetProtocol& x )
{
- static bool equal( const INetProtocol& x, const INetProtocol& y )
- {
- return x == y;
- }
-
- static std::string toString( const INetProtocol& x )
- {
- OStringStream ost;
- ost << static_cast<unsigned int>(x);
- return ost.str();
- }
-};
-
-CPPUNIT_NS_END
+ OStringStream ost;
+ ost << static_cast<unsigned int>(x);
+ return ost.str();
+}
namespace tools_urlobj
{