summaryrefslogtreecommitdiff
path: root/sal/qa/osl/socket/osl_Socket.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/qa/osl/socket/osl_Socket.cxx')
-rw-r--r--sal/qa/osl/socket/osl_Socket.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sal/qa/osl/socket/osl_Socket.cxx b/sal/qa/osl/socket/osl_Socket.cxx
index 92c4a37691c0..77a8515e9c4c 100644
--- a/sal/qa/osl/socket/osl_Socket.cxx
+++ b/sal/qa/osl/socket/osl_Socket.cxx
@@ -223,11 +223,11 @@ inline ::rtl::OUString outputError( const ::rtl::OUString & returnVal, const ::r
if ( returnVal.equals( rightVal ) )
return aUString;
aUString += ::rtl::OUString::createFromAscii(msg);
- aUString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": the returned value is '"));
+ aUString += ::rtl::OUString(": the returned value is '");
aUString += returnVal;
- aUString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("', but the value should be '"));
+ aUString += ::rtl::OUString("', but the value should be '");
aUString += rightVal;
- aUString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'."));
+ aUString += ::rtl::OUString("'.");
return aUString;
}
@@ -781,11 +781,11 @@ namespace osl_SocketAddr
sal_Bool bOk = compareUString(suHost, suHost2);
- rtl::OUString suError (RTL_CONSTASCII_USTRINGPARAM("Host names should be the same. From SocketAddr.getLocalHostname() it is'"));
+ rtl::OUString suError ("Host names should be the same. From SocketAddr.getLocalHostname() it is'");
suError += suHost;
- suError += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("', from getThisHostname() it is '"));
+ suError += rtl::OUString("', from getThisHostname() it is '");
suError += suHost2;
- suError += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'."));
+ suError += rtl::OUString("'.");
CPPUNIT_ASSERT_MESSAGE(STD_STRING(suError), sal_True == bOk);
}
@@ -973,7 +973,7 @@ namespace osl_SocketAddr
// LLA: this function does not work in company (Linux, Windows) but at home
void getHostname_002()
{
- rtl::OUString suHostname (RTL_CONSTASCII_USTRINGPARAM("cn-1.germany.sun.com"));
+ rtl::OUString suHostname ("cn-1.germany.sun.com");
rtl::OUString aHostIP = getIPbyName( oustring2char( suHostname ) );
::osl::SocketAddr saSocketAddr( aHostName1, IP_PORT_FTP );
@@ -1439,7 +1439,7 @@ namespace osl_SocketAddr
/** testing the method:
static inline sal_Int32 SAL_CALL getServicePort(
const ::rtl::OUString& strServiceName,
- const ::rtl::OUString & strProtocolName= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("tcp")) );
+ const ::rtl::OUString & strProtocolName= ::rtl::OUString("tcp") );
*/
class gettheServicePort : public CppUnit::TestFixture
@@ -1467,7 +1467,7 @@ namespace osl_SocketAddr
void gettheServicePort_004()
{
CPPUNIT_ASSERT_MESSAGE( "test for getServicePort() function: try to get a service port which is not exist.",
- OSL_INVALID_PORT == ::osl::SocketAddr::getServicePort( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("notexist")), aProtocolUDP ) );
+ OSL_INVALID_PORT == ::osl::SocketAddr::getServicePort( ::rtl::OUString("notexist"), aProtocolUDP ) );
}
CPPUNIT_TEST_SUITE( gettheServicePort );
@@ -1809,7 +1809,7 @@ namespace osl_Socket
sSocket.setOption( osl_Socket_OptionReuseAddr, 1 ); //sal_True);
sal_Bool bOK1 = sSocket.bind( saBindSocketAddr );
- ::rtl::OUString suError1 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Socket bind fail:")) + sSocket.getErrorAsString();
+ ::rtl::OUString suError1 = ::rtl::OUString("Socket bind fail:") + sSocket.getErrorAsString();
CPPUNIT_ASSERT_MESSAGE( STD_STRING(suError1), sal_True == bOK1 );
sSocket.getLocalAddr( saLocalSocketAddr );
@@ -1857,7 +1857,7 @@ namespace osl_Socket
sSocket.setOption( osl_Socket_OptionReuseAddr, 1 ); //sal_True);
sal_Bool bOK1 = sSocket.bind( saBindSocketAddr );
- ::rtl::OUString suError1 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Socket bind fail:")) + sSocket.getErrorAsString();
+ ::rtl::OUString suError1 = ::rtl::OUString("Socket bind fail:") + sSocket.getErrorAsString();
CPPUNIT_ASSERT_MESSAGE( STD_STRING(suError1), sal_True == bOK1 );
sal_Bool bOK = ( IP_PORT_MYPORT7 == sSocket.getLocalPort( ) );
@@ -1888,7 +1888,7 @@ namespace osl_Socket
(void)bOK;
#else
//on Unix, if Addr is not an address of type osl_Socket_FamilyInet, it returns OSL_INVALID_PORT
- ::rtl::OUString suError (RTL_CONSTASCII_USTRINGPARAM("on Unix, if Addr is not an address of type osl_Socket_FamilyInet, it returns OSL_INVALID_PORT, but can not create Addr of that case"));
+ ::rtl::OUString suError ("on Unix, if Addr is not an address of type osl_Socket_FamilyInet, it returns OSL_INVALID_PORT, but can not create Addr of that case");
#endif
CPPUNIT_ASSERT_MESSAGE( STD_STRING(suError), sal_False );
@@ -1902,10 +1902,10 @@ namespace osl_Socket
sSocket.setOption( osl_Socket_OptionReuseAddr, 1 ); //sal_True);
sal_Bool bOK1 = sSocket.bind( saBindSocketAddr );
- ::rtl::OUString suError1 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Socket bind fail:")) + sSocket.getErrorAsString();
+ ::rtl::OUString suError1 = ::rtl::OUString("Socket bind fail:") + sSocket.getErrorAsString();
CPPUNIT_ASSERT_MESSAGE( STD_STRING(suError1), sal_True == bOK1 );
::rtl::OUString suError = outputError(::rtl::OUString::valueOf(sSocket.getLocalPort( )),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("34463")),
+ ::rtl::OUString("34463"),
"test for getLocalPort function: first create a new socket, then an invalid socket address, bind them, and check the port assigned");
sal_Bool bOK = ( sSocket.getLocalPort( ) >= 1 && sSocket.getLocalPort( ) <= 65535);
@@ -1954,7 +1954,7 @@ namespace osl_Socket
sSocket.setOption( osl_Socket_OptionReuseAddr, 1 ); //sal_True);
sal_Bool bOK1 = sSocket.bind( saBindSocketAddr );
- ::rtl::OUString suError1 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Socket bind fail:")) + sSocket.getErrorAsString();
+ ::rtl::OUString suError1 = ::rtl::OUString("Socket bind fail:") + sSocket.getErrorAsString();
CPPUNIT_ASSERT_MESSAGE( STD_STRING(suError1), sal_True == bOK1 );
sal_Bool bOK;
::rtl::OUString suError;