add details to message as to what failed
This commit is contained in:
parent
cbbc215285
commit
930e38e163
1 changed files with 11 additions and 2 deletions
|
@ -36,6 +36,8 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#include <osl_Security_Const.h>
|
#include <osl_Security_Const.h>
|
||||||
|
#include <osl/thread.h>
|
||||||
|
#include <rtl/strbuf.hxx>
|
||||||
|
|
||||||
using namespace osl;
|
using namespace osl;
|
||||||
using namespace rtl;
|
using namespace rtl;
|
||||||
|
@ -154,8 +156,15 @@ namespace osl_Security
|
||||||
::rtl::OUString strID;
|
::rtl::OUString strID;
|
||||||
bRes = aSec.getUserIdent( strID );
|
bRes = aSec.getUserIdent( strID );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_MESSAGE( "#test comment#: get UserID and compare it with names got at the beginning of the test.",
|
rtl::OStringBuffer aMessage;
|
||||||
( sal_True == strUserID.equals( strID ) ) && ( sal_True == bRes ));
|
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 );
|
CPPUNIT_TEST_SUITE( getUserIdent );
|
||||||
|
|
Loading…
Reference in a new issue