diff options
Diffstat (limited to 'orbsvcs/tests/unit')
17 files changed, 67 insertions, 554 deletions
diff --git a/orbsvcs/tests/unit/Makefile.am b/orbsvcs/tests/unit/Makefile.am deleted file mode 100644 index f625b1eaf6a..00000000000 --- a/orbsvcs/tests/unit/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -SUBDIRS = \ - Notify \ - Trading - diff --git a/orbsvcs/tests/unit/Notify/MC/Control/Makefile.am b/orbsvcs/tests/unit/Notify/MC/Control/Makefile.am deleted file mode 100644 index 36de58cb465..00000000000 --- a/orbsvcs/tests/unit/Notify/MC/Control/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - - -## Makefile.Control.am - -if BUILD_EXCEPTIONS -if !BUILD_WINCE - -noinst_PROGRAMS = Control - -Control_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs - -Control_SOURCES = \ - Control.cpp - -Control_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_MC.la \ - $(TAO_BUILDDIR)/tao/libTAO_Monitor.la \ - $(ACE_BUILDDIR)/ace/Monitor_Control/libACE_Monitor_Control.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL_Parser.la \ - $(TAO_BUILDDIR)/tao/ETCL/libTAO_ETCL.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_WINCE -endif BUILD_EXCEPTIONS - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/orbsvcs/tests/unit/Notify/MC/Makefile.am b/orbsvcs/tests/unit/Notify/MC/Makefile.am deleted file mode 100644 index 55d478023e5..00000000000 --- a/orbsvcs/tests/unit/Notify/MC/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -SUBDIRS = \ - Control \ - MonitorControlExt \ - MonitorManager \ - NotificationServiceMonitor \ - Statistic \ - Statistic_Registry - diff --git a/orbsvcs/tests/unit/Notify/MC/MonitorControlExt/Makefile.am b/orbsvcs/tests/unit/Notify/MC/MonitorControlExt/Makefile.am deleted file mode 100644 index 845eaf08bb0..00000000000 --- a/orbsvcs/tests/unit/Notify/MC/MonitorControlExt/Makefile.am +++ /dev/null @@ -1,68 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - - -## Makefile.MonitorControlExt.am - -if BUILD_EXCEPTIONS -if !BUILD_WINCE - -noinst_PROGRAMS = MonitorControlExt - -MonitorControlExt_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -DTAO_HAS_TYPED_EVENT_CHANNEL - -MonitorControlExt_SOURCES = \ - MonitorControlExt.cpp - -MonitorControlExt_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_MC_Ext.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_MC.la \ - $(TAO_BUILDDIR)/tao/libTAO_Monitor.la \ - $(ACE_BUILDDIR)/ace/Monitor_Control/libACE_Monitor_Control.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_Serv.la \ - $(TAO_BUILDDIR)/tao/libTAO_DynamicAny.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL_Parser.la \ - $(TAO_BUILDDIR)/tao/ETCL/libTAO_ETCL.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_WINCE -endif BUILD_EXCEPTIONS - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/orbsvcs/tests/unit/Notify/MC/MonitorControlExt/MonitorControlExt.cpp b/orbsvcs/tests/unit/Notify/MC/MonitorControlExt/MonitorControlExt.cpp index 63fc5154dae..dda9336defb 100644 --- a/orbsvcs/tests/unit/Notify/MC/MonitorControlExt/MonitorControlExt.cpp +++ b/orbsvcs/tests/unit/Notify/MC/MonitorControlExt/MonitorControlExt.cpp @@ -35,17 +35,17 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) try { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + PortableServer::POAManager_var poa_manager = poa->the_POAManager (); poa_manager->activate (); TAO_Notify_Service* notify_service = TAO_Notify_Service::load_default (); - + if (notify_service == 0) { error ("Unable to load the Notify Service"); @@ -59,7 +59,7 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) notify_service->create (poa.in (), ecf_name.c_str ()); NotifyMonitoringExt::EventChannelFactory_var monitor_ec_factory = NotifyMonitoringExt::EventChannelFactory::_narrow (ecf.in ()); - + if (CORBA::is_nil (monitor_ec_factory.in ())) { error ("Unable to create the Monitoring Event Channel Factory"); @@ -69,7 +69,7 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) CosNotification::AdminProperties admin_prop; CosNotifyChannelAdmin::ChannelID id; const ACE_CString ec_name ("test1"); - + CosNotifyChannelAdmin::EventChannel_var ec = monitor_ec_factory->create_named_channel (qos_prop, admin_prop, @@ -77,7 +77,7 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) ec_name.c_str ()); NotifyMonitoringExt::EventChannel_var mec = NotifyMonitoringExt::EventChannel::_narrow (ec.in ()); - + if (CORBA::is_nil (mec.in ())) { error ("Unable to narrow the event channel"); @@ -104,9 +104,9 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) ecf_name + "/" + ACE_CString (NotifyMonitoringExt::InactiveEventChannelCount); - + Monitor_Base* stat = instance->get (stat_name); - + if (stat == 0) { error ("Could not find InactiveEventChannelCount statistic"); @@ -114,8 +114,8 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) stat->update (); double count = stat->last_sample (); - - if (count != 1) + + if (!ACE::is_equal (count, 1.0)) { error ("Invalid inactive event channel count"); } @@ -124,9 +124,9 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) ecf_name + "/" + ACE_CString (NotifyMonitoringExt::ActiveEventChannelCount); - + stat = instance->get (stat_name); - + if (stat == 0) { error ("Could not find ActiveEventChannelCount statistic"); @@ -134,8 +134,8 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) stat->update (); count = stat->last_sample (); - - if (count != 0) + + if (!ACE::is_equal (count, 0.0)) { error ("Invalid active event channel count"); } @@ -144,9 +144,9 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) ecf_name + "/" + ACE_CString (NotifyMonitoringExt::InactiveEventChannelNames); - + stat = instance->get (stat_name); - + if (stat == 0) { error ("Could not find InactiveEventChannels statistic"); @@ -154,14 +154,14 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) stat->update (); Monitor_Control_Types::NameList list = stat->get_list (); - + if (list.size () != 1) { error ("Invalid inactive event channel list"); } ACE_CString full_ec_name (ecf_name + "/" + ec_name); - + if (list[0] != full_ec_name) { error ("Wrong event channel name"); @@ -179,7 +179,7 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) mec->named_new_for_suppliers (CosNotifyChannelAdmin::AND_OP, aid, "TestSupplierAdmin"); - + error ("Expected a SupplierAdmin " "NotifyMonitoringExt::NameAlreadyUsed exception"); } @@ -197,7 +197,7 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) NotifyMonitoringExt::SupplierAdmin_var madmin = NotifyMonitoringExt::SupplierAdmin::_narrow (admin.in ()); - + if (CORBA::is_nil (madmin.in ())) { error ("Could not narrow the supplier admin"); @@ -215,7 +215,7 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) CosNotifyChannelAdmin::ProxyConsumer_var fake = madmin->obtain_named_notification_push_consumer (CosNotifyChannelAdmin::STRUCTURED_EVENT, pid, "supplier"); - + error ("Expected a ProxyConsumer " "NotifyMonitoringExt::NameAlreadyUsed exception"); } @@ -230,9 +230,9 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) + ec_name + "/" + ACE_CString (NotifyMonitoringExt::EventChannelSupplierCount); - + stat = instance->get (stat_name); - + if (stat == 0) { error ("Could not find the event channel suppliers statistic"); @@ -240,8 +240,8 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) stat->update (); count = stat->last_sample (); - - if (count != 1) + + if (!ACE::is_equal (count, 1.0)) { error ("Invalid supplier count"); } @@ -277,7 +277,7 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) mec->named_new_for_consumers (CosNotifyChannelAdmin::AND_OP, aid, "TestConsumerAdmin"); - + error ("Expected a ConsumerAdmin " "NotifyMonitoringExt::NameAlreadyUsed exception"); } @@ -295,7 +295,7 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) NotifyMonitoringExt::ConsumerAdmin_var mcadmin = NotifyMonitoringExt::ConsumerAdmin::_narrow (cadmin.in ()); - + if (CORBA::is_nil (mcadmin.in ())) { error ("Could not narrow the consumer admin"); @@ -314,7 +314,7 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) CosNotifyChannelAdmin::STRUCTURED_EVENT, pid, "consumer"); - + error ("Expected a ProxySupplier " "NotifyMonitoringExt::NameAlreadyUsed exception"); } @@ -329,9 +329,9 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) + ec_name + "/" + ACE_CString (NotifyMonitoringExt::EventChannelConsumerCount); - + stat = instance->get (stat_name); - + if (stat == 0) { error ("Could not find the event channel consumers statistic"); @@ -339,8 +339,8 @@ ACE_TMAIN (int argc, ACE_TCHAR* argv[]) stat->update (); count = stat->last_sample (); - - if (count != 1) + + if (!ACE::is_equal (count, 1.0)) { error ("Invalid consumer count"); } diff --git a/orbsvcs/tests/unit/Notify/MC/MonitorManager/Makefile.am b/orbsvcs/tests/unit/Notify/MC/MonitorManager/Makefile.am deleted file mode 100644 index 992187c9ef8..00000000000 --- a/orbsvcs/tests/unit/Notify/MC/MonitorManager/Makefile.am +++ /dev/null @@ -1,73 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - -noinst_PROGRAMS = - -## Makefile.MonitorManager_Client.am - -if BUILD_EXCEPTIONS -if !BUILD_WINCE - -noinst_PROGRAMS += MonitorClient - -MonitorClient_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs - -MonitorClient_SOURCES = \ - MonitorClient.cpp - -MonitorClient_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_MC.la \ - $(TAO_BUILDDIR)/tao/libTAO_Monitor.la \ - $(ACE_BUILDDIR)/ace/Monitor_Control/libACE_Monitor_Control.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL_Parser.la \ - $(TAO_BUILDDIR)/tao/ETCL/libTAO_ETCL.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_WINCE -endif BUILD_EXCEPTIONS - -## Makefile.MonitorManager_Server.am - -noinst_PROGRAMS += MonitorManager - -MonitorManager_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) - -MonitorManager_SOURCES = \ - MonitorManager.cpp - -MonitorManager_LDADD = \ - $(ACE_BUILDDIR)/ace/libACE.la - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/orbsvcs/tests/unit/Notify/MC/MonitorManager/svc.conf b/orbsvcs/tests/unit/Notify/MC/MonitorManager/svc.conf index 74f5e5224b2..1d72c863f98 100644 --- a/orbsvcs/tests/unit/Notify/MC/MonitorManager/svc.conf +++ b/orbsvcs/tests/unit/Notify/MC/MonitorManager/svc.conf @@ -1 +1,3 @@ +# $Id$ + dynamic TAO_MonitorAndControl Service_Object * TAO_CosNotification_MC:_make_TAO_MonitorAndControl () "-NoNameSvc -ORBArg -ORBListenEndpoints -ORBArg iiop://127.0.0.1:32101" diff --git a/orbsvcs/tests/unit/Notify/MC/NotificationServiceMonitor/Makefile.am b/orbsvcs/tests/unit/Notify/MC/NotificationServiceMonitor/Makefile.am deleted file mode 100644 index 0e0f057a3c1..00000000000 --- a/orbsvcs/tests/unit/Notify/MC/NotificationServiceMonitor/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - - -## Makefile.NotificationServiceMonitor.am - -if BUILD_EXCEPTIONS -if !BUILD_WINCE - -noinst_PROGRAMS = NotificationServiceMonitor - -NotificationServiceMonitor_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs - -NotificationServiceMonitor_SOURCES = \ - NotificationServiceMonitor.cpp - -NotificationServiceMonitor_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_MC.la \ - $(TAO_BUILDDIR)/tao/libTAO_Monitor.la \ - $(ACE_BUILDDIR)/ace/Monitor_Control/libACE_Monitor_Control.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL_Parser.la \ - $(TAO_BUILDDIR)/tao/ETCL/libTAO_ETCL.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_WINCE -endif BUILD_EXCEPTIONS - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/orbsvcs/tests/unit/Notify/MC/NotificationServiceMonitor/NotificationServiceMonitor.cpp b/orbsvcs/tests/unit/Notify/MC/NotificationServiceMonitor/NotificationServiceMonitor.cpp index 18d10324597..81c20d2f598 100644 --- a/orbsvcs/tests/unit/Notify/MC/NotificationServiceMonitor/NotificationServiceMonitor.cpp +++ b/orbsvcs/tests/unit/Notify/MC/NotificationServiceMonitor/NotificationServiceMonitor.cpp @@ -128,7 +128,7 @@ ACE_TMAIN (int, ACE_TCHAR*[]) index = start_size + 1; num = data[index].data_union.num (); - if (num.average != 4.5) + if (!ACE::is_equal (num.average, 4.5)) { error ("get_statistics() return the wrong data"); } diff --git a/orbsvcs/tests/unit/Notify/MC/Statistic/Makefile.am b/orbsvcs/tests/unit/Notify/MC/Statistic/Makefile.am deleted file mode 100644 index 7c4cdda1f45..00000000000 --- a/orbsvcs/tests/unit/Notify/MC/Statistic/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - - -## Makefile.Statistic.am - -if BUILD_EXCEPTIONS -if !BUILD_WINCE - -noinst_PROGRAMS = Statistic - -Statistic_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs - -Statistic_SOURCES = \ - Statistic.cpp - -Statistic_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_MC.la \ - $(TAO_BUILDDIR)/tao/libTAO_Monitor.la \ - $(ACE_BUILDDIR)/ace/Monitor_Control/libACE_Monitor_Control.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL_Parser.la \ - $(TAO_BUILDDIR)/tao/ETCL/libTAO_ETCL.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_WINCE -endif BUILD_EXCEPTIONS - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/orbsvcs/tests/unit/Notify/MC/Statistic/Statistic.cpp b/orbsvcs/tests/unit/Notify/MC/Statistic/Statistic.cpp index 2db160fceb1..c6a81b78d8c 100644 --- a/orbsvcs/tests/unit/Notify/MC/Statistic/Statistic.cpp +++ b/orbsvcs/tests/unit/Notify/MC/Statistic/Statistic.cpp @@ -27,8 +27,8 @@ ACE_TMAIN (int, ACE_TCHAR*[]) counter.receive (0.0); counter.receive (0.0); counter.receive (0.0); - - if (counter.last_sample() != 3) + + if (!ACE::is_equal (counter.last_sample(), 3.0)) { error ("Counter Monitor_Control::receive() failed"); } @@ -40,23 +40,23 @@ ACE_TMAIN (int, ACE_TCHAR*[]) number.receive (size); size = 42; number.receive (size); - - if (number.average () != 20) + + if (!ACE::is_equal (number.average (), 20.0)) { error ("Number Monitor_Base::average() failed"); } - - if (number.minimum_sample () != 8) + + if (!ACE::is_equal (number.minimum_sample (), 8.0)) { error ("Number Monitor_Base::minimum_sample() failed"); } - - if (number.maximum_sample () != 42) + + if (!ACE::is_equal (number.maximum_sample (), 42.0)) { error ("Number Monitor_Base::maximum_sample() failed"); } - - if (number.sum_of_squares () != 1928) + + if (!ACE::is_equal (number.sum_of_squares (), 1928.0)) { error ("Number Monitor_Base::sum_of_squares() failed"); } @@ -65,18 +65,18 @@ ACE_TMAIN (int, ACE_TCHAR*[]) stime.receive (1183466309.01234); stime.receive (1183466377.9922); stime.receive (1083466309.88374); - - if (stime.average () != 1150132998.96276) + + if (!ACE::is_equal (stime.average (), 1150132998.96276)) { error ("Time Monitor_Base::average() failed"); } - - if (stime.minimum_sample () != 1083466309.88374) + + if (!ACE::is_equal (stime.minimum_sample (), 1083466309.88374)) { error ("Time Monitor_Base::minimum_sample() failed"); } - - if (stime.maximum_sample () != 1183466377.9922) + + if (!ACE::is_equal (stime.maximum_sample (), 1183466377.9922)) { error ("Time Monitor_Base::maximum_sample() failed"); } @@ -85,7 +85,7 @@ ACE_TMAIN (int, ACE_TCHAR*[]) interval.receive (.8); interval.receive (.1); interval.receive (.42); - + // This multiplication and casting is necessary since the machine // representation of the floating point values in the receive() // calls are not exactly what is represented by the text of the code. @@ -93,17 +93,17 @@ ACE_TMAIN (int, ACE_TCHAR*[]) { error ("Interval Monitor_Base::average() failed"); } - - if (interval.minimum_sample () != .1) + + if (!ACE::is_equal (interval.minimum_sample (), 0.1)) { error ("Interval Monitor_Base::minimum_sample() failed"); } - - if (interval.maximum_sample () != .8) + + if (!ACE::is_equal (interval.maximum_sample (), 0.8)) { error ("Interval Monitor_Base::maximum_sample() failed"); } - + if (static_cast<int> (interval.sum_of_squares () * 10000) != 8264) { error ("Interval Monitor_Base::sum_of_squares() failed"); @@ -115,7 +115,7 @@ ACE_TMAIN (int, ACE_TCHAR*[]) l.push_back ("two"); l.push_back ("three"); list.receive (l); - + if (list.count () != 3) { error ("List Monitor_Base::receive() failed"); diff --git a/orbsvcs/tests/unit/Notify/MC/Statistic_Registry/Makefile.am b/orbsvcs/tests/unit/Notify/MC/Statistic_Registry/Makefile.am deleted file mode 100644 index a5989740c23..00000000000 --- a/orbsvcs/tests/unit/Notify/MC/Statistic_Registry/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - - -## Makefile.Statistic_Registry.am - -if BUILD_EXCEPTIONS -if !BUILD_WINCE - -noinst_PROGRAMS = Statistic_Registry - -Statistic_Registry_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs - -Statistic_Registry_SOURCES = \ - Statistic_Registry.cpp - -Statistic_Registry_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_MC.la \ - $(TAO_BUILDDIR)/tao/libTAO_Monitor.la \ - $(ACE_BUILDDIR)/ace/Monitor_Control/libACE_Monitor_Control.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL_Parser.la \ - $(TAO_BUILDDIR)/tao/ETCL/libTAO_ETCL.la \ - $(ACE_BUILDDIR)/ace/ETCL/libACE_ETCL.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_WINCE -endif BUILD_EXCEPTIONS - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/orbsvcs/tests/unit/Notify/MC/Statistic_Registry/Statistic_Registry.cpp b/orbsvcs/tests/unit/Notify/MC/Statistic_Registry/Statistic_Registry.cpp index c3f330b31b8..6d3a54b2593 100644 --- a/orbsvcs/tests/unit/Notify/MC/Statistic_Registry/Statistic_Registry.cpp +++ b/orbsvcs/tests/unit/Notify/MC/Statistic_Registry/Statistic_Registry.cpp @@ -29,7 +29,7 @@ ACE_TMAIN (int, ACE_TCHAR*[]) // Test registry acquisition. Monitor_Point_Registry* reg = Monitor_Point_Registry::instance (); - + if (reg == 0) { error ("Monitor_Point_Registry::instance() failed"); @@ -75,7 +75,7 @@ ACE_TMAIN (int, ACE_TCHAR*[]) Monitor_Base ("test1", Monitor_Control_Types::MC_COUNTER), 2); - + if (reg->add (s) == false) { error ("re-addition Monitor_Point_Registry::add() failed"); @@ -85,7 +85,7 @@ ACE_TMAIN (int, ACE_TCHAR*[]) Monitor_Base ("test2", Monitor_Control_Types::MC_NUMBER), 2); - + if (reg->add (s) == false) { error ("second Monitor_Point_Registry::add() failed"); diff --git a/orbsvcs/tests/unit/Notify/Makefile.am b/orbsvcs/tests/unit/Notify/Makefile.am deleted file mode 100644 index 78e59ea6b49..00000000000 --- a/orbsvcs/tests/unit/Notify/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -SUBDIRS = \ - MC - diff --git a/orbsvcs/tests/unit/Trading/Interpreter/Interpreter.cpp b/orbsvcs/tests/unit/Trading/Interpreter/Interpreter.cpp index edc28721c2c..10c97dc3c24 100644 --- a/orbsvcs/tests/unit/Trading/Interpreter/Interpreter.cpp +++ b/orbsvcs/tests/unit/Trading/Interpreter/Interpreter.cpp @@ -16,14 +16,14 @@ public: virtual int visit_constraint (TAO_Unary_Constraint*); virtual int visit_with (TAO_Unary_Constraint*) { return 1; } - virtual int visit_min (TAO_Unary_Constraint*) { return 1; } - virtual int visit_max (TAO_Unary_Constraint*) { return 1; } + virtual int visit_min (TAO_Unary_Constraint*) { return 1; } + virtual int visit_max (TAO_Unary_Constraint*) { return 1; } virtual int visit_first (TAO_Noop_Constraint*) { return 1; } virtual int visit_random (TAO_Noop_Constraint*) { return 1; } virtual int visit_and (TAO_Binary_Constraint*) { return 1; } - virtual int visit_or (TAO_Binary_Constraint*) { return 1; } - virtual int visit_not (TAO_Unary_Constraint*) { return 1; } + virtual int visit_or (TAO_Binary_Constraint*) { return 1; } + virtual int visit_not (TAO_Unary_Constraint*) { return 1; } virtual int visit_exist (TAO_Unary_Constraint*) { return 1; } virtual int visit_unary_minus (TAO_Unary_Constraint*) { return 1; } @@ -31,7 +31,7 @@ public: virtual int visit_add (TAO_Binary_Constraint*) { return 1; } virtual int visit_sub (TAO_Binary_Constraint*) { return 1; } virtual int visit_mult (TAO_Binary_Constraint*) { return 1; } - virtual int visit_div (TAO_Binary_Constraint*) { return 1; } + virtual int visit_div (TAO_Binary_Constraint*) { return 1; } virtual int visit_twiddle (TAO_Binary_Constraint*) { return 1; } virtual int visit_in (TAO_Binary_Constraint*) { return 1; } @@ -129,7 +129,7 @@ Literal_Interpreter<const char*>::compare (const char* expected) const template<class T> bool Literal_Interpreter<T>::compare (T expected) const { - return (static_cast<T> (this->constraint_) == expected); + return ACE::is_equal (static_cast<T> (this->constraint_), expected); } template<class T> void diff --git a/orbsvcs/tests/unit/Trading/Interpreter/Makefile.am b/orbsvcs/tests/unit/Trading/Interpreter/Makefile.am deleted file mode 100644 index af99264e7ad..00000000000 --- a/orbsvcs/tests/unit/Trading/Interpreter/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - - -## Makefile.Interpreter.am - -if BUILD_EXCEPTIONS - -noinst_PROGRAMS = Interpreter - -Interpreter_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs - -Interpreter_SOURCES = \ - Interpreter.cpp - -Interpreter_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading_Serv.la \ - $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ - $(TAO_BUILDDIR)/tao/libTAO_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_DynamicAny.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading_Skel.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif BUILD_EXCEPTIONS - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/orbsvcs/tests/unit/Trading/Makefile.am b/orbsvcs/tests/unit/Trading/Makefile.am deleted file mode 100644 index add42f9d0ae..00000000000 --- a/orbsvcs/tests/unit/Trading/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -SUBDIRS = \ - Interpreter - |