diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2002-05-30 05:45:20 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2002-05-30 05:45:20 +0000 |
commit | c888d184ac6366fbae1e41849b16e115c7f41e20 (patch) | |
tree | d25a8a581f7f8d8d4314fc411ffb8b1c66031d65 /tests | |
parent | 2f170827dd75355f267327326e93d3020b5d6d55 (diff) | |
download | ATCD-c888d184ac6366fbae1e41849b16e115c7f41e20.tar.gz |
ChangeLogTag: Thu May 29 07:39:12 2002 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Framework_Component_Test.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/tests/Framework_Component_Test.cpp b/tests/Framework_Component_Test.cpp index e3dde3da6eb..0f452176b69 100644 --- a/tests/Framework_Component_Test.cpp +++ b/tests/Framework_Component_Test.cpp @@ -10,7 +10,7 @@ // Since Framework Components are singletons that can live in dlls loaded // via the Service Configurator framework, this test uses that framework // to load services from a dll that has a singleton based on ACE_DLL_Singleton. -// When the dll is finally ready to be unloaded, the singleton will be +// When the dll is finally ready to be unloaded, the singleton will be // automatically cleaned up just-in-time. // // = AUTHOR @@ -25,26 +25,28 @@ ACE_RCSID(tests, Framework_Component_Test, "$Id$") -// Define a few macros--because they're so much fun, and keep the +// Define a few macros--because they're so much fun, and keep the // code below a little cleaner... #if (ACE_USES_CLASSIC_SVC_CONF == 1) -# define ADD_SERVICE(X) ACE_TEXT ( \ - "dynamic Server_" #X " Service_Object * " \ - "Framework_Component_DLL:_make_Server_" #X "() ''") +# define ADD_SERVICE(X) \ + ACE_TEXT ("dynamic Server_") ACE_TEXT(#X) \ + ACE_TEXT (" Service_Object * ") \ + ACE_TEXT ("Framework_Component_DLL:_make_Server_") ACE_TEXT(#X) \ + ACE_TEXT ("() ''") -# define REMOVE_SERVICE(X) ACE_TEXT ( \ - "remove Server_" #X) +# define REMOVE_SERVICE(X) \ + ACE_TEXT ("remove Server_") ACE_TEXT(#X) -#else /* ACE_USES_CLASSIC_SVC_CONF */ +#else /* ACE_USES_CLASSIC_SVC_CONF */ -# define ADD_SERVICE(X) ACE_TEXT ( \ - "<?xml version='1.0'?> <dynamic id='Server_" #X "' " \ - "type='service_object'> <initializer init='_make_Server_" #X "' " \ - "path='Framework_Component_DLL' params=''/> </dynamic>") +# define ADD_SERVICE(X) \ + ACE_TEXT ("<?xml version='1.0'?> <dynamic id='Server_") ACE_TEXT(#X) ACE_TEXT("' ") \ + ACE_TEXT ("type='service_object'> <initializer init='_make_Server_") ACE_TEXT(#X) ACE_TEXT("' ") \ + ACE_TEXT ("path='Framework_Component_DLL' params=''/> </dynamic>") -# define REMOVE_SERVICE(X) ACE_TEXT ( \ - "<?xml version='1.0'?> <remove id='Server_" #X "'> </remove>") +# define REMOVE_SERVICE(X) \ + ACE_TEXT ( "<?xml version='1.0'?> <remove id='Server_") ACE_TEXT(#X) ACE_TEXT("'> </remove>") #endif /* ACE_USES_CLASSIC_SVC_CONF */ @@ -64,7 +66,7 @@ run_test (u_long unload_mask = 0) ACE_Service_Config::open (ACE_TEXT ("Framework_Component_Test"), ACE_DEFAULT_LOGGER_KEY, 1, 1, 1); - + // Now add server 1. ACE_Service_Config::process_directive (ADD_SERVICE(1)); @@ -78,14 +80,14 @@ run_test (u_long unload_mask = 0) ACE_Service_Config::process_directive (ADD_SERVICE(2)); // Unload the first one again, should *not* unload the dll this time. - ACE_Service_Config::process_directive (REMOVE_SERVICE(1)); + ACE_Service_Config::process_directive (REMOVE_SERVICE(1)); - // And unload the second service. Since the ACE_DLL_Handle will no longer + // And unload the second service. Since the ACE_DLL_Handle will no longer // have any references, the ACE_DLL_Manager will apply it's current unloading - // strategy and either call ACE_OS::dlclose() immediately, schedule a timeout - // the the reactor to call dlclose() some time in the future, or keep the + // strategy and either call ACE_OS::dlclose() immediately, schedule a timeout + // the the reactor to call dlclose() some time in the future, or keep the // dll loaded until program termination. - ACE_Service_Config::process_directive (REMOVE_SERVICE(2)); + ACE_Service_Config::process_directive (REMOVE_SERVICE(2)); // Force unloading so we'll be ready for the next test. ACE_DLL_Manager::instance ()->unload_strategy (ACE_DLL_Manager_Ex::DEFAULT); |