diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:35:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:08 +0200 |
commit | 5285beeaa49f6678b471d472868c305c7d9da5f9 (patch) | |
tree | a3dbd28995142ab16b448f28e95821115ef5408f /stoc/test | |
parent | aeb41c9b9b7559c6d87bf92807acdc0df9e104cc (diff) |
remove redundant calls to OUString constructor in if expression
Convert code like:
if( aStr == OUString("xxxx") )
to this:
if( aStr == "xxxx" )
Change-Id: I8d201f048477731eff590fb988259ef0935c080c
Diffstat (limited to 'stoc/test')
-rw-r--r-- | stoc/test/testcorefl.cxx | 44 | ||||
-rw-r--r-- | stoc/test/testintrosp.cxx | 2 | ||||
-rw-r--r-- | stoc/test/testregistry.cxx | 62 | ||||
-rw-r--r-- | stoc/test/testsmgr_cpnt.cxx | 2 |
4 files changed, 55 insertions, 55 deletions
diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx index e0e04358b821..bfe792d1e280 100644 --- a/stoc/test/testcorefl.cxx +++ b/stoc/test/testcorefl.cxx @@ -86,7 +86,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Reference< XHierarchicalNameAccess > xHNameAccess( xRefl, UNO_QUERY ); OSL_ENSURE(xHNameAccess.is(), "### cannot get XHierarchicalNameAccess!" ); - OSL_ENSURE(xRefl->forName("ModuleA.StructA")->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 2b"); + OSL_ENSURE(xRefl->forName("ModuleA.StructA")->getName() == "ModuleA.StructA", "test_RegCoreReflection(): error 2b"); OSL_ENSURE(xRefl->forName("ModuleA.ExceptionB")->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 2c"); OSL_ENSURE(xRefl->forName("ModuleA.ModuleB.EnumA").is(), "test_RegCoreReflection(): error 2e"); @@ -108,11 +108,11 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) OSL_ENSURE( (fields.getLength() == 3) && - (fields.getArray()[0]->getName() == OUString( "VAL_1" )) && + (fields.getArray()[0]->getName() == "VAL_1" ) && (*(EnumA*)fields.getArray()[0]->get(Any()).getValue() == EnumA_VAL_1) && - (fields.getArray()[1]->getName() == OUString( "VAL_2" )) && + (fields.getArray()[1]->getName() == "VAL_2" ) && (*(EnumA*)fields.getArray()[1]->get(Any()).getValue() == EnumA_VAL_2) && - (fields.getArray()[2]->getName() == OUString( "VAL_3" )) && + (fields.getArray()[2]->getName() == "VAL_3" ) && (*(EnumA*)fields.getArray()[2]->get(Any()).getValue() == EnumA_VAL_3), "test_RegCoreReflection(): error 6"); @@ -137,59 +137,59 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) typelib_typedescription_release( pTD ); OSL_ENSURE(xClass->getSuperclasses().getLength() == 1, "test_RegCoreReflection(): error 9"); - OSL_ENSURE(xClass->getSuperclasses().getArray()[0]->getName() == OUString("ModuleC.XInterfaceA"), "test_RegCoreReflection(): error 10"); + OSL_ENSURE(xClass->getSuperclasses().getArray()[0]->getName() == "ModuleC.XInterfaceA"), "test_RegCoreReflection(): error 10"; OSL_ENSURE(xClass->getMethods().getLength() == 7, "test_RegCoreReflection(): error 11"); OSL_ENSURE(xA->getMethods().getLength() == 7, "test_RegCoreReflection(): error 11a"); - OSL_ENSURE(xClass->getMethods().getArray()[3]->getName() == OUString("methodA"), "test_RegCoreReflection(): 12"); + OSL_ENSURE(xClass->getMethods().getArray()[3]->getName() == "methodA"), "test_RegCoreReflection(): 12"; OSL_ENSURE(xClass->getMethods().getArray()[3]->getReturnType()->getTypeClass() == TypeClass_VOID, "test_RegCoreReflection(): error 13"); OSL_ENSURE(xClass->getMethods().getArray()[3]->getParameterTypes().getLength() == 0, "test_RegCoreReflection(): error 14"); OSL_ENSURE(xClass->getMethods().getArray()[3]->getExceptionTypes().getLength() == 0, "test_RegCoreReflection(): error 15"); - OSL_ENSURE(xClass->getMethods().getArray()[4]->getName() == OUString( "methodB" ), "test_RegCoreReflection(): error 16"); + OSL_ENSURE(xClass->getMethods().getArray()[4]->getName() == "methodB", "test_RegCoreReflection(): error 16"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getMode() == MethodMode_ONEWAY, "test_RegCoreReflection(): error 16a"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getReturnType()->getTypeClass() == TypeClass_VOID, "test_RegCoreReflection(): error 16"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterTypes().getLength() == 1, "test_RegCoreReflection(): error 17"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterTypes().getArray()[0]->getTypeClass() == TypeClass_SHORT, "test_RegCoreReflection(): error 18"); - OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aName == OUString( "aShort" ), "test_RegCoreReflection(): error 18a"); + OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aName == "aShort", "test_RegCoreReflection(): error 18a"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aType == xRefl->forName("short"), "test_RegCoreReflection(): error 18b"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aMode == ParamMode_IN, "test_RegCoreReflection(): error 18c"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getExceptionTypes().getLength() == 0, "test_RegCoreReflection(): error 19"); - OSL_ENSURE(xClass->getMethods().getArray()[5]->getName() == OUString("methodC"), "test_RegCoreReflection(): error 20"); + OSL_ENSURE(xClass->getMethods().getArray()[5]->getName() == "methodC", "test_RegCoreReflection(): error 20"); OSL_ENSURE(xClass->getMethods().getArray()[5]->getMode() == MethodMode_TWOWAY, "test_RegCoreReflection(): error 20a"); OSL_ENSURE(xClass->getMethods().getArray()[5]->getReturnType()->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 21"); OSL_ENSURE(xClass->getMethods().getArray()[5]->getReturnType()->getComponentType()->getTypeClass() == TypeClass_STRUCT, "test_RegCoreReflection(): error 22"); - OSL_ENSURE(xClass->getMethods().getArray()[5]->getReturnType()->getComponentType()->getName() == OUString("ModuleA.StructB"), "test_RegCoreReflection(): error 23"); + OSL_ENSURE(xClass->getMethods().getArray()[5]->getReturnType()->getComponentType()->getName() == "ModuleA.StructB", "test_RegCoreReflection(): error 23"); OSL_ENSURE(xClass->getMethods().getArray()[5]->getParameterTypes().getLength() == 2, "test_RegCoreReflection(): error 24"); OSL_ENSURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[0]->getTypeClass() == TypeClass_STRUCT, "test_RegCoreReflection(): error 25"); - OSL_ENSURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[0]->getName() == OUString("ModuleA.StructC"), "test_RegCoreReflection(): error 26"); + OSL_ENSURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[0]->getName() == "ModuleA.StructC", "test_RegCoreReflection(): error 26"); OSL_ENSURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[1]->getTypeClass() == TypeClass_STRUCT, "test_RegCoreReflection(): error 27"); - OSL_ENSURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[1]->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 28"); + OSL_ENSURE(xClass->getMethods().getArray()[5]->getParameterTypes().getArray()[1]->getName() == "ModuleA.StructA", "test_RegCoreReflection(): error 28"); OSL_ENSURE(xClass->getMethods().getArray()[5]->getExceptionTypes().getLength() == 0, "test_RegCoreReflection(): error 29"); - OSL_ENSURE(xClass->getMethods().getArray()[6]->getName() == OUString("methodD"), "test_RegCoreReflection(): error 30"); + OSL_ENSURE(xClass->getMethods().getArray()[6]->getName() == "methodD", "test_RegCoreReflection(): error 30"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getReturnType()->getTypeClass() == TypeClass_INTERFACE, "test_RegCoreReflection(): error 31"); - OSL_ENSURE(xClass->getMethods().getArray()[6]->getReturnType()->getName() == OUString("ModuleC.XInterfaceA"), "test_RegCoreReflection(): error 32"); + OSL_ENSURE(xClass->getMethods().getArray()[6]->getReturnType()->getName() == "ModuleC.XInterfaceA", "test_RegCoreReflection(): error 32"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getParameterTypes().getLength() == 1, "test_RegCoreReflection(): error 33"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getParameterTypes().getArray()[0]->getTypeClass() == TypeClass_ENUM, "test_RegCoreReflection(): error 34"); - OSL_ENSURE(xClass->getMethods().getArray()[6]->getParameterTypes().getArray()[0]->getName() == OUString("ModuleA.ModuleB.EnumA"), "test_RegCoreReflection(): error 35"); + OSL_ENSURE(xClass->getMethods().getArray()[6]->getParameterTypes().getArray()[0]->getName() == "ModuleA.ModuleB.EnumA", "test_RegCoreReflection(): error 35"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getLength() == 3, "test_RegCoreReflection(): error 36"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[0]->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 37"); - OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[0]->getName() == OUString("ModuleA.ExceptionA"), "test_RegCoreReflection(): error 38"); + OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[0]->getName() == "ModuleA.ExceptionA", "test_RegCoreReflection(): error 38"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[1]->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 38"); - OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[1]->getName() == OUString("ModuleA.ExceptionB"), "test_RegCoreReflection(): error 39"); + OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[1]->getName() == "ModuleA.ExceptionB", "test_RegCoreReflection(): error 39"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 40"); - OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getName() == OUString("ModuleA.ExceptionC"), "test_RegCoreReflection(): error 41"); + OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getName() == "ModuleA.ExceptionC", "test_RegCoreReflection(): error 41"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getLength() == 3, "test_RegCoreReflection(): error 42"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[0]->getType()->getTypeClass() == TypeClass_BOOLEAN, "test_RegCoreReflection(): error 43"); - OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[0]->getType()->getName() == OUString("boolean"), "test_RegCoreReflection(): error 43a"); + OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[0]->getType()->getName() == "boolean", "test_RegCoreReflection(): error 43a"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[1]->getType()->getTypeClass() == TypeClass_STRUCT, "test_RegCoreReflection(): error 44"); - OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[1]->getType()->getName() == OUString("ModuleA.StructC"), "test_RegCoreReflection(): error 45"); + OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[1]->getType()->getName() == "ModuleA.StructC", "test_RegCoreReflection(): error 45"); OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[2]->getType()->getTypeClass() == TypeClass_INTERFACE, "test_RegCoreReflection(): error 46"); - OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[2]->getType()->getName() == OUString("ModuleA.XInterface1"), "test_RegCoreReflection(): error 47"); + OSL_ENSURE(xClass->getMethods().getArray()[6]->getExceptionTypes().getArray()[2]->getFields().getArray()[2]->getType()->getName() == "ModuleA.XInterface1", "test_RegCoreReflection(): error 47"); // SequenceReflections OSL_ENSURE(xRefl->forName("[]ModuleA.StructA")->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 48"); OSL_ENSURE(xRefl->forName("[]ModuleA.StructA")->getComponentType().is(), "test_RegCoreReflection(): error 49"); - OSL_ENSURE(xRefl->forName("[][]ModuleA.StructA")->getComponentType()->getComponentType()->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 50"); + OSL_ENSURE(xRefl->forName("[][]ModuleA.StructA")->getComponentType()->getComponentType()->getName() == "ModuleA.StructA", "test_RegCoreReflection(): error 50"); OSL_ENSURE(xRefl->forName("[]com.sun.star.uno.XInterface") == xRefl->forName("ModuleA.StructC")->getField(OUString("aInterfaceSeq"))->getType(), "test_RegCoreReflection(): error 51"); StructC aStructC; diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx index 9f2da08d27ad..06c3167c2c56 100644 --- a/stoc/test/testintrosp.cxx +++ b/stoc/test/testintrosp.cxx @@ -575,7 +575,7 @@ sal_Bool ImplIntroTest::hasElements( ) sal_Int32 getIndexForName( const OUString& ItemName ) { OUString aLeftStr = ItemName.copy( 0, 4 ); - if( aLeftStr == OUString("Item") ) + if( aLeftStr == "Item" ) { // TODO OUString aNumStr = ItemName.copy( 4 ); diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx index 014ae2fcdb55..a9a680b1531d 100644 --- a/stoc/test/testregistry.cxx +++ b/stoc/test/testregistry.cxx @@ -232,22 +232,22 @@ void test_SimpleRegistry( name = seqNames.getArray()[i]; xSubKey = seqKeys.getArray()[i]; - if (name == OUString( "/FirstKey/FirstSubKey" )) + if (name == "/FirstKey/FirstSubKey" ) { OSL_ENSURE( xSubKey->getLongValue() == 123456789, "test_SimpleRegistry error 10" ); } else - if (name == OUString( "/FirstKey/SecondSubKey" )) + if (name == "/FirstKey/SecondSubKey" ) { - OSL_ENSURE( xSubKey->getAsciiValue() == OUString( "ich bin ein acsii value" ), + OSL_ENSURE( xSubKey->getAsciiValue() == "ich bin ein acsii value", "test_SimpleRegistry error 11" ); } else - if (name == OUString( "/FirstKey/ThirdSubKey" )) + if (name == "/FirstKey/ThirdSubKey" ) { - OSL_ENSURE( xSubKey->getStringValue() == OUString( "ich bin ein unicode value" ), + OSL_ENSURE( xSubKey->getStringValue() == "ich bin ein unicode value", "test_SimpleRegistry error 12" ); } else - if (name == OUString( "/FirstKey/FourthSubKey" )) + if (name == "/FirstKey/FourthSubKey" ) { Sequence<sal_Int8> seqByte = xSubKey->getBinaryValue(); OSL_ENSURE(!strcmp(((const char*)seqByte.getArray()), "ich bin ein binary value"), @@ -287,9 +287,9 @@ void test_SimpleRegistry( Sequence<OUString> seqAscii2; seqAscii2 = xKey->getAsciiListValue(); OSL_ENSURE( seqAscii2.getLength() == 3, "test_SimpleRegistry error 18" ); - OSL_ENSURE( seqAscii2.getArray()[0] == OUString( "Hallo" ), "test_SimpleRegistry error 19"); - OSL_ENSURE( seqAscii2.getArray()[1] == OUString( "jetzt komm" ), "test_SimpleRegistry error 20"); - OSL_ENSURE( seqAscii2.getArray()[2] == OUString( "ich" ), "test_SimpleRegistry error 21"); + OSL_ENSURE( seqAscii2.getArray()[0] == "Hallo", "test_SimpleRegistry error 19"); + OSL_ENSURE( seqAscii2.getArray()[1] == "jetzt komm", "test_SimpleRegistry error 20"); + OSL_ENSURE( seqAscii2.getArray()[2] == "ich", "test_SimpleRegistry error 21"); xKey = xRootKey->createKey(OUString( "FourthKey" )); OUString pUnicode[3]; @@ -303,9 +303,9 @@ void test_SimpleRegistry( Sequence<OUString> seqUnicode2; seqUnicode2 = xKey->getStringListValue(); OSL_ENSURE( seqUnicode2.getLength() == 3, "test_SimpleRegistry error 22" ); - OSL_ENSURE( seqUnicode2.getArray()[0] == OUString( "Hallo" ), "test_SimpleRegistry error 23"); - OSL_ENSURE( seqUnicode2.getArray()[1] == OUString( "jetzt komm" ), "test_SimpleRegistry error 24"); - OSL_ENSURE( seqUnicode2.getArray()[2] == OUString( "ich als unicode" ), "test_SimpleRegistry error 25"); + OSL_ENSURE( seqUnicode2.getArray()[0] == "Hallo", "test_SimpleRegistry error 23"); + OSL_ENSURE( seqUnicode2.getArray()[1] == "jetzt komm", "test_SimpleRegistry error 24"); + OSL_ENSURE( seqUnicode2.getArray()[2] == "ich als unicode", "test_SimpleRegistry error 25"); xReg->open(testreg2, sal_False, sal_True); @@ -354,18 +354,18 @@ void test_SimpleRegistry( xKey = xRootKey->openKey("/FifthKey/MyFirstLink"); OSL_ENSURE( xKey->isValid(), "test_SimpleRegistry error 27" ); - OSL_ENSURE( xKey->getKeyName() == OUString( "/ThirdKey/FirstSubKey" ), "test_SimpleRegistry error 28" ); + OSL_ENSURE( xKey->getKeyName() == "/ThirdKey/FirstSubKey", "test_SimpleRegistry error 28" ); xKey->createLink(OUString( "/WithSubSubKey/MyFourthLink" ), OUString( "/FourthKey/MySecondLink" )); OSL_ENSURE( xKey->getLinkTarget(OUString( "/WithSubSubKey/MyFourthLink" )) - == OUString( "/FourthKey/MySecondLink" ), "test_SimpleRegistry error 29" ); + == "/FourthKey/MySecondLink", "test_SimpleRegistry error 29" ); try { OSL_ENSURE( xKey->getResolvedName(OUString( "/WithSubSubKey/MyFourthLink/BlaBlaBla" )) - == OUString( "/FourthKey/MySecondLink/BlaBlaBla" ), "test_SimpleRegistry error 30" ); + == "/FourthKey/MySecondLink/BlaBlaBla", "test_SimpleRegistry error 30" ); } catch(InvalidRegistryException&) { @@ -388,7 +388,7 @@ void test_SimpleRegistry( } OSL_ENSURE( xRootKey->getLinkTarget(OUString( "/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" )) - == OUString( "/FourthKey/MySecondLink" ), "test_SimpleRegistry error 31" ); + == "/FourthKey/MySecondLink", "test_SimpleRegistry error 31" ); xRootKey->deleteLink(OUString( "/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" )); @@ -399,14 +399,14 @@ void test_SimpleRegistry( seqNames = xKey->getKeyNames(); seqKeys = xKey->openKeys(); - OSL_ENSURE( seqNames.getArray()[0] == OUString( "/SixthKey/SixthSubKey" ), + OSL_ENSURE( seqNames.getArray()[0] == "/SixthKey/SixthSubKey", "test_SimpleRegistry error 32" ); - OSL_ENSURE( seqNames.getArray()[1] == OUString( "/SixthKey/MyThirdLink" ), + OSL_ENSURE( seqNames.getArray()[1] == "/SixthKey/MyThirdLink", "test_SimpleRegistry error 33" ); - OSL_ENSURE( seqKeys.getArray()[0]->getKeyName() == OUString( "/SixthKey/SixthSubKey" ), + OSL_ENSURE( seqKeys.getArray()[0]->getKeyName() == "/SixthKey/SixthSubKey", "test_SimpleRegistry error 34" ); - OSL_ENSURE( seqKeys.getArray()[1]->getKeyName() == OUString( "/ThirdKey/FirstSubKey/WithSubSubKey" ), + OSL_ENSURE( seqKeys.getArray()[1]->getKeyName() == "/ThirdKey/FirstSubKey/WithSubSubKey", "test_SimpleRegistry error 35" ); xRootKey->deleteLink(OUString( "/FourthKey/MySecondLink" )); @@ -457,7 +457,7 @@ void test_DefaultRegistry( OSL_ENSURE( xServInfo.is(), "test_DefaultRegistry error2"); - OSL_ENSURE( xServInfo->getImplementationName() == OUString( "com.sun.star.comp.stoc.NestedRegistry" ), "test_DefualtRegistry error3"); + OSL_ENSURE( xServInfo->getImplementationName() == "com.sun.star.comp.stoc.NestedRegistry", "test_DefualtRegistry error3"); OSL_ENSURE( xServInfo->supportsService("com.sun.star.registry.NestedRegistry"), "test_DefaultRegistry error4"); OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "test_DefaultRegistry error5"); xServInfo.clear(); @@ -470,7 +470,7 @@ void test_DefaultRegistry( Reference<XRegistryKey> xKey = xRootKey->openKey("/UCR/com/sun/star/registry/XSimpleRegistry"); - OSL_ENSURE( xKey->getKeyName() == OUString( "/UCR/com/sun/star/registry/XSimpleRegistry" ), + OSL_ENSURE( xKey->getKeyName() == "/UCR/com/sun/star/registry/XSimpleRegistry", "test_DefaultRegistry error 7" ); if (bMergeDifferently) @@ -508,11 +508,11 @@ void test_DefaultRegistry( Sequence<OUString> seqValue = xKey->getAsciiListValue(); OSL_ENSURE( seqValue.getLength() == 3, "test_DefaultRegistry error 10" ); - OSL_ENSURE( seqValue.getArray()[0] == OUString( "Hallo" ), + OSL_ENSURE( seqValue.getArray()[0] == "Hallo", "test_DefaultRegistry error 11" ); - OSL_ENSURE( seqValue.getArray()[1] == OUString( "jetzt komm" ), + OSL_ENSURE( seqValue.getArray()[1] == "jetzt komm", "test_DefaultRegistry error 12" ); - OSL_ENSURE( seqValue.getArray()[2] == OUString( "ich" ), + OSL_ENSURE( seqValue.getArray()[2] == "ich", "test_DefaultRegistry error 13" ); Sequence<sal_Int32> seqLong(3); @@ -537,20 +537,20 @@ void test_DefaultRegistry( xKey = xRootKey->openKey("/Test/FifthKey/MyFirstLink"); OSL_ENSURE( xKey->isValid(), "test_DefaultRegistry error 18" ); - OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey" ), + OSL_ENSURE( xKey->getKeyName() == "/Test/ThirdKey/FirstSubKey", "test_DefaultRegistry error 19" ); xKey->createLink(OUString( "/WithSubSubKey/MyFourthLink" ), OUString( "/Test/FourthKey/MySecondLink" )); OSL_ENSURE( xKey->getLinkTarget(OUString( "/WithSubSubKey/MyFourthLink" )) - == OUString( "/Test/FourthKey/MySecondLink" ), + == "/Test/FourthKey/MySecondLink", "test_DefaultRegistry error 20" ); try { OSL_ENSURE( xKey->getResolvedName(OUString( "/WithSubSubKey/MyFourthLink/BlaBlaBla" )) - == OUString( "/Test/FourthKey/MySecondLink/BlaBlaBla" ), + == "/Test/FourthKey/MySecondLink/BlaBlaBla", "test_DefaultRegistry error 21" ); } catch(InvalidRegistryException&) @@ -573,7 +573,7 @@ void test_DefaultRegistry( } OSL_ENSURE( xRootKey->getLinkTarget(OUString( "/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" )) - == OUString( "/Test/FourthKey/MySecondLink" ), + == "/Test/FourthKey/MySecondLink", "test_DefaultRegistry error 22" ); xRootKey->deleteLink(OUString( "/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" )); @@ -581,12 +581,12 @@ void test_DefaultRegistry( xKey = xRootKey->openKey("/Test/DefaultLink/SecondSubSubKey"); if (xKey.is()) { - OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey/SecondSubSubKey" ), "test_DefaultRegistry error 23" ); + OSL_ENSURE( xKey->getKeyName() == "/Test/ThirdKey/FirstSubKey/SecondSubSubKey", "test_DefaultRegistry error 23" ); } xKey = xRootKey->createKey(OUString( "/Test/DefaultLink/ThirdSubSubKey" )); if (xKey.is()) { - OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey/ThirdSubSubKey" ), + OSL_ENSURE( xKey->getKeyName() == "/Test/ThirdKey/FirstSubKey/ThirdSubSubKey", "test_DefaultRegistry error 24" ); } diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx index 6e65b0c0b51e..d077821c3f5a 100644 --- a/stoc/test/testsmgr_cpnt.cxx +++ b/stoc/test/testsmgr_cpnt.cxx @@ -237,7 +237,7 @@ extern "C" void SAL_CALL test_ServiceManager() // getImplementations() check Sequence<OUString> seqImpl = xInst->getImplementations(OUString("com.sun.star.loader.SharedLibrary"), atUModule2); OSL_ENSURE( seqImpl.getLength() == 1, "count of implementantions is wrong" ); - OSL_ENSURE( seqImpl.getConstArray()[0] == OUString("com.sun.star.DummyService.V10"), "implementation name is not equal" ); + OSL_ENSURE( seqImpl.getConstArray()[0] == "com.sun.star.DummyService.V10", "implementation name is not equal" ); // tests, if a service provider can be instantiated. |