diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-31 13:41:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-31 13:41:40 +0100 |
commit | 930e38e16329e4a81dc2dcf185d44a752fbfbf7f (patch) | |
tree | d42e27019f890914d8e8209d6d60d172a98c8734 /sal | |
parent | cbbc215285a636a470a8f7feed59a273050b8010 (diff) |
add details to message as to what failed
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/osl/security/osl_Security.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 72b00b3459bd..ea59027de43e 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -36,6 +36,8 @@ #include <windows.h> #endif #include <osl_Security_Const.h> +#include <osl/thread.h> +#include <rtl/strbuf.hxx> using namespace osl; using namespace rtl; @@ -154,8 +156,15 @@ namespace osl_Security ::rtl::OUString strID; bRes = aSec.getUserIdent( strID ); - CPPUNIT_ASSERT_MESSAGE( "#test comment#: get UserID and compare it with names got at the beginning of the test.", - ( sal_True == strUserID.equals( strID ) ) && ( sal_True == bRes )); + rtl::OStringBuffer aMessage; + aMessage.append("strUserID: "); + aMessage.append(rtl::OUStringToOString(strUserID, osl_getThreadTextEncoding())); + aMessage.append(", strID: "); + aMessage.append(rtl::OUStringToOString(strID, osl_getThreadTextEncoding())); + aMessage.append(", bRes: "); + aMessage.append(bRes); + + CPPUNIT_ASSERT_MESSAGE( aMessage.getStr(), strUserID.equals(strID) && (bRes == sal_True)); } CPPUNIT_TEST_SUITE( getUserIdent ); |