diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 14:22:04 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 14:22:04 +0200 |
commit | 9384a34644fb1a6c791681c1bd7c4985f2437bea (patch) | |
tree | 1b28c931b6de892502921b2f0812e1204e771b5f /sal/qa/osl/security/osl_Security.cxx | |
parent | a46141f2e02fe50d21dd4f79df86bcdb90ba36c2 (diff) |
loplugin:cppunitassertequals: sal
Change-Id: I6ba9a18a1d227461e023259662635e3008ad7c9b
Diffstat (limited to 'sal/qa/osl/security/osl_Security.cxx')
-rw-r--r-- | sal/qa/osl/security/osl_Security.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 05ef80b62afc..4c699ab18d6e 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -133,7 +133,8 @@ namespace osl_Security aMessage.append(", bRes: "); aMessage.append(bRes); - CPPUNIT_ASSERT_MESSAGE( aMessage.getStr(), strUserID.equals(strID) && bRes ); + CPPUNIT_ASSERT_MESSAGE( aMessage.getStr(), strUserID.equals(strID) ); + CPPUNIT_ASSERT_MESSAGE( aMessage.getStr(), bRes ); } CPPUNIT_TEST_SUITE( getUserIdent ); @@ -165,7 +166,9 @@ namespace osl_Security nPos = strGetName.indexOf(strName); } CPPUNIT_ASSERT_MESSAGE( "#test comment#: get UserName and compare it with names got at the beginning of the test.", - ( nPos >= 0 ) && bRes ); + ( nPos >= 0 ) ); + CPPUNIT_ASSERT_MESSAGE( "#test comment#: get UserName and compare it with names got at the beginning of the test.", + bRes ); } CPPUNIT_TEST_SUITE( getUserName ); @@ -377,15 +380,15 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *, lRet = RegQueryValueEx(hRegKey, "AppData", nullptr, &Type, reinterpret_cast<unsigned char *>(PathA), &lSize); if ( ( lRet == ERROR_SUCCESS ) && ( Type == REG_SZ ) && ( _access( PathA, 0 ) == 0 ) ) { - CPPUNIT_ASSERT_MESSAGE( "#Convert from system path to URL failed.", - ::osl::File::E_None == ::osl::File::getFileURLFromSystemPath( ::rtl::OUString::createFromAscii( PathA ), strConfigDirectory ) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "#Convert from system path to URL failed.", + ::osl::File::E_None, ::osl::File::getFileURLFromSystemPath( ::rtl::OUString::createFromAscii( PathA ), strConfigDirectory ) ); } lRet = RegQueryValueEx(hRegKey, "Personal", nullptr, &Type, reinterpret_cast<unsigned char *>(PathA), &lSize); if ( ( lRet == ERROR_SUCCESS ) && ( Type == REG_SZ ) && ( _access( PathA, 0 ) == 0 ) ) { - CPPUNIT_ASSERT_MESSAGE( "#Convert from system path to URL failed.", - ::osl::File::E_None == ::osl::File::getFileURLFromSystemPath( ::rtl::OUString::createFromAscii( PathA ), strHomeDirectory ) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "#Convert from system path to URL failed.", + ::osl::File::E_None, ::osl::File::getFileURLFromSystemPath( ::rtl::OUString::createFromAscii( PathA ), strHomeDirectory ) ); } RegCloseKey(hRegKey); |