summaryrefslogtreecommitdiff
path: root/sal/test
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2001-07-10 06:44:00 +0000
committerJoachim Lingner <jl@openoffice.org>2001-07-10 06:44:00 +0000
commit401fb464c43802f93752127114a7d89eca3f9ef3 (patch)
tree462673a8bbf6648d75205e84aa4740b1b6b1420f /sal/test
parent0d3ae84d2343f27f90b0dd83e80c332491860d5b (diff)
*** empty log message ***
Diffstat (limited to 'sal/test')
-rw-r--r--sal/test/unloading/unloadTest.cxx64
1 files changed, 7 insertions, 57 deletions
diff --git a/sal/test/unloading/unloadTest.cxx b/sal/test/unloading/unloadTest.cxx
index 16ccdcc61929..cfeabe448fd6 100644
--- a/sal/test/unloading/unloadTest.cxx
+++ b/sal/test/unloading/unloadTest.cxx
@@ -68,61 +68,8 @@ void SAL_CALL listenerCallback( void* id);
int main(int argc, char* argv[])
{
- // Test if the servicemanager can be created and if the sample libs
- // can be loaded
-// Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-// OUString( RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")));
-// if( !serviceManager.is())
-// {
-// printf("\n ####################################################\n"
-// "Error: could not create service manager. \n"
-// "Is the executable in the office program directory?\n");
-// return -1;
-// }
-
-// Reference<XInterface> xint1= serviceManager->createInstance( OUString(
-// RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
-
-// if( !xint1.is())
-// {
-// printf("\n ###################################################\n"
-// "Error: could not create service from samplelib1\n"
-// "Is samplelib1 in the office program directory and is it "
-// "registered?\n");
-// return -1;
-// }
-// Reference<XInterface> xint2= serviceManager->createInstance( OUString(
-// RTL_CONSTASCII_USTRINGPARAM(SERVICENAME21)));
-// if( !xint2.is())
-// {
-// printf("\n ###################################################"
-// "Error: could not create service from samplelib2\n"
-// "Is samplelib2 in the office program directory and is it "
-// "registered?\n");
-// return -1;
-// }
-// //destroy servicemanager
-// Reference<XPropertySet> xSet( serviceManager, UNO_QUERY);
-// Any any_prop= xSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")));
-// Reference<XComponentContext> xContext;
-// any_prop >>= xContext;
-// Reference<XComponent> xComponent( xContext, UNO_QUERY);
-// xComponent->dispose();
-
-// //unload samplelib1 and samplelib2. We need the handles, therefore load
-// // the libs
-// OUString libname1( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-// OUString libname2( RTL_CONSTASCII_USTRINGPARAM(LIBRARY2));
-// oslModule m1= osl_loadModule(libname1.pData, 0);
-// oslModule m2= osl_loadModule(libname2.pData, 0);
-// osl_unloadModule( m1);
-// osl_unloadModule( m1);
-// osl_unloadModule( m2);
-// osl_unloadModule( m2);
-
-
- sal_Bool ret1= test1();
- if( ret1) printf( "\n Test 1 successful \n");
+ sal_Bool ret1= test1();
+ if( ret1) printf( "\n Test 1 successful \n");
else printf("\n !!!!!! Test 1 failed\n");
sal_Bool ret2= test2();
if( ret2) printf( "\n Test 2 successful \n");
@@ -142,7 +89,7 @@ int main(int argc, char* argv[])
sal_Bool ret8= test8();
if( ret8) printf( "\n Test 8 successful \n");
else printf("\n !!!!!! Test 8 failed\n");
- sal_Bool ret9= test9();
+ sal_Bool ret9= test9();
if( ret9) printf( "\n Test 9 successful: service manager is unloading listener\n");
else printf("\n !!!!! Test 9 failed\n");
@@ -616,7 +563,10 @@ sal_Bool test9()
OUString sSymbol( RTL_CONSTASCII_USTRINGPARAM("component_getFactory"));
void* pSymbol= osl_getSymbol( handleMod, sSymbol.pData);
- if( pSymbol)
+ xint= serviceManager->createInstance( OUString(
+ RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
+
+ if( pSymbol || !xint.is())
{
retval= sal_False;
}