summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-04-02 18:41:12 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-04-02 19:06:46 +0200
commit174a1d3c3da7457884a2f79016e8a9375fd5297e (patch)
tree377e0cd82f8e109d3b7339e8f802d3b6efb645f7 /sal
parent0c08a84c04b166ab6479716e2c33cd444d7e3dbe (diff)
fix very ... uhm ... inventive and confusing use of empty string
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/security/osl_Security.cxx16
-rw-r--r--sal/qa/osl/security/osl_Security_Const.h19
2 files changed, 11 insertions, 24 deletions
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index 4a0a1a901eea..223c5f95c93b 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -129,12 +129,12 @@ namespace osl_Security
SAL_CPPUNIT_TEST_SUITE( logonUser );
- if ( !aStringForward.equals( aNullUrl ) && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 && ( aStringForward.indexOf( ( sal_Unicode ) ' ' ) == aStringForward.lastIndexOf( ( sal_Unicode ) ' ' ) ) )
+ if ( !aStringForward.isEmpty() && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 && ( aStringForward.indexOf( ( sal_Unicode ) ' ' ) == aStringForward.lastIndexOf( ( sal_Unicode ) ' ' ) ) )
/// if user name and passwd are forwarded
{
CPPUNIT_TEST( logonUser_user_pwd );
}
- if ( !aStringForward.equals( aNullUrl ) && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 && ( aStringForward.indexOf( ( sal_Unicode ) ' ' ) != aStringForward.lastIndexOf( ( sal_Unicode ) ' ' ) ) )
+ if ( !aStringForward.isEmpty() && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 && ( aStringForward.indexOf( ( sal_Unicode ) ' ' ) != aStringForward.lastIndexOf( ( sal_Unicode ) ' ' ) ) )
/// if user name and passwd and file server are forwarded
{
CPPUNIT_TEST( logonUser_user_pwd_server );
@@ -597,31 +597,31 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
t_print("#\n#Retrived system information is below:\n");
t_print("Computer Name: ");
- if ( strComputerName == aNullUrl )
+ if ( strComputerName.isEmpty())
t_print("Not retrived\n" );
else
printUString( strComputerName );
t_print("Current User Name: ");
- if ( strUserName == aNullUrl )
+ if ( strUserName.isEmpty())
t_print("Not retrived\n" );
else
printUString( strUserName );
t_print("Current User Home Directory:");
- if ( strHomeDirectory == aNullUrl )
+ if ( strHomeDirectory.isEmpty())
t_print("Not retrived\n" );
else
printUString( strHomeDirectory );
t_print("Current Config Directory: ");
- if ( strConfigDirectory == aNullUrl )
+ if ( strConfigDirectory.isEmpty())
t_print("Not retrived\n" );
else
printUString( strConfigDirectory );
t_print("Current UserID: ");
- if ( strUserID == aNullUrl )
+ if ( strUserID.isEmpty())
t_print("Not retrived\n" );
else
printUString( strUserID );
@@ -634,7 +634,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
/// get and display forwarded text if available.
aStringForward = ::rtl::OUString::createFromAscii( parameters.getCommandLine().c_str() );
- if ( !aStringForward.equals( aNullUrl ) && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 )
+ if ( !aStringForward.isEmpty() && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 )
{
sal_Int32 nFirstSpacePoint = aStringForward.indexOf( (sal_Unicode)' ' );;
sal_Int32 nLastSpacePoint = aStringForward.lastIndexOf( (sal_Unicode)' ' );;
diff --git a/sal/qa/osl/security/osl_Security_Const.h b/sal/qa/osl/security/osl_Security_Const.h
index 0c3a242255cf..4eca51cef963 100644
--- a/sal/qa/osl/security/osl_Security_Const.h
+++ b/sal/qa/osl/security/osl_Security_Const.h
@@ -59,22 +59,9 @@
#define BUFSIZE 1024
const char pTestString[17] = "Sun Microsystems";
-
-#define OSLTEST_DECLARE_USTRING( str_name, str_value ) \
- ::rtl::OUString a##str_name = rtl::OUString::createFromAscii( str_value )
-
-//------------------------------------------------------------------------
-// condition names
-//------------------------------------------------------------------------
-
-// Intentionally different from the aNullURL in osl_File_Const.h to avoid
-// duplicate symbols as all the unit tests here get linked together for iOS...
-
-OSLTEST_DECLARE_USTRING( NullUrl, "" );
-
-::rtl::OUString aLogonUser( aNullUrl ), aLogonPasswd( aNullUrl ), aFileServer( aNullUrl ), aStringForward( aNullUrl );
-::rtl::OUString strUserName( aNullUrl ) , strComputerName( aNullUrl ) , strHomeDirectory( aNullUrl );
-::rtl::OUString strConfigDirectory( aNullUrl ), strUserID( aNullUrl );
+::rtl::OUString aLogonUser, aLogonPasswd, aFileServer, aStringForward;
+::rtl::OUString strUserName, strComputerName, strHomeDirectory;
+::rtl::OUString strConfigDirectory, strUserID;
sal_Bool isAdmin = sal_False;