summaryrefslogtreecommitdiff
path: root/cppu/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-10-18 23:05:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-10-18 23:10:56 +0200
commitbf1f0183d5c6b4c94acdbee27276d5a386a657f4 (patch)
tree3d4d60a59f935ee11011ebea33ccb6d9fab5063c /cppu/qa
parent0eee1cf957d122ac0d805a9589a5db075a94e4a1 (diff)
Some fixes for "clang version 3.1 (trunk 142234)" (with --enable-werror, on Linux x86_64).
Diffstat (limited to 'cppu/qa')
-rw-r--r--cppu/qa/cppumaker/test_cppumaker.cxx44
-rw-r--r--cppu/qa/test_unotype.cxx2
2 files changed, 27 insertions, 19 deletions
diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx
index 141c3e2fd1d7..11435e544b9a 100644
--- a/cppu/qa/cppumaker/test_cppumaker.cxx
+++ b/cppu/qa/cppumaker/test_cppumaker.cxx
@@ -380,6 +380,7 @@
//TODO, copied here from test/oustringostreaminserter.hxx, make DRY again:
#include "osl/thread.h"
+namespace rtl {
template< typename charT, typename traits > std::basic_ostream<charT, traits> &
operator <<(
std::basic_ostream<charT, traits> & stream, rtl::OUString const & string)
@@ -389,6 +390,30 @@ operator <<(
// best effort; potentially loses data due to conversion failures and
// embedded null characters
}
+}
+
+namespace com { namespace sun { namespace star { namespace uno {
+
+std::ostream & operator <<(
+ std::ostream & out, com::sun::star::uno::Exception const &)
+{
+ return out << "<UNO exception>";
+}
+
+} } } }
+
+namespace test { namespace codemaker { namespace cppumaker {
+
+bool operator ==(
+ test::codemaker::cppumaker::TestException1 const & e1,
+ test::codemaker::cppumaker::TestException1 const & e2)
+{
+ return e1.Message == e2.Message && e1.Context == e2.Context
+ && e1.m1 == e2.m1 && e1.m2 == e2.m2 && e1.m3 == e2.m3
+ && e1.m4.member1 == e2.m4.member1 && e1.m4.member2 == e2.m4.member2;
+}
+
+} } }
namespace {
@@ -503,25 +528,6 @@ void Test::testPolyStruct() {
static_cast< sal_uInt32 >(5));
}
-namespace {
-
-bool operator ==(
- test::codemaker::cppumaker::TestException1 const & e1,
- test::codemaker::cppumaker::TestException1 const & e2)
-{
- return e1.Message == e2.Message && e1.Context == e2.Context
- && e1.m1 == e2.m1 && e1.m2 == e2.m2 && e1.m3 == e2.m3
- && e1.m4.member1 == e2.m4.member1 && e1.m4.member2 == e2.m4.member2;
-}
-
-std::ostream & operator <<(
- std::ostream & out, com::sun::star::uno::Exception const &)
-{
- return out << "<UNO exception>";
-}
-
-}
-
void Test::testExceptions() {
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >
aEmptySequence;
diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index 110ae204095c..dbb13d6b1d1f 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -61,6 +61,7 @@
//TODO, copied here from test/oustringostreaminserter.hxx, make DRY again:
#include "osl/thread.h"
+namespace rtl {
template< typename charT, typename traits > std::basic_ostream<charT, traits> &
operator <<(
std::basic_ostream<charT, traits> & stream, rtl::OUString const & string)
@@ -70,6 +71,7 @@ operator <<(
// best effort; potentially loses data due to conversion failures and
// embedded null characters
}
+}
namespace com { namespace sun { namespace star { namespace uno {
class Any;