eventservice_test.hpp
Go to the documentation of this file.
00001 /***************************************************************************
00002   tag: Peter Soetens  Mon Jan 10 15:59:18 CET 2005  event_test.hpp
00003 
00004                         event_test.hpp -  description
00005                            -------------------
00006     begin                : Mon January 10 2005
00007     copyright            : (C) 2005 Peter Soetens
00008     email                : peter.soetens@mech.kuleuven.ac.be
00009 
00010  ***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 
00020 #ifndef EVENT_SERVICE_TEST_H
00021 #define EVENT_SERVICE_TEST_H
00022 
00023 
00024 #include <Event.hpp>
00025 #include <EventService.hpp>
00026 #include <extras/SlaveActivity.hpp>
00027 #include <string>
00028 
00029 using namespace RTT::detail;
00030 
00031 class EventServiceTest
00032 {
00033 public:
00034     RTT::Event<void( void )> t_event0;
00035     RTT::Event<void( std::string )> t_event1;
00036     RTT::Event<void( std::string, double )> t_event2;
00037     RTT::Event<void( std::string, double, bool )> t_event3;
00038     bool t_listener_done;
00039     bool t_completer_done;
00040     std::string t_listener_string;
00041     double t_listener_double;
00042     bool t_listener_bool;
00043     std::string t_completer_string;
00044     double t_completer_double;
00045     bool t_completer_bool;
00046     EventProcessor* event_proc;
00047     EventService* es;
00048     SlaveActivity act;
00049 public:
00050         EventServiceTest(){ setUp(); };
00051         ~EventServiceTest(){ tearDown(); };
00052 
00053     void setUp();
00054     void tearDown();
00055 
00056     void setup();
00057     void reset();
00058     void cleanup();
00059 
00060     void listener0();
00061     void completer0();
00062     void listener1(const std::string&);
00063     void completer1(const std::string&);
00064     void listener2(const std::string&, double);
00065     void completer2(const std::string&, double);
00066     void listener3(std::string, double, bool);
00067     void completer3(std::string, double, bool);
00068 
00069     void testAddRemove();
00070     void testSetupSyn();
00071     void testSetupAsyn();
00072     void testSetupEmit();
00073     void testEmit0();
00074     void testEmit1();
00075     void testEmit2();
00076     void testEmit3();
00077     void testEventC();
00078 };
00079 
00080 #endif  // EVENTTEST_H


rtt
Author(s): RTT Developers
autogenerated on Mon Oct 6 2014 03:13:35