summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-15 10:19:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-15 10:19:01 +0100
commit9ce073bc170f6956938cfb25fd5e5b1ad118df83 (patch)
tree52defddc4e6f09e900b9e836f90784defd159659 /tools
parentfe99ee368fef4059e187a81059679ca150161119 (diff)
tools: Use appropriate OUString functions on string constants
Change-Id: Ifeb1aa309db401c9bb6e3184489c17d399cf145f
Diffstat (limited to 'tools')
-rw-r--r--tools/qa/cppunit/test_urlobj.cxx76
1 files changed, 37 insertions, 39 deletions
diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index df866bc85e2c..038ead7cd0f2 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -69,14 +69,14 @@ namespace tools_urlobj
( "file://10.10.1.1/sampledir/sample.file" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
- equalsAscii( "10.10.1.1" ) );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
- equalsAscii( "/sampledir/sample.file" ) );
- CPPUNIT_ASSERT( aUrl.getName( ).
- equalsAscii( "sample.file" ) );
- CPPUNIT_ASSERT( aUrl.getBase( ).equalsAscii( "sample" ) );
- CPPUNIT_ASSERT( aUrl.getExtension( ).equalsAscii( "file" ) );
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ == "10.10.1.1" );
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ == "/sampledir/sample.file" );
+ CPPUNIT_ASSERT( aUrl.getName( )
+ == "sample.file" );
+ CPPUNIT_ASSERT( aUrl.getBase( ) == "sample" );
+ CPPUNIT_ASSERT( aUrl.getExtension( ) == "file" );
}
void urlobjTest_002( )
@@ -95,14 +95,13 @@ namespace tools_urlobj
equalsAscii( "file://137.65.170.24/c$/Img0001.jpg" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
- equalsAscii( "137.65.170.24" ) );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
- equalsAscii( "/c$/Img0001.jpg" ) );
- CPPUNIT_ASSERT( aUrl.getName( ).
- equalsAscii( "Img0001.jpg" ) );
- CPPUNIT_ASSERT( aUrl.getBase( ).equalsAscii( "Img0001" ) );
- CPPUNIT_ASSERT( aUrl.getExtension( ).equalsAscii( "jpg" ) );
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ == "137.65.170.24" );
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ == "/c$/Img0001.jpg" );
+ CPPUNIT_ASSERT( aUrl.getName( ) == "Img0001.jpg" );
+ CPPUNIT_ASSERT( aUrl.getBase( ) == "Img0001" );
+ CPPUNIT_ASSERT( aUrl.getExtension( ) == "jpg" );
}
@@ -122,10 +121,10 @@ namespace tools_urlobj
equalsAscii( "file://hive-winxp-x86/pmladek/test2.odt" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
- equalsAscii( "hive-winxp-x86" ) );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
- equalsAscii( "/pmladek/test2.odt" ) );
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ == "hive-winxp-x86" );
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ == "/pmladek/test2.odt" );
}
void urlobjTest_004( )
@@ -141,14 +140,13 @@ namespace tools_urlobj
equalsAscii( "file://10.10.1.1/sampledir/sample.file" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
- equalsAscii( "10.10.1.1" ) );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
- equalsAscii( "/sampledir/sample.file" ) );
- CPPUNIT_ASSERT( aUrl.getName( ).
- equalsAscii( "sample.file" ) );
- CPPUNIT_ASSERT( aUrl.getBase( ).equalsAscii( "sample" ) );
- CPPUNIT_ASSERT( aUrl.getExtension( ).equalsAscii( "file" ) );
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ == "10.10.1.1" );
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ == "/sampledir/sample.file" );
+ CPPUNIT_ASSERT( aUrl.getName( ) == "sample.file" );
+ CPPUNIT_ASSERT( aUrl.getBase( ) == "sample" );
+ CPPUNIT_ASSERT( aUrl.getExtension( ) == "file" );
}
void urlobjTest_005( )
@@ -166,13 +164,13 @@ namespace tools_urlobj
equalsAscii( "file://137.65.170.24/c$/Img0001.jpg" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
- equalsAscii( "137.65.170.24" ) );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
- equalsAscii( "/c$/Img0001.jpg" ) );
- CPPUNIT_ASSERT( aUrl.getName( ).equalsAscii( "Img0001.jpg" ) );
- CPPUNIT_ASSERT( aUrl.getBase( ).equalsAscii( "Img0001" ) );
- CPPUNIT_ASSERT( aUrl.getExtension( ).equalsAscii( "jpg" ) );
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ == "137.65.170.24" );
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ == "/c$/Img0001.jpg" );
+ CPPUNIT_ASSERT( aUrl.getName( ) == "Img0001.jpg" );
+ CPPUNIT_ASSERT( aUrl.getBase( ) == "Img0001" );
+ CPPUNIT_ASSERT( aUrl.getExtension( ) == "jpg" );
}
@@ -191,10 +189,10 @@ namespace tools_urlobj
equalsAscii( "file://hive-winxp-x86/pmladek/test2.odt" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INET_PROT_FILE );
#endif
- CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE ).
- equalsAscii( "hive-winxp-x86" ) );
- CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE ).
- equalsAscii( "/pmladek/test2.odt" ) );
+ CPPUNIT_ASSERT( aUrl.GetHost( INetURLObject::NO_DECODE )
+ == "hive-winxp-x86" );
+ CPPUNIT_ASSERT( aUrl.GetURLPath( INetURLObject::NO_DECODE )
+ == "/pmladek/test2.odt" );
}
void urlobjCmisTest( )