X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=test%2Freconnect.cpp;h=227df5672eef4c4453796f1abe0eb3c3cc0c4d6a;hp=6c704588698231955c28ea99ce3168b88a29fe58;hb=44b4600fd51677e54dd167734ca9252b58237cda;hpb=307b5e74c506b609d5c407be0943f45255ab5122 diff --git a/test/reconnect.cpp b/test/reconnect.cpp index 6c70458..227df56 100644 --- a/test/reconnect.cpp +++ b/test/reconnect.cpp @@ -39,44 +39,12 @@ on this file might be covered by the GNU General Public License. #include "test_fixtures.hxx" -#ifdef HAVE_CONFIG_H #include -#endif using namespace std; using namespace libt2n; -// this is an evil hack to get access to real_write, don't ever do this in an app!!! -class real_write_connection: public socket_server_connection -{ - public: - void real_write(const std::string& data) - { socket_write(data); } -}; - -class test_reconnectFixture : public KillChildOnShutdownFixture -{ -protected: - void send_raw_socket(string hello_string, socket_server* ss, int conn_id) - { - socket_server_connection *ssc=dynamic_cast(ss->get_connection(conn_id)); - - // this is an evil hack to get access to real_write, don't ever do this in an app!!! - real_write_connection *rwc=(real_write_connection*)ssc; - rwc->real_write(hello_string); - } - -public: - test_reconnectFixture() - { - } - - ~test_reconnectFixture() - { - } -}; - -BOOST_FIXTURE_TEST_SUITE(test_reconnect, test_reconnectFixture) +BOOST_FIXTURE_TEST_SUITE(test_reconnect, KillChildOnShutdownFixture) BOOST_AUTO_TEST_CASE(simple_reconnect) {